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
- :
- please help: using custom command line args
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 09, 2010
02:00 PM
please help: using custom command line args
I've got a Basic MSI project. I'm passing in some custom command line arguments via the following format...
setup.exe /v"ISSCRIPTCMDLINE=\"-zTEST\""
according to some info i've found online, this should result in the CMDLINE variable holding the string TEST.
I want to take this string and use it inside a custom action that runs an executable... so, for example, I want my custom action to run "myscript.bat /f [CMDLINE]"
When i do this, it ends up just running "myscript.bat /f" -- why is it not running "myscript.bat /f TEST"?
What am i doing wrong? Is this even possible?
Thanks in advance.
-Chad
setup.exe /v"ISSCRIPTCMDLINE=\"-zTEST\""
according to some info i've found online, this should result in the CMDLINE variable holding the string TEST.
I want to take this string and use it inside a custom action that runs an executable... so, for example, I want my custom action to run "myscript.bat /f [CMDLINE]"
When i do this, it ends up just running "myscript.bat /f" -- why is it not running "myscript.bat /f TEST"?
What am i doing wrong? Is this even possible?
Thanks in advance.
-Chad
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 15, 2010
02:43 AM
Declare a public property MYCMDLINE.
run setup.exe /v"MYCMDLINE=TEST"
In custom action use
MsiGetProperty(ISMSI_HANDLE, "MYCMDLINE",szCmdLine, nvBufferSize); and use szCmdLine while calling batch file.
run setup.exe /v"MYCMDLINE=TEST"
In custom action use
MsiGetProperty(ISMSI_HANDLE, "MYCMDLINE",szCmdLine, nvBufferSize); and use szCmdLine while calling batch file.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 02, 2010
05:48 PM
I am also using Basic MSI.
What if I may (or may not) have multipe command options? E.g.
setup.exe /v"MYCMDLINE1=TEST1 MYCMDLINE2=TEST2 MYCMDLINE3=TEST3"
Is there any way to catch the whole commandline (i.e. setup.exe /v"MYCMDLINE1=TEST1 MYCMDLINE2=TEST2 MYCMDLINE3=TEST3")? I hope there is a property I can use in VBS.
What if I may (or may not) have multipe command options? E.g.
setup.exe /v"MYCMDLINE1=TEST1 MYCMDLINE2=TEST2 MYCMDLINE3=TEST3"
Is there any way to catch the whole commandline (i.e. setup.exe /v"MYCMDLINE1=TEST1 MYCMDLINE2=TEST2 MYCMDLINE3=TEST3")? I hope there is a property I can use in VBS.