Inno Setup 使用旧版本的安装目录(覆盖)安装和强制使用指定安装目录安装

 

inno setup 中的 UsePreviousAppDir 为是否使用原来的安装目录,默认的为使用原来的安装目录

yes时使用原来的安装目录

no时使用强制指定的安装目录

官方文档:https://jrsoftware.org/ishelp/

官方文档是这样写的:

[Setup]: UsePreviousAppDir

Valid values:

yes or no

Default value:

yes

Description:

When this directive is yes, the default, at startup Setup will look in the registry to see if the same application is already installed, and if so, it will use the directory of the previous installation as the default directory presented to the user in the wizard.

Note that Setup cannot re-use settings from a previous installation that had Uninstallable set to no, since the registry entries it looks for are not created when Uninstallable is no.

 

[Setup]: UsePreviousAppDir 

有效值: yes 或 no,

说明: 

当该关键字为默认值 yes 时,再安装程序启动时将会在注册表中查找看是否有相同的应用程序已经被安装,如果是这样,它将使用先前的安装程序的目录作为默认的目录提供给用户的向导。如果需要使用强制指定的安装目录,可以在[Setup]后添加一行面:UsePreviousAppDir=no即

[Setup]

UsePreviousAppDir=no

当然还可以写函数使用函数返回值来给UsePreviousAppDir赋值

 

 

[Setup]: UsePreviousGroup 

有效值: yes 或 no 

说明: 

当该关键字为 默认值yes 时,再安装程序启动时将会在注册表中查找看是否有相同的应用程序已经被安装,如果是这样,它将使用先前的安装程序的开始菜单组作为默认的开始菜单组提供给用户的向导。如果需要使用强制指定的开始菜单组,可以在[Setup]后添加一行面:UsePreviousGroup=no即

[Setup]

UsePreviousGroup=no

当然还可以写函数使用函数返回值来给UsePreviousGroup赋值

 

参考其他博客:

https://www.it1352.com/37811.html

http://newbt.net/ms/vdisk/show_bbs.php?id=AACA9C7819D2754013845B69C792650B&pid=160&last=1

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值