I am configuring the tool to uninstall an old app before installing the new one. I have this working correctly when tested on a local VM. I have now added the app to SCCM and tried installing it on a network VM and now I get this in the PSADT software log.
Please check if the product which you are uninstalling is registered under “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” OR “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall”.
If the product is not published then MSI can throw 1605 error. If Product code is present under above hive then trigger should go smooth.
The old app to be uninstalled is in “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall”. I installed it to test the script. So I’m 100% sure the app is there, but the log says otherwise.
Have you tried to use Remove-MSIApplications -Name ‘Application display name’ ?
I know this function also retrieves the product code and triggers the uninstallation but still give a try.