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: Setting Session.Property with a variable
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
Aug 26, 2011
02:37 PM
Setting Session.Property with a variable
Hopefully this just another dumb Session.Property question - couldn't find it answered anyway.
VBScript custom action in a Basic MSI project, running in Immediate mode.
I'd like to set a number of MSI properties using a loop, setting a different property in each iteration. I load an array with the property names that I want...
arrPropName(0) = "INST_ONE"
arrPropName(1) = "INST_TWO"
{and so forth}
then during the loop (For loop, indexed by numServ)
strPropName = arrPropName(numServ)
{and later}
Session.Property(strPropName) = strInstanceNames
I know from testing the VBS outside of the installer that strPropName is correct. So is strInstanceName. But setting the MSI property is just not working.
Can I not set Session.Property defined by a variable this way? Am I making some other obvious blunder or novice mistake??
Thanks for your eyes -
VBScript custom action in a Basic MSI project, running in Immediate mode.
I'd like to set a number of MSI properties using a loop, setting a different property in each iteration. I load an array with the property names that I want...
arrPropName(0) = "INST_ONE"
arrPropName(1) = "INST_TWO"
{and so forth}
then during the loop (For loop, indexed by numServ)
strPropName = arrPropName(numServ)
{and later}
Session.Property(strPropName) = strInstanceNames
I know from testing the VBS outside of the installer that strPropName is correct. So is strInstanceName. But setting the MSI property is just not working.
Can I not set Session.Property defined by a variable this way? Am I making some other obvious blunder or novice mistake??
Thanks for your eyes -
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 27, 2011
06:06 AM
I think you need Session.Property("INST_ONE") = strInstanceNames
and not Session.Property(strPropName) = strInstanceNames.
and not Session.Property(strPropName) = strInstanceNames.