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: Upgrading InstallShieldX to InstallShield2008
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
‎May 15, 2008
12:11 PM
Upgrading InstallShieldX to InstallShield2008
I am upgrading an InstallScript MSI project from InstallShieldX to InstallShield2008. In X I used events OnMoving and OnMoved to execute several functions. This worked great in X but failed in 2008. I found an upgrade document and converted the OnMoving function into export prototype MyOnMoving(HWND) and added it as a "Deferred execution in system context" Custom Action after InstallInitialize as detailed in the document. It executes but MsiGetProperty returns all properties as "". I no longer have access to the global Property variables and MsiEvaluateCondition fails with the error Invalid handle or conditional expression syntax error. The same steps were used to convert OnMoved to MyOnMoved.
I need to execute the functions to set and revoke registry, service and folder security for the product being installed. I assumed using the HWND passed to MyOnMoving would give me access to the global properties I set using MsiSetProperty earlier in the installer. I had easy access to these global properties in InstallShieldX. Do I need to export the other functions? Any suggestions?
I need to execute the functions to set and revoke registry, service and folder security for the product being installed. I assumed using the HWND passed to MyOnMoving would give me access to the global properties I set using MsiSetProperty earlier in the installer. I had easy access to these global properties in InstallShieldX. Do I need to export the other functions? Any suggestions?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2008
03:10 PM
InstallScript functions that are called as InstallScript custom actions no longer have access to global variables and pointers. As a result, if you need to store a value across multiple InstallScript custom action calls, you must use some external mechanism such as the registry, Windows Installer properties, or an external data file to store the information between calls.
If you choose to use Windows Installer properties in deferred, commit, or rollback InstallScript custom actions, see the guidelines in the "Windows Installer Properties and Deferred, Commit, and Rollback InstallScript Custom Actions" section of the following help topic:
Upgrading InstallShield 11.5 or Earlier InstallScript MSI Projects
I hope that helps.
If you choose to use Windows Installer properties in deferred, commit, or rollback InstallScript custom actions, see the guidelines in the "Windows Installer Properties and Deferred, Commit, and Rollback InstallScript Custom Actions" section of the following help topic:
Upgrading InstallShield 11.5 or Earlier InstallScript MSI Projects
I hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
11:00 AM
Thanks for the quick reply. I found some links which helped and was able to get the install working but priority changes have kept me off this project.
I changed my InstallScript functions called in OnInstalled and similiar events to custom actions: I modified the code to export prototype and added them to the Custom Action list, immediate execution. I inserted them after InstallFinalize and they seem to be working again.This may not be the best way to do it but I needed to get the installer working ASAP.
The documentation said to change them to Defered Execution in System Context but you have to pass all the properties in CustomActionData and parse them back out, use the registry to pass parameters or some other method to get the modified properties.
I found the following helpfull links after much searching:
http://community.installshield.com/showthread.php?t=169870
http://community.installshield.com/showthread.php?t=167564
I changed my InstallScript functions called in OnInstalled and similiar events to custom actions: I modified the code to export prototype and added them to the Custom Action list, immediate execution. I inserted them after InstallFinalize and they seem to be working again.This may not be the best way to do it but I needed to get the installer working ASAP.
The documentation said to change them to Defered Execution in System Context but you have to pass all the properties in CustomActionData and parse them back out, use the registry to pass parameters or some other method to get the modified properties.
I found the following helpfull links after much searching:
http://community.installshield.com/showthread.php?t=169870
http://community.installshield.com/showthread.php?t=167564
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)