Install, uninstall works manually but not with ManageEngine

Install, and uninstall works manually but only install works with ManageEngine, uninstall does not.

This is the line in my script I believe to be the issue.
Start-ADTMsiProcess -Action ‘Uninstall’ -ProductCode ‘{43EE1C03-22E3-4839-9F3F-F1D96D707DBC}’

It appears that it finds the installed application when ran manually but not when deployed with ManageEngine.

Log when deployed with ManageEngine
[Uninstall] :: Getting information for installed applications matching the provided FilterScript… Get-ADTApplication
[Uninstall] :: Found no application based on the supplied FilterScript. Get-ADTApplication
[Uninstall] :: The MSI is not installed on this system. Skipping action [Uninstall]… Start-ADTMsiProcess

Log when uninstalled manually
[Uninstall] :: Getting information for installed applications matching the provided FilterScript… Get-ADTApplication
[Uninstall] :: Found installed application [Tech Soft 3D SpinFire (x64)] version [11.12.0.28512]. Get-ADTApplication
[Uninstall] :: [C:\WINDOWS\system32\msiexec.exe] is a valid fully qualified path, continue. Start-ADTProcess
[Uninstall] :: Checking to see if mutex [Global_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available. Test-ADTMutexAvailability
[Uninstall] :: Mutex [Global_MSIExecute] is available for an exclusive lock. Test-ADTMutexAvailability
[Uninstall] :: Working Directory is [C:\WINDOWS\system32]. Start-ADTProcess
[Uninstall] :: Executing [C:\WINDOWS\system32\msiexec.exe /x “{43ee1c03-22e3-4839-9f3f-f1d96d707dbc}” REBOOT=ReallySuppress /QN /L*V “C:\WINDOWS\Logs\Software\TechSoft3DSpinFire(x64)_11.12.0.28512_Uninstall.log”]… Start-ADTProcess
[Uninstall] :: Execution completed successfully with exit code [0]. Start-ADTProcess

Thanks

The only thing I can think of is that this is a per-user MSI and ManageEngine is running under a different account.

2 Likes

The MSI in question is a per-machine (ALLUSERS=1).

I concur with Mitch.

If you install per-machine but ManageEngine wants to uninstall it Per-User, MSI is not going to find it installed in HKCU.

Determine what account ManageEngine is using to perform the uninstall.

According to the logs it is using System to install and uninstall.

[Initialization] :: Current User is [NT AUTHORITY\SYSTEM].

Start-ADTMsiProcess -Action ‘Uninstall’ -ProductCode ‘{43EE1C03-22E3-4839-9F3F-F1D96D707DBC}’

Note: If I replace the above line with …

Start-Process msiexec “/x{43EE1C03-22E3-4839-9F3F-F1D96D707DBC} /norestart /qn /L*v C:\Windows\Logs\Software\SpinFire.x64_Uninstall.log”

It will work but I was hoping to use PSadt functions.

1 Like

I have been noticing this also and mentioned in a previous thread.

It did eventually work on a different device because my system environmentals were off on the device it was not working on.

Maybe you are having the same issues?