Runs the given windows or unix function depending on the current operating system.
the result of the function based on the OS