I used to help develop installers for software on Windows platforms... if you think it's a nightmare as a user, it's even worse for the poor programmers!
The Windows DLL and COM system is complex, and DLLs/EXEs can easily get held open even though it looks like you've quit the program. The "protection" system against corruption and malware in recent versions of Windows causes even more grief. If you try to upgrade a program, sometimes one or two DLLs may fail to update because a COM object is still active - leaving you with an inconsistent program.
The safest bet is usually to reboot, completely uninstall the old version, reboot again, install the upgraded version (with administrator privileges), reboot again, and *then* run the program. Of course, that's a pain in the proverbial so most of us just take shortcuts and upgrade in place and/or skip a few reboots