Error 1605 uninstall

Hi

I tried to uninstall a software with the psappdeployToolkit.
Remove-MSIApplications -Name ‘XXXXXX’

I got an error: [Installation] :: Execution failed with exit code [1605] because the product is not currently installed.

when do the command in the user it runs currently, but when I run it from the “system user” I got this message.

I also tried:
Start-Process -FilePath “C:\Windows\System32\msiexec.exe” -ArgumentList “/qn /uninstall {XXX-XXX-XXX}” -wait

and still I have the problem.

is the a fix for it?

Hi,

The issue here is the way the original MSI was installed.
If it was installed using SCCM SYSTEM account you won’t have an issue.
In your case it was installed using user account and that’s why you cannot uninstall it using SCCM SYSTEM account, For SYSTEM this application is not installed.
You can try to write a code which is looking how the APP was installed and run Execute-ProcessAsUser to uninstall APP using current user credentials.

ewkom_jd is correct.
You did use ALLUSERS=1 at install time for that MSI and now it is installed for ONE user only in that user’s profile.

Now you come with SCCM to uninstall for all users but it’s not installed in \ProgramFiles.
That’s why you get ERROR 1605.