Is it possible to prompt for restarting the machine after installation using WiX?

社会主义新天地 提交于 2019-12-05 10:22:57

问题


Is it possible to prompt for restarting the machine after installation using WiX?


回答1:


<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>

    <Product
        Name = 'Sample App'
        Id = 'PRODUCT-GUID-HERE'
        UpgradeCode = 'UPGRADE-GUID-HERE'
        Language = '1033'
        Version = 'YOUR-APP-VERSION-HERE'
        Manufacturer = 'YOU!'>

        <InstallExecuteSequence>
            <ScheduleReboot After="InstallFinalize"/>
        </InstallExecuteSequence>
    </Product>
</Wix>

I think I got it.




回答2:


Yes. See the documentation for the REBOOT property in Windows Installer.

i.e.:

<Property Id="REBOOT"><![CDATA[Force]]></Property>



回答3:


Use the REBOOT property of WiX in the Product.wxs file of your setup to get a restart prompt. The syntax is:

<Property Id="REBOOT" Value="Force"></Property>


来源:https://stackoverflow.com/questions/1907738/is-it-possible-to-prompt-for-restarting-the-machine-after-installation-using-wix

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