I am wanting to write a debug tool to give out to customers that, ultimately, could run off most OS and would report the user's OS specifics in the log file. Windows/mac, maybe unix...

How do I obtain the OS parameters (ie platform, version number etc)?

Any help/advice appreciated.