/build/static/layout/Breadcrumb_cap_w.png

Unable to uninstall corrupt msi

Hey, 

I am trying to uninstall msi that was previousle installed on a system.

I am running the command msiexec /x "{product-code-here}" /l*vx c:\logs\uninstall.log

When I look at the just created log files it fails with errors:

---

MSI (s) (E4:38) [10:53:25:435]: Note: 1: 1725 

MSI (s) (E4:38) [10:53:25:435]: Product: ... -- Removal failed.


MSI (s) (E4:38) [10:53:25:436]: Het product is verwijderd. Productnaam: .... Productversie: ..... Producttaal: 1033. Fabrikant: .... Status van geslaagde/mislukte verwijdering: 1603.


MSI (s) (E4:38) [10:53:25:436]: Closing MSIHANDLE (258) of type 790542 for thread 13112

MSI (s) (E4:38) [10:53:25:436]: Attempting to delete file C:\WINDOWS\Installer\9086ede.mst

MSI (s) (E4:38) [10:53:25:438]: Deferring clean up of packages/files, if any exist

MSI (s) (E4:38) [10:53:25:438]: Attempting to delete file C:\WINDOWS\Installer\9086ede.mst

MSI (s) (E4:38) [10:53:25:438]: Unable to delete the file outside of the engine. LastError = 2

MSI (s) (E4:38) [10:53:25:439]: MainEngineThread is returning 1603

MSI (s) (E4:00) [10:53:25:445]: RESTART MANAGER: Session closed.

MSI (s) (E4:00) [10:53:25:445]: Calling SRSetRestorePoint API. dwRestorePtType: 13, dwEventType: 103, llSequenceNumber: 9, szDescription: "".

MSI (s) (E4:00) [10:53:25:447]: The call to SRSetRestorePoint API succeeded. Returned status: 0.

=== Logging stopped: 22/11/2023  10:53:25 ===

MSI (s) (E4:00) [10:53:25:449]: User policy value 'DisableRollback' is 0

MSI (s) (E4:00) [10:53:25:449]: Machine policy value 'DisableRollback' is 0

MSI (s) (E4:00) [10:53:25:449]: Incrementing counter to disable shutdown. Counter after increment: 0

MSI (s) (E4:00) [10:53:25:449]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 

MSI (s) (E4:00) [10:53:25:450]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 

MSI (s) (E4:00) [10:53:25:451]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1

MSI (s) (E4:00) [10:53:25:451]: Destroying RemoteAPI object.

MSI (s) (E4:04) [10:53:25:451]: Custom Action Manager thread ending.

MSI (c) (84:54) [10:53:25:453]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1

MSI (c) (84:54) [10:53:25:454]: MainEngineThread is returning 1603

=== Verbose logging stopped: 22/11/2023  10:53:25 ===


There is no mst file that he tries to delete in the C:\Windows\Installer


I even tried to delete files from program files and then remove the registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows

but after that I am still unable to install the software.


Tried google to find similar problems but can't find anything usefull.

Anybody have some tips for me to get rid of this software so I can reinstall it?


0 Comments   [ + ] Show comments

Answers (5)

Answer Summary:
Posted by: comicsserg 11 months ago
Orange Senior Belt
1

Top Answer

I found the solution to my problem.

I captured the logs and saw that the uninstallation fails at a cirtain custom action. This behavior was only present if you run it with system account or with the admin account that had never being logged on the client. 

I then tried to remove the custom action and save the msi with a new name and then use

msiexec.exe /x new_msi.msi /l*vx c:\logs\uninstall.log

But it is still gave the error at the same custom action... how is it possible if I removed the custom action from the msi? It turned out that despite feeding my new_msi.msi without custom action in the command line, the msiexec still took the msi from the cache at the location c:\windows\installer\original_msi.msi

I don't know why msi prefers using it is own stored msi instead of the msi I am feeding to it.

So I replaced the c:\windows\installer\original_msi.msi with my new_msi.msi and kept the original name original_msi.msi 

Now when I use the msiexec.exe /x "{software-code}" /qn /l*vx c:\Logs\uninstall.log everything works fine under local system account.

Posted by: Mauricio Beltran 1 year ago
Senior White Belt
1

Hello comicsserg,

I would try third-party applications like Revo or IObit uninstallers. They should be able to get rid of any files/settings generated by an MSI.

I hope this helps.

Best regards.


Posted by: comicsserg 1 year ago
Orange Senior Belt
1

thank you Mauricio, I was doing further tests and it looks like when I try to call msiexec under system account (sccm deployment) it gets this issue, but when I run it with my admin account it works

I see in the log file of msi this line:

No idea why it would fail under local system acocunt and not under normal user acocunt

Action ended 16:13:58: SetUnInstallProductName. Return value 3.

anybody have any idea why the behavior is different under system account when deployed through SCCM?

Posted by: Hobbsy 12 months ago
Red Belt
1

Try using the uninstall string displayed in the software inventory item for the application 


Comments:
  • uninstall string is faulty. it has msiexec /I{...} instead of /X - comicsserg 12 months ago
Posted by: JordanNolan 12 months ago
10th Degree Black Belt
1

If the user account was able to uninstall the application then it sounds like the application was installed in Per-User mode, not Per-Computer.  This can always be a pain expecially when multiple people might use a system.

I use a softphone app that would install in Per-User mode and upgrading it was a pain because my deployment ran in Per-Computer mode.  I had to write separate scripts where the uninstall would run as the user and then when the app was cleared it would run as SYSTEM.

It was really fun when I had systems that belonged to a former employee who still had a user profile on the computer and I had to write scripts to purge those profiles or remote over and delete the user profiles out of Control Panel.  Ugh.


Comments:
  • I double checked the msi with orca and ALLUSERS is already set to 1 - comicsserg 12 months ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ