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: Custom Action and Component condition
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Anonymous
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
11:41 AM
Custom Action and Component condition
Using a Basic MSI Project,
I have created a Property named PRODUCT_INSTALLED with value "No".
I have a custom action which checks to see if a file exists and if it does it uses MsiSetProperty(hMSI,"PRODUCT_INSTALLED", "Yes"); to set the new value.
I also have a component called "Product" this has the condition PRODUCT_INSTALLED="Yes"
This works when running a normal install via the User Interface. However this does not work if i run via the command line - msiexec /i product.msi /quiet
I have tried the Custom Action to be both immediate and deferred. I have also changed the sequence in which the CA runs.
Any advice would be great.
Thanks
I have created a Property named PRODUCT_INSTALLED with value "No".
I have a custom action which checks to see if a file exists and if it does it uses MsiSetProperty(hMSI,"PRODUCT_INSTALLED", "Yes"); to set the new value.
I also have a component called "Product" this has the condition PRODUCT_INSTALLED="Yes"
This works when running a normal install via the User Interface. However this does not work if i run via the command line - msiexec /i product.msi /quiet
I have tried the Custom Action to be both immediate and deferred. I have also changed the sequence in which the CA runs.
Any advice would be great.
Thanks
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
06:12 PM
(As an aside, a system search might be a better way to handle this.)
In any case, you'll want the action to be scheduled before CostFinalize if you're using it as a component condition; perhaps place it in both the UI and Execute sequences to ensure it runs for both graphical and silent installations?
In any case, you'll want the action to be scheduled before CostFinalize if you're using it as a component condition; perhaps place it in both the UI and Execute sequences to ensure it runs for both graphical and silent installations?
Anonymous
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 04, 2008
03:42 AM
After some investigating in turns out that the test that I perform on a folder path does not work correctly.
I have my path set to INSTALLDIR ^ "Folder" ^ "SubFolder".
This only works after CostFinalize but like you said I need to set the PRODUCT_INSTALLED value before CostFinalize.
It is OK to hardcode the path as there is only one install location and this seems to work fine.
Although is there an alternative to using INSTALLDIR?
I have my path set to INSTALLDIR ^ "Folder" ^ "SubFolder".
This only works after CostFinalize but like you said I need to set the PRODUCT_INSTALLED value before CostFinalize.
It is OK to hardcode the path as there is only one install location and this seems to work fine.
Although is there an alternative to using INSTALLDIR?