Command Line Options

Setup Factory's design time and run time support various command line options that can be passed, thus providing developers and network administrators more control over the install, uninstall and build process.

Tip: The global variable _CommandLineArgs can be used to determine what arguments were passed to the installation executable.

The available command line options are grouped into the following three categories:

 

Install Command Line Options

The following command line options are supported by the Setup Factory installer:

/S:<<optional ini file>>

Allow an install to be run in silent mode. As a result, no screens or dialogs will be shown. If /S is passed on the command line it will set the global variable _SilentInstall to true if the Enable silent/unattended install option is selected in project settings.

This command line option also has an optional INI file that can be passed containing session variable values. For example:

 

"C:\output\setup.exe" "/S:C:\setupvars.ini"

This will cause the session variables in the INI file to be used for the setup. The INI file should be in the format:

[SetupValues]

%AppFolder%=C:\Program Files\Your Product 2
%UserName%=Joe Blow
%Whatever%=Who knows

 

/T:<<file path>>

Every setup executable requires some temporary space on the user's hard drive during the installation process. By default, Setup Factory uses the user's TEMP directory for extracting temporary files and other miscellaneous operations. You can force the setup executable to use an alternate directory by using the /T command line option.

The syntax for the /T option is:

/T:<<file path>>

Replace "<<file path>>" with the path to the folder you want the setup executable to use for its temporary files. (Be sure to put quotes around the entire argument if the path includes any spaces.) If the folder doesn't already exist on the user's system, it will be created automatically.

For example:

 "C:\Downloads\setup.exe" "/T:C:\My Temp Dir"

(forces the installer to use "C:\My Temp Dir" for temporary files)

/NOINIT

This command line option hides the "initializing..." dialog that appears when extracting dependency or primer files at the beginning of the install.

/W

This command line option forces the Setup Factory launcher of a multi-segment install to wait for the setup executable to return before exiting. This is useful if you're running the installer from another process and you want that process to wait for Setup Factory to finish before proceeding.

Note: This only applies to muti-segment setups since Web (Single File) setups always wait for return.

Note: It is best not to use the /W option on very large multi-segment installs because errors may occur due to memory issues. If the /W command line option is not used, the setup return code will always be 0 since it is being returned after the launcher performs the initial extraction.

 

Uninstall Command Line Options

The following command line options are supported by the Setup Factory uninstall program:

/S:<<optional ini file>>

Allow an uninstall to be run in silent mode. As a result, no screens or dialogs will be shown. If /S is passed on the command line it will set the global variable _SilentInstall to true if the Allow silent uninstall option is selected in uninstall settings.

This command line option also has an optional INI file that can be passed containing session variable values. For example:

Note: The /U command line option also must be used when calling the uninstall program. See /U for details.

"C:\Windows\MyProduct\uninstall.exe" "/U:C:\Program Files\MyProduct\MyProduct.xml" "/S:C:\setupvars.ini"

This will cause the session variables in the INI file to be used for the uninstall. The INI file should be in the format:

[UninstallValues]

%UserName%=Joe Blow
%Whatever%=Who knows

 

/U:<<INI config file>>

This command line option must be used when calling the uninstall program from the command line. This command also has an optional INI file that can be passed containing session variable values. For example:

 

"C:\Windows\MyProduct\uninstall.exe" "/U:C:\Program Files\MyProduct\MyProduct.xml"

This will cause the session variables in the INI file to be used for the uninstall. The INI file should be in the format:

[UninstallValues]

%UserName%=Joe Blow
%Whatever%=Who knows

 

Unattended Build Options

The following command line options are used supported by Setup Factory's design environment for an unattended build process:

Note: The unattended build returns 0 as a process return code if successful, or non-zero if not. You can use this return code to make your batch files respond to the success or failure of the Setup Factory build process.

/BUILD

Tells Setup Factory to build the project file passed in on the cmd line or from a batch file. For example:
"C:\Program Files\Setup Factory 7.0\SUF70Design.exe" /BUILD "C:\TestProj.sf7"

/CONFIG:<<ConfigName>>

Specifies the build configuration to use in the build. If not specified, the first build configuration found in the project is used.  For example:

"C:\Program Files\Setup Factory 7.0\SUF70Design.exe" /BUILD "C:\TestProj.sf7" "/CONFIG:DebugConfig"

/LOG:<<log file path>>

Specifies a log file to output build status to.  If the file exists, the output will be appended to it. If the file does not exist, it will be created. For example:

"C:\Program Files\Setup Factory 7.0\SUF70Design.exe" /BUILD "C:\TestProj.sf7" "/LOG:C:\output\Log.txt"

/STDOUT

Makes the build status go to the standard output device (console). For example:

"C:\Program Files\Setup Factory 7.0\SUF70Design.exe" /BUILD "C:\TestProj.sf7" "/STDOUT"

/CONST:<<ini file path>>

Lets you specify an INI file that contains design-time constants to override the ones in the project. You can define as many design-time constants as you want in the INI file, with each constant on a separate line beneath the [Constants] section. Each constant that is defined in the INI file must already be defined in the project file. For example:

 

[Constants]
#OUTPUTDIR#=C:\Output\Foobar 2002\Release
#SETUPNAME#=foobar2002setup.exe
#BUILD#=release

When you use the /CONST option along with /BUILD, the specified project file is loaded into Setup Factory, the constants described in the specified unattended-build INI file are set, and the setup executable is generated-all without any interaction.

 

For example:
"C:\Program Files\Setup Factory 7.0\SUF70Design.exe" /BUILD "C:\TestProj.sf7" "/CONST:C:\MyProj\Config.ini"