When launching DeployMaster from the command line, you can specify the following parameters:
DeployMaster [filename [/ver version] [/lang language] [/b [/q]]] [/l logfile]
If you specify the file name of a valid DeployMaster setup script, DeployMaster will open it. If the file’s name or the name of the folder it is in contains any spaces, you must enclose it between double quotes.
If DeployMaster can successfully open the file you specified on the command line then it looks for /ver, /lang, and /b parameters. With /ver you can override the Application Version Number specified on the Project page. With /lang you can override the language selected on the Language page. You have to place the version number or language immediately after the parameter but separated from it with a space. If the version number or language have spaces within them then you must enclose them with double quotes.
If you pass the /b parameter then DeployMaster builds your setup file and then quits. This is useful if you are using a makefile or a similar tool to automate building your application.
If the file name and /b are both specified, DeployMaster looks for the /q parameter. If present, DeployMaster runs in quiet mode. It will build your installer without showing itself. Otherwise, DeployMaster’s window appears and shows its progress on the Build page.
If your build process is unattended, you may want to save a log of the build process so you can inspect it later if anything went wrong. Pass the /l parameter followed by the full path to the log file. If the path has spaces in it, you must enclose it with double quotes. When DeployMaster finishes, it writes the all the text shown on the Build page to the log file. This works regardless of whether you passed the /q parameter.
For example, this command line builds MySetup.deploy
If you’re using a batch file or a build tool that uses I/O redirection, you can use DeployMasterCmd.exe instead of DeployMaster.exe to have the build output appear on the console or sent to standard output:
DeployMasterCmd [filename [/ver version] [/lang language] [/b [/q]]] [/l logfile] [/v]
DeployMasterCmd.exe accepts all the same parameters as DeployMaster.exe. If you run it without any parameters, DeployMaster shows up as normal. The only difference is that the console waits while DeployMasterCmd.exe is running and display any progress shown on the Build tab in DeployMaster. If you don’t want DeployMaster to appear when using DeployMasterCmd.exe, you need to specify the full path to a DeployMaster setup script along with the /b and /q parameters.
DeployMasterCmd.exe does take one extra parameter. By default, DeployMasterCmd.exe only sends headline messages, errors, and warnings to the console or standard output. Specify the /v parameter to turn on “verbose” mode. Then everything that appears on the Build tab in DeployMaster is be written to the console or standard output. The /v parameter does not affect the /l parameter. The log file is always verbose.
If you include DeployMaster in an automated build process, you may want to abort the build if DeployMaster encounters an error while building your installer. To make this possible, DeployMasterCmd.exe returns an exit code that indicates whether any warnings or errors occurred. The exit code is 3 if there was a fatal error that prevented the installer from being built. The exit code is 2 if there was an error that may prevent proper operation of your installer, but the installer was built anyway. The exit code is 1 if there were any warnings that suggest ways to improve your installer.
In most situations, you’ll want to abort your build process if the exit code is 2 or higher. If your automated build process is a batch file, you can put this line after the line that runs DeployMasterCmd.exe to terminate the batch file if the exit code is 2 or higher:
@if errorlevel 2 exit 2
In Windows batch files, the if errorlevel command tests whether the exit code of the previous command is equal to or greater than the number you specified. So if errorlevel 1 tests whether there were any warnings or errors, if errorlevel 2 test whether there were any errors (fatal or not), and if errorlevel 3 tests whether there were any fatal errors. The exit command terminates the batch file with an exit code of its own.