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: Running an EXE during uninstall
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
‎Jul 27, 2009
09:18 AM
Running an EXE during uninstall
Researched it heavily - still having problems.
I want to run an exe which the Installer originally put down, upon uninstallation (silent & UI), and I need the exe to itself be uninstalled.
I have my Custom Action and the Conditions are copied over from our previous Wise Installer, which is working correctly. So the Condition to check for just uninstall is right.
I can't deduce from the Wise install source tables what to set for the following CA properties. (In Wise, it is in the InstallExecuteSequence table after the 'StopServices' Action):
1) In-Script Execution (I tried both Immediate Execution & Deferred Execution)
2) Execute Scheduling (I assume this has to be 'Execute Only Once'
3) Install Exec Sequence. (I've tried many values, particularly 'After InstallFiles' but they don't work. I've also tried 'AfterInitialize' but get a Warning)
The exe never runs, and it is also left behind and not removed.
Thanks for any assistance. I'm finding the Sequencing of CA's in MSI a bit confusing.
I want to run an exe which the Installer originally put down, upon uninstallation (silent & UI), and I need the exe to itself be uninstalled.
I have my Custom Action and the Conditions are copied over from our previous Wise Installer, which is working correctly. So the Condition to check for just uninstall is right.
I can't deduce from the Wise install source tables what to set for the following CA properties. (In Wise, it is in the InstallExecuteSequence table after the 'StopServices' Action):
1) In-Script Execution (I tried both Immediate Execution & Deferred Execution)
2) Execute Scheduling (I assume this has to be 'Execute Only Once'
3) Install Exec Sequence. (I've tried many values, particularly 'After InstallFiles' but they don't work. I've also tried 'AfterInitialize' but get a Warning)
The exe never runs, and it is also left behind and not removed.
Thanks for any assistance. I'm finding the Sequencing of CA's in MSI a bit confusing.
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2009
10:18 AM
Ok, I copied the values directly over from the previous CustomAction table.
Type = 162
Source = INSTALLDIR
Target = [INSTALLDIR]MyExe.exe
That Type shows:
Asyncronous (waits for exit code)
Immediate Execution
Always Execute
Absent from Install UI Sequence
Install Exec Sequence - After StopServices.
It now runs, but is not removed afterwards.
Type = 162
Source = INSTALLDIR
Target = [INSTALLDIR]MyExe.exe
That Type shows:
Asyncronous (waits for exit code)
Immediate Execution
Always Execute
Absent from Install UI Sequence
Install Exec Sequence - After StopServices.
It now runs, but is not removed afterwards.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2009
05:14 PM
You probably want to consider changing it from Immediate to Deferred execution, since that's where actions that modify the target computer are recommended to go.
Then, since StopServices and your CA are before RemoveFiles, you can add an entry in RemoveFiles to delete the exe. Look in the Direct Editor for this table.
Hope that helps. If not, write back. 🙂
Then, since StopServices and your CA are before RemoveFiles, you can add an entry in RemoveFiles to delete the exe. Look in the Direct Editor for this table.
Hope that helps. If not, write back. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2009
05:39 PM
An additional option might be to make the action synchronous, to make sure the EXE is done running before trying to remove it...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2009
07:44 AM
Hi,
mlerch, what type of project do you use?
I hardly try to run an EXE during unistallationprocess, too. But it doesn't work, even with your settings.
I'm using a Basic MSI Script and I'm close to insanity because I can't get it to work :eek:
mlerch, what type of project do you use?
I hardly try to run an EXE during unistallationprocess, too. But it doesn't work, even with your settings.
I'm using a Basic MSI Script and I'm close to insanity because I can't get it to work :eek:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2009
10:50 AM
Hi SaberRider,
I had to manually edit the CustomActions table to get the right result.
Here are the columns and their values:
Action: RunMyExecutablePlease
Type: 162
Source: INSTALLDIR
Target: [INSTALLDIR]ExecutableToRun.exe "my params for the exe"
In the Behavior and Logic > Custom Actions and Sequences view you'll see that Type 162 gives Asynchronous (Wait), Immediate Execution, Always Execute.
Then I have it from the Install UI Sequence, and in the Install Exec Sequence I have it "After ProcessComponents"
This is the only way it works for me. I copied these CustomComponent table values directly from our previous msi table. This stuff will drive you to drink, no doubt about it.
Mark
I had to manually edit the CustomActions table to get the right result.
Here are the columns and their values:
Action: RunMyExecutablePlease
Type: 162
Source: INSTALLDIR
Target: [INSTALLDIR]ExecutableToRun.exe "my params for the exe"
In the Behavior and Logic > Custom Actions and Sequences view you'll see that Type 162 gives Asynchronous (Wait), Immediate Execution, Always Execute.
Then I have it
This is the only way it works for me. I copied these CustomComponent table values directly from our previous msi table. This stuff will drive you to drink, no doubt about it.
Mark
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2009
10:51 AM
p.s. - sorry, I didn't answer your question.
I use "Basic MSI" as my project type.
I use "Basic MSI" as my project type.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2009
02:54 AM
Hi,
thank you a lot for your reply... 🙂
Unfortunatelly I'm running in an other error, saying that [INSTALLDIR] (or any other dir I tried) is not part of the "foldertable" ( sorry, got the german version running and I don't know the correct english errormesssage). Any idea about this?
thx again & greetings from germany,
Gøran
thank you a lot for your reply... 🙂
Unfortunatelly I'm running in an other error, saying that [INSTALLDIR] (or any other dir I tried) is not part of the "foldertable" ( sorry, got the german version running and I don't know the correct english errormesssage). Any idea about this?
thx again & greetings from germany,
Gøran
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2009
07:33 AM
I don't know. There isn't a Folder table. Maybe the translation meant the "Directory" table? If so have you looked in there?
If you are manually editing the Tables I highly recommend the excellent Microsoft Windows Installer SDK help file. I don't have a link but you can google it. It gives a complete reference of all the tables, their columns, purpose and so on.
You want to be very careful poking around in there, as there are primary keys, foreign key references and so on. You don't want to mess it up.
Having said that, for my purposes, I'm finding it absolutely essential to work directly with the tables.
I'm still very new to this.
Mark
If you are manually editing the Tables I highly recommend the excellent Microsoft Windows Installer SDK help file. I don't have a link but you can google it. It gives a complete reference of all the tables, their columns, purpose and so on.
You want to be very careful poking around in there, as there are primary keys, foreign key references and so on. You don't want to mess it up.
Having said that, for my purposes, I'm finding it absolutely essential to work directly with the tables.
I'm still very new to this.
Mark