Offer explorer.exe restart instead of full reboot on uninstall#24
Conversation
During uninstall, if a restart is needed (DLL locked by explorer), prompt the user to restart explorer.exe instead of requiring a full system restart. If the user agrees, kill explorer.exe and restart it; otherwise inform them that uninstallation will complete on next system restart. Add RestartExplorerPrompt and RestartPendingMessage custom messages in all five supported languages (English, French, Spanish, German, Italian). Co-authored-by: pg94au <5140674+pg94au@users.noreply.github.com>
|
@copilot The installer build failed. Runs on my local machine though. I have Inno Setup 6.6.1 installed locally. |
Inno Setup requires NeedsRestart to be called as a function with parentheses. The bare identifier caused an "Unknown identifier" compile error on line 177. Co-authored-by: pg94au <5140674+pg94au@users.noreply.github.com>
Fixed in commit |
|
@copilot Build of the installer is still broken, no? |
NeedsRestart is not available in the uninstall event handler context
in the version of Inno Setup used by CI, causing an Unknown identifier
compile error. Instead, check directly whether
ConvertsterContextMenuHandler.dll still exists in {sys}: the file only
remains there after uninstall if explorer.exe had it locked (triggering
the uninsrestartdelete path), which is exactly the condition we need.
Co-authored-by: pg94au <5140674+pg94au@users.noreply.github.com>
Fixed in commit |
RestartExplorerPromptandRestartPendingMessagecustom messages in all 5 languages (en, fr, es, de, it) toInstaller.issCurUninstallStepChangedPascal Script procedure that atusPostUninstall: if restart is needed, prompts the user to restartexplorer.exe; kills and restarts explorer on yes (using{sys}\taskkill.exewith result-code checking); shows restart-pending message on noNeedsRestart→FileExists(ExpandConstant('{sys}\ConvertsterContextMenuHandler.dll'))— avoids theNeedsRestartidentifier which is unavailable in the uninstall event handler context of the CI Inno Setup versionOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.