Uninstall script not performing correctly

限于喜欢 提交于 2019-12-05 13:36:28

It appears this is an Installshield suite project - essentially a collection of MSI files treated as a single product via some custom Installshield constructs. It appears to be a setup.exe type launcher that also is registered to handle ARP repair / modify.


In chat JLott confirmed that this command worked:

Alliance.G5.exe /remove /s

Full command used by JLott:

C:\Windows\system32>Start C:\AllianceInstall\G5\Alliance.G5.exe /remove /s

In addition to the above, you should be able to uninstall each individual MSI by finding its GUID and uninstalling via msiexec.exe.

This simple powershell command will provide a list of installed products with "identifying code". You can pass this code to Windows installer like this: msiexec.exe /x {GUID-HERE}

get-wmiobject -class Win32_Product 

Or you could select to view it in list form:

get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, Version

Stein Åsmul

You must verify that the product actually uninstalls correctly in the first place. Please try to read the following article and test the uninstall in different ways: Uninstalling MSI files

I would recommend trying to log the whole uninstall and see what the log says:

msiexec.exe /X "C:\Install.msi" /QN /L*V "C:\msilog.log"

or if you have the GUID (see linked article above for how to find it):

msiexec.exe /X {YOUR-GUID-HERE} /QN /L*V "C:\msilog.log"
PhilDW

Why is that msiexec command pointing to an executable? That's incorrect. You use the /X command passing the ProductCode. You must use that if you don't have the original MSI file.

This vbscript will list all the installed MSI products on the system, reporting their names and ProductCodes. Use it to find the ProductCode and use it in an msiexec command, if that's the direction you want to go. Save it as .vbs file and run it.

Option Explicit

Public installer, fullmsg, comp, prod, a, fso, pname, ploc, pid, psorce, pcache

Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.CreateTextFile("prods.txt", True)

' Connect to Windows Installer object

Set installer = CreateObject("WindowsInstaller.Installer")

a.writeline ("Products")

on error resume next

For Each prod In installer.products

   pid = installer.productinfo (prod, "ProductID")

   pname = installer.productinfo (prod, "ProductName")

   psorce=installer.productinfo(prod, "InstallSource")

   ploc = installer.productinfo (prod, "InstallLocation")  

 pcache = installer.productinfo(prod, "LocalPackage") 

   a.writeline (prod & " " & pname & " installed at " & ploc & " from " & psorce & " cached at " & pcache)

Next
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!