[wix-users] [Q] How to avoid rebooting caused by MsiPackage installation

Hiroyuki Hayakawa hihayak at microsoft.com
Tue Dec 10 03:03:25 PST 2019


Hi experts,

Could anyone check whether my understanding below is right?
As far as I looking at the source codes,

- Burn uses REBOOT=ReallySuppress option for installing MSI package.
- BA receives the result of MSI installation.
- BA evaluates whether it should reboot or not.
- We can pass /norestart as a command line option of BA so that BA doesn't prompts rebooting. (or rebooting silently when /q is specified)


I'm referring to the following document and source codes.
Sorry to ask a basic question but I'd appreciate it if anyone can take a look at this.
Thank you in advance.


https://wixtoolset.org/documentation/manual/v3/xsd/wix/msiproperty.html
Attributes
Name
Type
Description
Required
Name
String
The name of the MSI property to set. Burn controls the follow MSI properties so they cannot be set with MsiProperty: ACTION, ALLUSERS, REBOOT, REINSTALL, REINSTALLMODE
Yes

// using REBOOT=ReallySuppress for MSI installation ?
(Wix4) https://github.com/wixtoolset/wix4/blob/e98c0c414e5853d961a73caea42ce695ac853812/src/burn/engine/msiengine.cpp#L1208
(Wix3) https://github.com/wixtoolset/wix3/blob/bda1c281cb0349007d767d5404d6da87076d7d94/src/burn/engine/msiengine.cpp#L1197
        hr = StrAllocConcatSecure(&sczProperties, L" REBOOT=ReallySuppress", 0);

// Parsing and setting norestart option ?
(Wix4) https://github.com/wixtoolset/wix4/blob/e98c0c414e5853d961a73caea42ce695ac853812/src/burn/engine/core.cpp#L1111
(Wix3) https://github.com/wixtoolset/wix3/blob/bda1c281cb0349007d767d5404d6da87076d7d94/src/burn/engine/core.cpp#L1119
            else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"norestart", -1))
            {
                pCommand->restart = BOOTSTRAPPER_RESTART_NEVER;
            }

// Evaluating whether we need to restart ?
(Wix4) https://github.com/wixtoolset/wix4/blob/3fe8fc012975a59d1350ac79d7db7897c77e0335/src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp#L914
(Wix3) https://github.com/wixtoolset/wix3/blob/c65c6af91279e397f8b2a2d23d6995d43a74114e/src/ext/BalExtension/wixstdba/WixStandardBootstrapperApplication.cpp#L930
        m_fRestartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < m_command.restart);



--
Best regards,
Hiroyuki Hayakawa



More information about the wix-users mailing list