WiX: how to skip removing of iis:WebVirtualDir if virtual directory contains nested directories?

拜拜、爱过 提交于 2019-12-22 18:29:06

问题


My msi install and uninstall a shared resource: IIS virtual directory "MyTeamServices". And it works very well except it removes that virtual directory during uninstall process even if somebody have created nested virtual directories (not by using installers, just "by hands"). When I expect to see standard behavior of WiX processing HDD folders : if there are "unaccounted" files inside - do not remove folder.

Could you get me ideas how to solve this little problem (and not by using "permanent" attribute)?

Particularly:

1) How to work with WiX sources to understand what is standard behavior during uninstall of WebVirtualDir (and may be patch it)? I see the ParseWebVirtualDirElement but that not make me closer to IIS management actions. Where they are, how to dig out them?

2) I could also write custom action that could alarm if virtual directory contains something unexpected "inside", but where to call it, and how then skip WebVirtualDir uninstall ? Component can be uninstalled but the actions of WebVirtualDir uninstall process should be skipped... Or I should play there with msi "features",e.g Move this component to feature and then somehow to skip feauture's uninstallation?


回答1:


See the answer in the linked question. It brings reference count into IIS virtual directory - they won't be deleted if it is used by another product.



来源:https://stackoverflow.com/questions/13077205/wix-how-to-skip-removing-of-iiswebvirtualdir-if-virtual-directory-contains-nes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!