Added OS check to determine which command to use.