In the Win95 GUI, the title of the Explorer Window included the full path - e.g. C:\BuildScripts
- whereas in later version (our QA is using Win7 and Win8) the title is now the folder name - e.g. BuildScripts
.
Therefore, if your installation folder has the same name as your product, FindWindow
cannot differentiate between the open Explorer window and your product.
This is why the problem only arises if you uninstall from Explorer, and does not happen if you uninstall from the uninstall icon in the start menu.
Solutions:
- Don't use the same name for your installation folder and your product.
- Use the "class" parameter in
FindWindow