Allow desktop app to be automatically closed by Inno Setup

84 views
Skip to first unread message

Mail Torent

unread,
Mar 7, 2025, 2:52:26 AM3/7/25
to innosetup
Hello,
this question is more C# related, but for sure someone will know.
I have c# windows forms desktop app, and windows service (worker implementing BackgroundService).
I am implementing unattended updates for my app with /verysilent parameter.

I am killing both using taskkill in PrepareToInstall, but if the user in the meantime opens desktop app it screws the installation.

Therefore, as last resort, I am using CloseApplications=yes, and Inno sucessfully closes service, but not desktop app, and installer is stuck. How to make desktop app possible to be closed by inno setup?

Best regards

Andrew Truckle

unread,
Mar 9, 2025, 1:21:09 AM3/9/25
to innosetup
Iris documented how to deal with this via app mutex. 

Mail Torent

unread,
Mar 10, 2025, 3:16:43 AM3/10/25
to innosetup
After some more investigation, I realized inno setup closes GUI apps correctly when installer is not in /verysilent mode.
In /verysilent mode, it only closes services.
So this is most probably some windows restart manager limitation.

Regards
Reply all
Reply to author
Forward
0 new messages