Can InnoSetup execute a program before the uninstallation starts? My program creates some registry values. I have an executable that can remove those registry values and my question is, can InnoSetup run that executable before the uninstallation starts?
Asked
Active
Viewed 7,222 times
1 Answers
13
See the documentation on Setup Script Sections
, particularly the UninstallRun
one at the bottom of the tree:
[UninstallRun]
Filename: "{app}\INIT.EXE"; Parameters: "/x"
If you need to do something more complex, you can also do it in code using the Pascal scripting functionality in InnoSetup. See UninstallCodeExample1.iss' in the
InnoSetup 5\Examples` folder.

Ken White
- 123,280
- 14
- 225
- 444
-
The first line works: Filename: "{app}\INIT.EXE"; Parameters: "/x" – MCSharp Dec 24 '12 at 17:00
-
The second two lines aren't even valid in an `[UninstallRun]` section. But never mind as they're irrelevant to the solution anyway. – Miral Dec 25 '12 at 21:43
-
@Miral: They were copied from the Inno Setup documentation directly (from the link I provided). I should have read more carefully. I'll make the correction - thanks for the information. :-) – Ken White Dec 26 '12 at 00:47