加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

NSIS做的安装程序,可接受命令行参数,实现静默安装,静默卸载

(2013-05-03 23:31:10)
分类: 软件开发

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 CRCCheck force was 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'

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有