Shaharni
Shaharni

Reputation: 36

How to avoid 'Restart requested' result in msi installation? due to inability to replace injected DLLs

Our MSI installation often needs to replace DLLs that are injected to .net applications. Since we cannot unload these DLLs (they are IN USE), they are schedule to change after a restart, and the installation result is Restart Requested. Can we somehow avoid this? Is it possible to keep the DLLs loaded to those app, yet make new apps load the new DLLs? without needing a restart

Info 1603.The file C:\Program Files\Name\Folder\nameofdll.dll is being held in use. Close that application and retry. Info 1903.Scheduling reboot operation: Deleting file C:\Program Files\Name\Folder\nameofdll.dll. Must reboot to complete operation.

Upvotes: 1

Views: 708

Answers (1)

Stein Åsmul
Stein Åsmul

Reputation: 42136

Concept: The RestartManager feature of Windows is a mechanism to allow applications to be shut down and restarted during deployment in a standardized way. In short it is a means to prevent Windows reboot, by restarting applications instead - in a prescribed way.

Technical: The Advanced Installer guys have a very nice, technical article about this: How do I add support for Windows Restart Manager to my application?

Compliance: In other words: you can update your application to comply with the restart manager feature to avoid reboots by supporting automatic shutdown and restart of your application. Note that if these files are locked by other applications, they will need to support such auto-shutdown as well (and I have never tested this with multiple applications).


Links:

Upvotes: 1

Related Questions