Toolkit Function Issue

Hello Team,
We are using 3.8 version of deployment toolkit.
Function-- Execute-Msi -Action Uninstall -Path"{product code}" is not able to remove the msi based application.
I just checked in the log and it’s says that particular msi with the given product not found hence skipping the Uninstall.But the same product code exist in the Uninstall key in the Registry.

I tried different things to check and found that this function firstly check the product code exist on the machine and retrieve product name,publisher,version details.The product name of my msi application is of 67 character length
when I have reduced the character to 57 length in Display name value in uninstall, function able to find the msi and able to Uninstall it easily.

Is any one facing this issues? Please advise.

Is there anyone who can respond to the query???

MSI use GUID as an identifier. When you install an MSI it adds a registry entry in the Uninstall folder, that then contains the uninstall information and is visible from Programs and Features. You need to use the name of that folder as the path.

For example Microsoft Visual C++ 2010 x64 Redistributable installs an msi and adds {1F302716-8858-47DF-B716-6A5C7315EAE1} as its GUID to HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\

To uninstall it I would use

Execute-Msi -Action Uninstall -Path "{1F302716-8858-47DF-B716-6A5C7315EAE1}"

Thanks for the response…As I mentioned in the post, we always use the msi product code or product guid to remove the msi application…
But for some msi application having longer character in Display name,it is not working.I am also not sure about the exact root cause of issue.

The GUID/product key is almost always the same length because it is generated and would have to be replaced by something else while being created. It is better to use the GUID/product key.

There could be problem if you use Display name instead of GUID/Product Key because it could be too long. How long is your display name ?

We are not using displayname in Execute-msi function for uninstall. We are getting issue with product code in some packages only… But if I use older version of Toolkit Files, it is able to uninstall.

What exact version are you using? In 3.8.2 I have no issue even with displayname that is 199 characters long.

I’m having an issue removing Visual C++ 2015-2022 (x64). I keep getting an error code that it’s not installed. I have tried many ways to remove it. btw, if removing from add/remove, it happens in seconds. ¯_(ツ)_/¯

I even scripted it using the remove-msiapplication and the -IncludeUpdatesAndHotfixes and it finds the install and attempts to execute but will fail. the logs show error (1605) Product is not currently installed. This might be a one off issue. Thanks in advance for any help.

try installing over-top and then uninstall.

If that doesn’t work…MSIZAP.EXE…if you can find it.

I’ll give it a go, thanks.

Thanks,
-Jeff