Since your need is limited to Windows XP and Win7 this should do the trick. The thing you are wanting to do is determine, when the program is executed, which OS is running. Fortunately, Windows plugs an OS value into the registry at run time so all you really need to read the value that's...