/build/static/layout/Breadcrumb_cap_w.png
10/11/2018 362 views
Hello guys,

I'm desperate finding a solution to the following issue:

While I'm trying to uninstall a vendor msi, by using psexec and the command msiexec /x Product code /qb! which has a .mst file applied on top of it, the software detects that cmd.exe is running and if I don't click on abort, ignore or kill the process, the uninstallation stops. I've tried to use a custom action inside install shield with the command: cmd.exe /c taskkill /IM cmd.exe with the condition REMOVE~="ALL" and to be run after publish product on deffered execution in system context, but it didn't work. The error 1722 appears.

Please help me. the delivery day for this solution is tomorrow.
Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

0
I think that more details are required to help you.
Is it a message from a custom action or restart manager? If it is the restart manager dialog you can try the MSIEXEC /X with MSIRESTARTMANAGERCONTROL=Disable property added into the command line.

Does the MSI uninstallation complete successfully when you close the CMD window? If yes, you can try to call a VBS script, but I would strongly recommend to find the reason why it is failing and then think about a better solution.
Dim objShell        : Set objShell = CreateObject ("Wscript.Shell")
Dim objFSO            : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim strCurrentDir    : strCurrentDir = objFSO.GetParentFolderName(WScript.ScriptFullName)

objShell.Run "TASKKILL /F /IM cmd.exe /T",0,true
objShell.Run
strCurrentDir &"\psexec.exe -si msiexec /x <<Product code>> /qb! /L*v...",1,true
If this does not solve the issue please upload the MSI uninstallation log file to eg. pastebin.
Answered 10/11/2018 by: rad33k
Second Degree Brown Belt

  • Hi. Thank for your input. In the MSI, I already have the property MSIRESTARTMANAGERCONTROL on Disable. However, I will try the script. And yes, the MSI uninstallation complete successfully after I close the CMD Windows, or not really needed to be closed, just ignored.
    • What is the result of calling msiexec /x with /QN instead of /QB ?
      • The result is what I wanted. Thank you very much!!

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share