Hello Donny,
Yes, Windows 7 will know which folder to install the program in by default. The C:\Program Files folder is for 64-bit (x64) programs, and C:\Program Files (x86) folder is for 32-bit (x86) programs.
If the program gives you an option to select where to install it at, then you can select a location of you choice on the D drive to install it on. However, programs install more files than just what is in one of the Program Files folders, and often have files installed all over the place for user settings and etc.....
Hope this helps,
Shawn