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: PowerShell Custom Action retrieve MSI Properties in Deferred Mode
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
‎Feb 10, 2016
11:27 AM
PowerShell Custom Action retrieve MSI Properties in Deferred Mode
We are looking for a way to retrieve our MSI Properties in a custom PowerShell Action that runs in deferred mode. The properties are being set during the UI sequence (or silently) and the file gets copied to the local server and run. We were hoping to use something like get-property but that is returning blank.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 29, 2016
09:36 AM
I think the answer to the question is "yes".
It took me a while to figure it out, but I am able to get the value of the INSTALLDIR property into a PowerShell script that runs in deferred execution. To do so, follow the standard steps for making a property accessible in deferred execution as described here. For Step 3., using the following PowerShell command to get the property you are looking for:
Note that the "name" part of the PowerShell command is not INSTALLDIR as one might think.
The next challenge is to figure-out if it's possible to pass more than one property via the CustomDataAction variable. So far, I've only passed the one INSTALLDIR variable... I'm not sure what would happen if I tried to pass more than that.
It took me a while to figure it out, but I am able to get the value of the INSTALLDIR property into a PowerShell script that runs in deferred execution. To do so, follow the standard steps for making a property accessible in deferred execution as described here. For Step 3., using the following PowerShell command to get the property you are looking for:
$value = Get-Property -Name CustomDataAction
Note that the "name" part of the PowerShell command is not INSTALLDIR as one might think.
The next challenge is to figure-out if it's possible to pass more than one property via the CustomDataAction variable. So far, I've only passed the one INSTALLDIR variable... I'm not sure what would happen if I tried to pass more than that.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 09, 2022
07:31 AM
Hello there is a mistake in your script.
You have: $value = Get-Property -Name CustomDataAction
It should be $value = Get-Property -Name CustomActionData
Took me a while to figure out why my scripot wasn't working.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 07, 2016
03:04 PM
OneDayBehind wrote:
I think the answer to the question is "yes".
It took me a while to figure it out, but I am able to get the value of the INSTALLDIR property into a PowerShell script that runs in deferred execution. To do so, follow the standard steps for making a property accessible in deferred execution as described here. For Step 3., using the following PowerShell command to get the property you are looking for:$value = Get-Property -Name CustomDataAction
Note that the "name" part of the PowerShell command is not INSTALLDIR as one might think.
The next challenge is to figure-out if it's possible to pass more than one property via the CustomDataAction variable. So far, I've only passed the one INSTALLDIR variable... I'm not sure what would happen if I tried to pass more than that.
You can set the CustomActionData for one LONG continuous stream of information delimited by ";" and the run a FOR loop to break it back down in to an array. I have done this in the past with VBScript which I am now trying to convert to PowerShell.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 16, 2016
01:36 PM
Make sure your properties being set are in ALL UPPERCASE or they will not survive from the UISequence to the ExecuteSequence.
