This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: InstallScript event handler question
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2007
03:03 PM
InstallScript event handler question
Okay, I have an inherited InstallScript project that I am working with. The project uses "program ... endprogram" (so, if you don't know what I'm talking about, chances are you can't help me). I know this is not ideal. I'd love to change it, but updating 4000+ lines of InstallScript by myself when I maintain a good two dozen or so other installers isn't exactly time practical.
Anyway, for years now it has come along fine. Recently, I've had to make some changes that require little applets we wrote internally to be run during install. Obviously, this initiates changes that the installation project isn't aware of. One of the changes also requires that I run an applet on uninstall to undo some things we're doing during install. So here's my issue. There's no "uninstall" routine now. As near as I can figure, "uninstalling" from Add/Remove Programs simply removes the files and registry entries that the install project put there; it's automatic, or so it seems. I see no place in the code that appears to be any form of intentional uninstall routine.
So I have nowhere to add a LaunchAppAndWait to kick off this app. Given the nature of the project, if I add an OnUninstall event handler, will it even execute? If not, is there some way that I can guarantee that this gets executed?
Thanks,
Mark
Anyway, for years now it has come along fine. Recently, I've had to make some changes that require little applets we wrote internally to be run during install. Obviously, this initiates changes that the installation project isn't aware of. One of the changes also requires that I run an applet on uninstall to undo some things we're doing during install. So here's my issue. There's no "uninstall" routine now. As near as I can figure, "uninstalling" from Add/Remove Programs simply removes the files and registry entries that the install project put there; it's automatic, or so it seems. I see no place in the code that appears to be any form of intentional uninstall routine.
So I have nowhere to add a LaunchAppAndWait to kick off this app. Given the nature of the project, if I add an OnUninstall event handler, will it even execute? If not, is there some way that I can guarantee that this gets executed?
Thanks,
Mark
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2007
08:23 PM
It is my understanding that install events do not get called when the InstallScript code uses program...endprogram.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2007
08:43 AM
(As an aside, the "OnShowUI" help topic describes a simple way to convert from a program...endprogram procedural script to an event-driven script.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2007
08:48 AM
That would certainly be a good thing. I shall look into that. Thanks for the tip.