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

后端 未结 3 607
面向向阳花
面向向阳花 2021-02-18 21:53

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

相关标签:
3条回答
  • 2021-02-18 22:18

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

    i.e.:

    <Property Id="REBOOT"><![CDATA[Force]]></Property>
    
    0 讨论(0)
  • 2021-02-18 22:36
    <?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.

    0 讨论(0)
  • 2021-02-18 22:41

    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>
    
    0 讨论(0)
提交回复
热议问题