Any custom installed programs run from where the destination is. The registry entires created by the initial installation point to those locations. You can install program folders to a cecond partition if the installer offers this. Otherwise the program installs to a default location on the primary.
The program folders are not the only locations for most programs. Different types of settings like preferences and projects worked on are saved in places like the MyDocuments folder or application data along installation logs stored in temporary folders as well. To move is to reinstall for most programs. With some smaller self contained programs you simply create a desktop shortcut after copy it's folder from one to another in order to have it run. But not too many are like that.