abmv
abmv

Reputation: 7098

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

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

Upvotes: 20

Views: 10804

Answers (3)

User
User

Reputation: 359

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>

Upvotes: 3

abmv
abmv

Reputation: 7098

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

Upvotes: 19

saschabeaumont
saschabeaumont

Reputation: 22406

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

i.e.:

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

Upvotes: 4

Related Questions