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
- :
- Multiple Command Line Args in Custom Action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)
Anonymous
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 05, 2010
11:05 AM
Multiple Command Line Args in Custom Action
In my Basic MSI, the following Custom Action to run my batch file works just fine:
Executable Filename:\cmd.exe
Command Line: /c "[INSTALLDIR]bin\myBatch.bat"
But I can't seem to figure out how to pass an argument to that batch file.
I tried:
Command Line: /c "[INSTALLDIR]bin\myBatch.bat" [BATCHARG]
Command Line: /c "[INSTALLDIR]bin\myBatch.bat" "[BATCHARG]"
Command Line: /c "[INSTALLDIR]bin\myBatch.bat [BATCHARG]"
But when it runs during installation I get an error 1722.
Does anyone know how to do this properly?
Thanks.
Executable Filename:
Command Line: /c "[INSTALLDIR]bin\myBatch.bat"
But I can't seem to figure out how to pass an argument to that batch file.
I tried:
Command Line: /c "[INSTALLDIR]bin\myBatch.bat" [BATCHARG]
Command Line: /c "[INSTALLDIR]bin\myBatch.bat" "[BATCHARG]"
Command Line: /c "[INSTALLDIR]bin\myBatch.bat [BATCHARG]"
But when it runs during installation I get an error 1722.
Does anyone know how to do this properly?
Thanks.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 06, 2010
12:46 AM
Did you try /c ""[INSTALLDIR]bin\myBatch.bat" "[BATCHARG]""
?
?
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)
Anonymous
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 06, 2010
09:38 AM
That worked!!!
Thank you so much! 😄
Thank you so much! 😄
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)