Thank you Berend. By reading you scripts I realised that I had not set my environment variables correctly.