Archive: Use 32-bit NSIS with FindWindow under 64-bit


Use 32-bit NSIS with FindWindow under 64-bit
I'm having a problem with my 32-bit installer under 64-bit where I use FindWindow to search to see if there is a version of my app running (in order to kill it before installing). However, FindWindow doesn't seem to work under 64-bit (I assume because it's using 32-bit HWND given that it's compiled as 32-bit and in x64 Windows, HWNDs are 64-bit).

Does anybody know of a solution to this problem?


MSDN actually says HWNDs can be shared. Are you sure that is what's going on? Have you tried using Spy++ or a similar HWND spying application to verify this?