Show/Hide Toolbars

XSharp

Navigation: X# Documentation > X# Tips and Tricks

Installer Command Line options

Scroll Prev Top Next More

Our installer was created with the product Inno Setup. We are supporting the "normal" Inno Setup command line options and the following extra options.
Some options are not installed because these are not relevant for our installer, such as /lang and /password.

Custom Setup commandline options

 

Option

Description

/nouninstall

This option exists since X# 2.4.
This suppresses uninstalling the previous version.
When you choose this you can install 2 different versions of X# side by side, assuming you choose different installation folders.
Please note that if both versions install into the same Visual Studio version then the latest installation "wins".
If you want to switch to another version of the VS integration or MsBuild support files you should run the "deployvs<num>".cmd files in the Uninst folder of the installation that you want to activate.

Standard Inno Setup commandline options

 

Option

Description

/help, /?

Shows a summary of this information. Ignored if the UseSetupLdr [Setup] section directive was set to no.

/silent, /verysilent

Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above).

If a restart is necessary and the '/norestart command isn't used (see below) and Setup is silent, it will display a Reboot now? message box. If it's very silent it will reboot without asking.

/suppressmsgboxes

Instructs Setup to suppress message boxes. Only has an effect when combined with '/silent or '/verysilent.

The default response in situations where there's a choice is:

Yes in a 'Keep newer file?' situation.

No in a 'File exists, confirm overwrite.' situation.

Abort in Abort/Retry situations.

Cancel in Retry/Cancel situations.

Yes (=continue) in a DiskSpaceWarning/DirExists/DirDoesntExist/NoUninstallWarning/ExitSetupMessage/ConfirmUninstall situation.

Yes (=restart) in a FinishedRestartMessage/UninstalledAndNeedsRestart situation.

The recommended choice in a PrivilegesRequiredOverridesAllowed=dialog situation.

5 message boxes are not suppressible:

oThe About Setup message box.

oThe Exit Setup? message box.

oThe FileNotInDir2 message box displayed when Setup requires a new disk to be inserted and the disk was not found.

oAny (error) message box displayed before Setup (or Uninstall) could read the command line parameters.

oAny task dialog or message box displayed by [Code] support functions TaskDialogMsgBox and MsgBox.

/log="filename"

This allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message. If you do not specify this command line option then the installer will log to a file with the name "Setup Log <date>#<number>.txt" in the current users TEMP folder.

/nocancel

Prevents the user from canceling during the installation process, by disabling the Cancel button and ignoring clicks on the close button. Useful along with '/silent or '/verysilent.

/norestart

Prevents Setup from restarting the system following a successful installation, or after a Preparing to Install failure that requests a restart. Typically used along with /silent or /verysilent.

/restartexitcode=exit code

Specifies a custom exit code that Setup is to return when the system needs to be restarted following a successful installation. (By default, 0 is returned in this case.) Typically used along with /norestart.

/closeapplications

Instructs Setup to close applications using files that need to be updated by Setup if possible.

/nocloseapplications

Prevents Setup from closing applications using files that need to be updated by Setup. If /closeapplications was also used, this command line parameter is ignored.

/forcecloseapplications

Instructs Setup to force close when closing applications.

/noforcecloseapplications

Prevents Setup from force closing when closing applications. If /forcecloseapplications was also used, this command line parameter is ignored.

/restartapplications

Instructs Setup to restart applications if possible. Only has an effect when combined with '/closeapplications.

/norestartapplications

Prevents Setup from restarting applications. If /restartapplications was also used, this command line parameter is ignored.

/loadinf="filename"

Instructs Setup to load the settings from the specified file after having checked the command line. This file can be prepared using the '/saveinf=' command as explained below.Don't forget to use quotes if the filename contains spaces.

/saveinf="filename"

Instructs Setup to save installation settings to the specified file. Don't forget to use quotes if the filename contains spaces.

/dir="x:\dirname"

Overrides the default directory name displayed on the Select Destination Location wizard page. A fully qualified pathname must be specified. May include an "expand:" prefix which instructs Setup to expand any constants in the name. For example: '/dir=expand:{autopf}\My Program'.

/group="folder name"

Overrides the default folder name displayed on the Select Start Menu Folder wizard page. May include an "expand:" prefix, see '/dir='. If the [Setup] section directive DisableProgramGroupPage was set to yes, this command line parameter is ignored.

/noicons

Instructs Setup to initially check the Don't create a Start Menu folder check box on the Select Start Menu Folder wizard page.

/type=type name

Overrides the default setup type.

 
If the specified type exists and isn't a custom type, then any /components parameter will be ignored.

 
The types in the X# installer are: full, compact, custom
 

/components=
"comma separated list of component names"

Overrides the default component settings. Using this command line parameter causes Setup to automatically select a custom type. If no custom type is defined, this parameter is ignored.

Only the specified components will be selected; the rest will be deselected.

If a component name is prefixed with a "*" character, any child components will be selected as well (except for those that include the dontinheritcheck flag). If a component name is prefixed with a "!" character, the component will be deselected.

This parameter does not change the state of components that include the fixed flag.

Example:Deselect all components, then select the "help" and "plugins" components:
/components="help,plugins"

Example:Deselect all components, then select a parent component and all of its children with the exception of one:
/components="*parent,!parent\child"
 
The components in the X# installer are:

Component

Description

main

The XSharp Compiler and Build System

main\script

Register .prgx as X# Script extension

main\ngen

Optimize performance by generating native images

main\gac

Register runtime DLLs in the GAC (recommended !)

main\examples

Install the Xsharp Examples

vs

Visual Studio Integration

vs\2015

Visual Studio 2015

vs\2017

Visual Studio 2017

vs\2019

Visual Studio 2019

xide

Include the XIDE installer