I am currently working on a project to get an existing 32 bit app to work in windows xp and windows 7. Currently the program works in XP is called us a script file that checks a folder in C:\Program files\ . since it is a 32 bit program it will be installed in c:\program files (x86) on the windows 7 machine. the same script will no longer in window 7. my idea is to write a program/ script that can identify the version of windows that is running on the machine . once it is determined run the program using the points to the correct program files folder .
Win 7 32-bit uses just the "Program Files" folder for programs, 64-bit uses the "Program Files (x86)" folder for 32-bit programs. So you might want to determine if the program is running under 32 or 64 bit Windows first, using the "IsWow64Process" function.