Generated installers and uninstallers accept a few options on the command line. These options give the user a bit more control over the installation process.
3.2.1 Common Options
- /NCRC disables the CRC check, unless
CRCCheckforcewas used in the script. - /S runs the installer or uninstaller silently. See section 4.12 for more information.
- /D sets the default installation directory ($INSTDIR), overriding InstallDir and InstallDirRegKey. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported.
3.2.2 Uninstaller Specific Options
- _?= sets $INSTDIR. It also stops the uninstaller from copying itself to the temporary directory and running from there. It can be used along with ExecWait to wait for the uninstaller to finish. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces.
3.2.3 Examples
installer.exe /NCRC
installer.exe /S
installer.exe /D=C:\Program Files\NSIS
installer.exe /NCRC /S /D=C:\Program Files\NSIS
uninstaller.exe /S _?=C:\Program Files\NSIS
# uninstall old version ExecWait '"$INSTDIR\uninstaller.exe" /S _?=$INSTDIR'
本文介绍NSIS(Nullsoft Scriptable Install System)中安装程序和卸载程序的命令行选项,包括通用选项如禁用CRC校验(/NCRC)、静默运行(/S)等,以及卸载程序特有的选项如设置默认安装目录(_?)等。
1548





