inno setup 中的 UsePreviousAppDir 为是否使用原来的安装目录,默认的为使用原来的安装目录
yes时使用原来的安装目录
no时使用强制指定的安装目录
官方文档:https://jrsoftware.org/ishelp/
官方文档是这样写的:
[Setup]: UsePreviousAppDir
Valid values: | |
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