1

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.

Shaharni
  • 36
  • 3
  • Why not just shut those apps down? – Christopher Painter Dec 26 '21 at 18:25
  • @ChristopherPainter I do not want the user to get inturppted by asking him to close windows. In my current status, I would need to ask to close numerous of apps, including EXCEL and other apps which I do not want to require to be shut, question is - is it even possible? – Shaharni Dec 28 '21 at 11:04

1 Answers1

1

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:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thank you @stein This is valued information but not exactly what I need. I'll explain - My issue is that my app injects some of my DLLs to .net applications. I do not want to shut down those applications, in order to change the DLLs. What I wish I could do is something along - 1. Run installation of new upgrade package 2. windows installer finds DLLs that need replace - in use 3. loaded/injected DLLs stay in a virtual space (?) - as we keep them loaded somehow while - 4. we change the actual DLLs 5. new apps load new DLLs 6. current injected apps will load new DLL on relaunch – Shaharni Dec 26 '21 at 12:18