How to prevent restart dialog caused by MSI 1610 error
Asked Answered
E

3

1

I have a setup created with InstallShield. During upgrade or uninstall, after Install validate process, I get a alert dialog box with the following message:

"The setup must update files or services that cannot be updated while the system is running. If you choose to continue, a reboot will be required to complete the setup".

I found the following in the MSI log file:

MSI (s) (4C:78) [18:17:52:182]: RESTART MANAGER: Detected that application with id 4, friendly name 'System', of type RmCritical and status 1 holds file[s] in use. MSI (s) (4C:78) [18:17:52:182]: RESTART MANAGER: Did detect that a critical application holds file[s] in use, so a reboot will be necessary. MSI (s) (4C:78) [18:17:52:182]: Note: 1: 1610

I want to understand why I get this message and how to avoid this.

( I already checked the following registry key and it had oldmsedge.exe, I don't think it is related to this issue)

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\FileRenameOperations

Extenuation answered 29/1, 2021 at 9:3 Comment(1)
Are you installing any services? See answer below.Bal
K
0

You can set these properties:

REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable

Koh answered 17/3, 2021 at 21:21 Comment(0)
A
0

Pending File Renames: The FileRenameOperations key holds a list of files and resources that are waiting to be updated (and / or renamed) upon reboot / restart. This is indeed something that can trigger the warning you see. The setup found files in use that your setup tried to replace, and hence wants to restart the computer to put the new file versions in place after all locks are released (via the restart).

Windows Service: There are many things that can prevent files from being replaceable. One common problem is running services that you don't shut down properly in your setup before trying to replace files that the service has in use. Fix this to have the service in question shut down by your setup. There are mechanisms in MSI to do so (provided the service works as it should - not at all guaranteed).

Running Applications: It is common advice to shut down all normal Windows applications (not just services) that are running when you install a setup. This is to release similar file and resource locks that would cause file overwrite or registry updates to fail.

Other Locks: Files can also be locked by other mechanisms, such as malware scanners, anti virus or similar security processes. Or several other things such as backup mechanisms, ad-hoc locked files opened manually by the user (if the app actually locks the file), ACL permission problems, and worst of all: real malware. And a number of further technicalities.

Restart Manager: Windows has the Restart Manager feature to deal with this problem - files and resources that are locked and can't be updated. It is essentially a way for applications to shut themselves down in a standardized way - via an API (method calls) - so that setups and system processes can instruct the applications in question: "shut yourself down" - and then the system will restart the applications when appropriate.

Technicalities: Advanced Installer - makers of leading deployment software - has a primer on the technical aspects of making your application support the Restart Manager feature. And there is: more on RestartManager here.


Links:

Agaric answered 29/1, 2021 at 14:20 Comment(0)
K
0

You can set these properties:

REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable

Koh answered 17/3, 2021 at 21:21 Comment(0)
M
0

This may not apply to your case but in mine, System was sitting on font files in my install and I was able to solve it by embedding the fonts as Qt resources instead of installing them as files. To check what files are causing issues, visit the following key in regedit while the Restart Manager prompt is showing (trick found here):

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\RestartManager\Session0000

and look at what's in RegFiles0000. Occasionally it'll also be Session0001, RegFiles0001 and so on.

Then ask Handle or Process Explorer what processes are holding what. Since System is involved, you'll likely need admin rights or Handle will not find anything.

Madrigal answered 23/3, 2023 at 18:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.