cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kentfishman
Level 3

property passed on setup.exe command line not available during install

I have a basic msi. I have added a text box to the InstallWelcome dialog with the text field set as MYPROP=[MYPROP]. I run the following command:
setup.exe /v"MYPROP=abc"
When the InstallWelcome dialog is displayed, I see MYPROP=
I would expect to see MYPROP=abc

When I perform the same steps, setting INSTALLDIR=abc on the command line and setting INSTALLDIR=[INSTALLDIR] on the InstallWelcome dialog, I can see the value I passed to INSTALLDIR on the command line.
I was under the impression setting command line properties overrode all other properties except those set by the operating environment.
At what point in the UI or Execute sequence are properties set on the command line available for use during the install?
Labels (1)
0 Kudos
11 Replies
RobertDickau
Flexera Alumni

That should work, and a simple test at this end seems to turn out okay. If you create an MSI log file when you launch your installer, there should be a line like this:

MSI (c) (77:77) [25:49:81:121]: Command Line:MYPROP=abc SETUPEXEDIR=C:\InstallShield 2012 Spring Projects\Throwaway\a\1\DiskImages\DISK1 SETUPEXENAME=setup.exe ...

In any case, as you say, properties set at the command line should be available right away.
0 Kudos
kentfishman
Level 3

I tried this on a new basic msi and it failed to display the property value in the text box. I checked the log files for both and they looked ok.
Command Line: BIFF=hello SETUPEXEDIR=C:\InstallShield 2012 Spring Projects\My Project Name-2\PROJECT_ASSISTANT\SINGLE_EXE_IMAGE\DiskImages\DISK1 SETUPEXENAME=setup.exe CURRENTDIRECTORY=C:\InstallShield 2012 Spring Projects\My Project Name-2\PROJECT_ASSISTANT\SINGLE_EXE_IMAGE\DiskImages\DISK1 CLIENTUILEVEL=0 CLIENTPROCESSID=4776

So why doesn't something simple like this work for me?
0 Kudos
RobertDickau
Flexera Alumni

I don't see an obvious reason that would happen in a new project, without something like a typo in the property name (MYPROP=[MUPROP]) or a bad space between the brackets (MYPROP=[MYPROP_]). Could you zip up and attach the new project file?
0 Kudos
kentfishman
Level 3

I have included a zip file of the project. I have created an InstallScript MSI and it too does not display properties after doing a msigetproperty. I have tried to get INSTALLDIR and it always comes up blank.
0 Kudos
RobertDickau
Flexera Alumni

The value not showing up in InstallScript MSI could be a separate issue. InstallScript dialog boxes don't expand [PROP] expressions, and MsiGetProperty needs a bit of prep (such as setting a buffer size) to return a value.
0 Kudos
RobertDickau
Flexera Alumni

Strange---it works at this end. Running setup /v"MYPROP=something" shows the attached. What OS are you using?

0 Kudos
Christopher_Pai
Level 16

Post the MSI log so we can see:

1) CommandLine received by msiexec
2) Any custom actions that might be resetting the property
3) Value of SecureCustomProperties property
0 Kudos
kentfishman
Level 3

I am running on a Windows7 Enterprise, SP1.
Attached is the log file created when I ran:



setup.exe /v"/l*v C:\temp\temp2.log" /v"MYPROP=hello"
0 Kudos
Christopher_Pai
Level 16

Your log tells me that MYPROP is a restricted public property not a secure custom property.


Property(C): SecureCustomProperties = ISFOUNDNEWERPRODUCTVERSION;USERNAME;COMPANYNAME;ISX_SERIALNUM;SUPPORTDIR;INSTALLDIR

MSI (c) (38:B0) [08:29:59:918]: Ignoring disallowed property MYPROP

See: http://kb.flexerasoftware.com/doc/Helpnet/installshield14helplib/SetRestrictedPublicProp.htm
0 Kudos
kentfishman
Level 3

Thank you so much, Christopher. Your suggestion did the trick.
0 Kudos
Christopher_Pai
Level 16

Good to hear.
0 Kudos