Stop msiexec.exe silent uninstall when applications that have files or processes in use detected.

Anonymous
2023-10-23T14:37:36+00:00

Discovered an issue uninstalling a product in silent mode where it caused instability on a system due to applications that were in-use and did not restart after the uninstall completed. 

Errors in the log showed 3 applications that had 1 file in use. 

MSI (s)  RESTART MANAGER: Detected that application with id xxxx, friendly name 'Application1', service short name 'Application1', of type RmService and status 1 holds file[s] in use.

MSI (s)  RESTART MANAGER: Detected that application with id xxxx, friendly name 'Application2', service short name 'Application2', of type RmService and status 1 holds file[s] in use.

MSI (s)  RESTART MANAGER: Detected that application with id xxxx, friendly name 'Application3', service short name 'Application3', of type RmService and status 1 holds file[s] in use.

No indication was mentioned of what file was in use. Assumption is that it's a common dll. 

The applications with the files in use are unrelated to the vendor and product being uninstalled. 

When the uninstall ran silent, it attempted to stop these 3 services, then restart them when the product was finished uninstalling. It was discovered that one or more of the services did not restart successfully and left the server and services in an unstable condition, requiring a full reboot to recover.

Is there a way to run a silent uninstall but to stop the process if there are dependent or in-use processes or files that might be troublesome. 

It is believed the issue revolves around the fact that the silent uninstall using parameters “/qn” causes the process to try and fix these kinds of 

issues in the background, but clearly there was something going on with the processes that the uninstaller and restart manager could not resolve and left them in a down state after the uninstall finished. 

Ideally, we would like for the uninstall to error out and NOT perform the removal if there are processes in use, but we can’t see where there are any flags or parameters for this.
Is there a parameter option that would stop msiexec and log the errors without attempting to suspend and restart the affected services.

Windows for business | Windows Server | Devices and deployment | Set up, install, or upgrade

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-10-31T07:11:59+00:00

    Hello

    There is currently no option for this parameter to stop msiexec and log the error without attempting to suspend and restart the affected service.

    Reference from: msiexec | Microsoft Learn

    Best Regards,

    Hania Lian

    0 comments No comments
  2. Anonymous
    2023-10-31T19:37:54+00:00

    The best solution we've found so far is to add MSIRESTARTMANAGERCONTROL="Disable" to the parameters which will disable the restartmanager.
    It's unknown if this might cause other issues, but it is a temporary workaround.

    ex. msiexec /x "YourInstaller.msi" MSIRESTARTMANAGERCONTROL="Disable"

    1 person found this answer helpful.
    0 comments No comments