简体   繁体   English

是否可以在MSI程序包中添加支持以在安装后更改应用程序的文件夹?

[英]Is it possible to add support in a MSI package to change the folder of an application after it was installed?

The only way that I know of to change the TARGETDIR is to uninstall and then install the same application again. 我知道更改TARGETDIR的唯一方法是先卸载然后再安装相同的应用程序。 Note that I need to have the MSI package at hand for that. 请注意,我需要为此准备MSI软件包。

I would like to add support in my MSI packages to change the TARGETDIR of the application after it was installed. 我想在我的MSI软件包中添加支持,以在安装该应用程序后更改该应用程序的TARGETDIR。 This feature would be triggered by the Change option from the Add/Remove window. 此功能将由“ 添加/删除”窗口中的“ 更改”选项触发。 When choosing that option, beside the ability to change features, the user would also be able to change the TARGETDIR folder. 选择该选项时,除了可以更改功能之外,用户还可以更改TARGETDIR文件夹。

Is that possible? 那可能吗?

Thanks. 谢谢。

No, it's not possible. 不,不可能。 All directory properties ( including INSTALLDIR, TARGETDIR, INSTALLLOCATION or whatever else you call them ) are immutable once they have a component installed that references them. 一旦安装了引用它们的组件,所有目录属性(包括INSTALLDIR,TARGETDIR,INSTALLLOCATION或您所谓的任何其他属性)都是不可变的。 You have to uninstall anywhere from a select feature to the entire product (depending on which features have components using the directories ) in order to be able to reinstall the feature / product and give the directory a new value. 为了能够重新安装功能部件/产品并为目录赋予新值,您必须从选择功能部件到整个产品的任何位置进行卸载(取决于哪些功能部件具有使用directorys的目录)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM