If it did not have to replace files that were in use, it returns ERROR_SUCCESS. See the remarks section for additional information on delayed reboots.
The /norestart command-line option prevents wusa.exe from restarting the computer. However, if a file being updated by the MSU package is in use, then the package is not applied to the computer until the user restarts the computer. This means that applications that use the Windows Installer 4.5 redistributable for Windows Vista and Windows Server 2008 cannot use the Windows Installer 4.5 functionality until the computer is restarted.
It is recommended that the Windows Installer service be stopped when using the update package. When the package is run in full UI mode it detects if the Windows Installer service is running and requests the user to stop the service. If the user continues without stopping the service, the update replaces Windows Installer.
Bootstrapping applications that use the redistributable package to install the Windows Installer with another application can require an extra system reboot in addition to reboots needed to install the application. The delayed reboot option is only recommended for cases where it is necessary to eliminate an extra reboot caused by installing files that are in use. Developers should do the following in their setup application to use the delayed reboot option.
Call the redistributable package with the /norestart command-line option.
Treat the return of either ERROR_SUCCESS or ERROR_SUCCESS_REBOOT_REQUIRED as meaning success.
Invoke Msiexec on the application's package and run other setup code specific to the application. If the setup application uses MsiInstallProduct, then the application must load MSI.DLL from the system directory. If no reboot occurs and if the redistributable returned ERROR_SUCCESS_REBOOT_REQUIRED, then prompt the user for a reboot to complete the setup of the Windows Installer binaries. If a reboot occurs, no additional steps are required.
Note
Applications that call LoadLibrary on the new MSI.DLL after the redistributable package returns success must ensure that an older version of MSI.DLL has not already been loaded within the process. If an older version of MSI.DLL was loaded, it must be unloaded from the process address space prior to calling LoadLibrary for the new MSI.DLL.
For more information, see Windows Installer Bootstrapping.