detect operating system when generating slicecommand