How to make created via Innosetup uninstaller not run if installer is on build via Innosetup and currently installing (installer and uninstaller are made from same source file)?
Asked
Active
Viewed 524 times
2
-
I wonder whom in his right mind would install and uninstall a product at the same time. – Sertac Akyuz May 25 '12 at 15:26
-
Use AppMutex, it will try and protect against multiple instances – Deanna May 25 '12 at 16:52
-
only if app is on - not if only installer and uninstaller are. – myWallJSON May 25 '12 at 16:59
-
@myWall - I doubt any beta tester with his right mind would test this.. And if he does, so what? He could equally test what happens when he deletes the temporary folder after setup has extracted files etc.. Anyway, if you're determined to do this you can write your own dll that would create/check a mutex etc.. – Sertac Akyuz May 25 '12 at 17:22
1 Answers
1
If AppMutex
doesn't protect against this already, you can add code to both the install and uninstall to use CheckForMutexes()
and CreateMutex()
. If CheckForMutexes()
returns true, you can then exit. this will essentially replace the AppMutex
support and can check for your application too.

Deanna
- 23,876
- 7
- 71
- 156