No, that really doesn't work on any computer unless the program can already run portably.
When you install a program on Windows, it usually installs files in multiple directories. Some common ones are:
- Obviously the program files folder
- The horrible Windows registry
- %AppData%/Local
- %AppData%/Roaming
- Program Data
Not to mention any drivers or files it installs in sys32, your drivers folder, and any changes to the hosts file.
If you can track down every possible piece and, put it where it goes on a new operating system that has a different folder structure, modify the registry values to point to the correct places, then yes it will work. I prefer to just download and reinstall. I reinstall my OS about every 2-3 months for house cleaning, so I keep backups of all my installers on an HDD. I copy a few files out of AppData so I don't have to reconfigure my settings for a few programs, and I've managed to be able to do it and have everything back and running within a few hours.