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: Access INSTALLDIR from deferred execution 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
‎Mar 21, 2008
11:01 AM
Access INSTALLDIR from deferred execution during uninstall
I have a InstallScript Custom Action that:
1. Has to be run in system context.
2. Needs to retrieve the INSTALLDIR public property.
To meet the requirements:
A. The custom action is inserted to Execute Sequence after InstallInialize as a "Deferred Execution in System Context".
B. Call MsiGetProductInfo(...) to retrieve INSTALLPROPERTY_INSTALLLOCATION.
Problem:
The MsiGetProductInfo retrieved an empty INSTALLDIR.
So, I moved the custom action to "Aftert CostFinalize" and also has to change it to Immediate Execution because deferred Execution is not allow there.
New Problem:
This time, the INSTALLDIR was retrieved correctly. But, Immediate Execution can't run in system context.
Anyone can help me out?
Thanks ahead!!!
1. Has to be run in system context.
2. Needs to retrieve the INSTALLDIR public property.
To meet the requirements:
A. The custom action is inserted to Execute Sequence after InstallInialize as a "Deferred Execution in System Context".
B. Call MsiGetProductInfo(...) to retrieve INSTALLPROPERTY_INSTALLLOCATION.
Problem:
The MsiGetProductInfo retrieved an empty INSTALLDIR.
So, I moved the custom action to "Aftert CostFinalize" and also has to change it to Immediate Execution because deferred Execution is not allow there.
New Problem:
This time, the INSTALLDIR was retrieved correctly. But, Immediate Execution can't run in system context.
Anyone can help me out?
Thanks ahead!!!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 21, 2008
12:12 PM
redbox wrote:
I have a InstallScript Custom Action that:
1. Has to be run in system context.
2. Needs to retrieve the INSTALLDIR public property.
To meet the requirements:
A. The custom action is inserted to Execute Sequence after InstallInialize as a "Deferred Execution in System Context".
B. Call MsiGetProductInfo(...) to retrieve INSTALLPROPERTY_INSTALLLOCATION.
Problem:
The MsiGetProductInfo retrieved an empty INSTALLDIR.
So, I moved the custom action to "Aftert CostFinalize" and also has to change it to Immediate Execution because deferred Execution is not allow there.
New Problem:
This time, the INSTALLDIR was retrieved correctly. But, Immediate Execution can't run in system context.
Anyone can help me out?
Thanks ahead!!!
Search for "CustomActionData" and there should be several topics that explain it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 21, 2008
12:27 PM
Thanks for the reply. Actually I tried CustomActionData before and it didn't work. Some of my custom actions use the CustomActionData mechanism during install. But it doesn't seem to be working for uninstall. I understand that only a few properties are available during uninstall time. I set the CustomActionDAta to [ARPINSTALLLOCATION], which InstallShield2008 has automatically made available during uninstall time.
alegerlotz wrote:
Search for "CustomActionData" and there should
be several topics that explain it.