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: property passed on setup.exe command line not available during install
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 07, 2013
11:46 AM
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?
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?
(11) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2013
12:48 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2013
01:51 PM
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?
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2013
03:18 PM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2013
05:22 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2013
07:53 PM
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
1) CommandLine received by msiexec
2) Any custom actions that might be resetting the property
3) Value of SecureCustomProperties property
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 08, 2013
10:24 AM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 08, 2013
12:52 PM
Thank you so much, Christopher. Your suggestion did the trick.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 08, 2013
02:00 PM
Good to hear.