I do not seem to be able to get my script to read variables from the command line. I am trying to pass them this way
setup.exe VAR1=VAL1 VAR2=Value2 etc...
Any Ideas What I could have left out? These variables are not reset to the values passed in through the commandline when I run my uncompressed or compressed Setup.
Also, Can I pass these variables directly to the msi created in an uncompressed build? ( I cannot currently do this but is it possible by running a command line like mymsi.msi /i VARIABLE1=VAL_1 VAR2=Val2 /l=./Install.log
Need Help with supplying CMDLINE variables
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Command line variable values are not locked in unless they are set in a silent setup - they will be overriden by the setup script values otherwise. If you want to parse the command line, you can use the If command with the "Contains" value, or the Parse String command to read command line values.
Additionally, you cannot pass parameters to MSI files directly - you still need to pass them through the EXE file, which will configure the MSI file for you.
Additionally, you cannot pass parameters to MSI files directly - you still need to pass them through the EXE file, which will configure the MSI file for you.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Here's my progress So far
I created a separate script for parsing the Commandline ( if not running in Silentmode)
I call this script AFTER the section of my code that initializes my default variables.
I had to set up a dummy string to represent the CMDLINE since I cannot get the value of the CMDKINE variable in the debugger
I create a custom /p switch
I search my dummy CMDLINE for the presence of the /P
then parse the strings and variables out
I did have to include the values of the variables in " " ( made parsing a lot easier if there are multiple Variables and values.
an Elseif option sure would have been nice in this instance...
When Supplying the variables, I did have to enter \\\\ for \\ even though the value was enclosed in " "
Now I will have to see what happens to these options if I run in Silent mode
I created a separate script for parsing the Commandline ( if not running in Silentmode)
I call this script AFTER the section of my code that initializes my default variables.
I had to set up a dummy string to represent the CMDLINE since I cannot get the value of the CMDKINE variable in the debugger

I create a custom /p switch
I search my dummy CMDLINE for the presence of the /P
then parse the strings and variables out
I did have to include the values of the variables in " " ( made parsing a lot easier if there are multiple Variables and values.
an Elseif option sure would have been nice in this instance...
When Supplying the variables, I did have to enter \\\\ for \\ even though the value was enclosed in " "
Now I will have to see what happens to these options if I run in Silent mode
Who is online
Users browsing this forum: No registered users and 167 guests