Reputation: 11399
In Inno Setup, there is the AppMutex
directive.
Using this directive, one can make Inno Setup stop / not start while this mutex exists.
I experience it sometimes that my users accidentally open my application while the setup (and update in this case) is still running. This locks files, and Inno Setup can not replace them.
The solution in my opinion would be that Inno Setup creates a mutex and automatically closes it when it's finished.
When the user starts my app, the app would check if the mutex (which was created by Inno Setup) exists, and if it does, my app would close right away.
However, I do not find this as a built-in option in Inno Setup.
Do I have to code it manually, or am I missing something?
Thank you!
Upvotes: 1
Views: 58
Reputation: 202474
That's what SetupMutex
directive does.
Or you can do it programmatically using CreateMutex
function.
Upvotes: 1