开发者

How can I execute a Custom Action as System user with Wix 3.0, before checking to see if files are in use?

开发者 https://www.devze.com 2022-12-18 05:52 出处:网络
So I have a Wix 3.0 project that installs an IIS7 Native Code Module. When uninstalling I would like to be able to shut down the IIS7 application 开发者_运维技巧pools before deleting the file so that

So I have a Wix 3.0 project that installs an IIS7 Native Code Module. When uninstalling I would like to be able to shut down the IIS7 application 开发者_运维技巧pools before deleting the file so that a reboot is not necessary.

I am using the appcmd utility to shut down the app pools in a CustomAction element, but when I attempt to do an uninstall I get this error before the customaction is ever invoked:

The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup.

I have the "After='InstallInitialize'" property set on the CustomAction, because the documentation says that any deferred/not-impersonated custom action must come between InstallInitialize and InstallFinalize.

So is there some way to have a custom action execute before this check for files in use is made? Or disable this check for a given file, or make the check happen later in the sequence?


Yes, you can specify the order for actions to occur by modifying the Sequence column in the InstallExecuteSequence table within the MSI file.

Get the ORCA tool to examine the MSI file to see what I mean, and use a Javascript script to modify the MSI as appropriate.

How can I execute a Custom Action as System user with Wix 3.0, before checking to see if files are in use?

0

精彩评论

暂无评论...
验证码 换一张
取 消