cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (1)
0 Kudos
(2) Replies
Rouslan
Level 4

Did you try /c ""[INSTALLDIR]bin\myBatch.bat" "[BATCHARG]""

?
0 Kudos
Anonymous
Not applicable

That worked!!!

Thank you so much! 😄
0 Kudos