简体   繁体   中英

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. Note that I need to have the MSI package at hand for that.

I would like to add support in my MSI packages to change the TARGETDIR of the application after it was installed. 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.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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