-3
  1. I have taken setup using Installshield. (Setup.exe).
  2. I want c# code to uninstall that exe using Installshield setup product code.
  3. And also, I have to know why exe didn't uninstall while trying to uninstall manually. Its triggers rollback.
  4. My log files seems like this. Is there any problem?

LogFile

Note: I have attached the MergeModule(MSM) in my Installshield setup.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
naveen
  • 89
  • 4
  • First you need to create a valid MSI installer, which can install/uninstall without breaking anything. Second, scan registry keys to locate the one for your InstallShield app, https://support.microsoft.com/en-ca/help/247501/how-to-manually-remove-programs-from-the-add-remove-programs-list and https://learn.microsoft.com/en-us/windows/desktop/msi/uninstall-registry-key – Lex Li Oct 07 '18 at 19:15
  • Please don't post pictures of code and log entries, just add them inline in your question, preferably with formatting, but we can help you add that. Just dump your text in there. – Stein Åsmul Oct 07 '18 at 23:19

1 Answers1

0

Logging & Debugging: If your setup rolled back during uninstall check the MSI log file. You seem to have a log file, so please search it for "Value 3". This trick on MSI logging and debugging is explained in this answer.

Shared Components: Components can be shared by several products that are installed. These components will not be removed during uninstallation unless there is only one product registered as a "client". You can determine what products share the component using this VBScript. Recommend you save it to a text file and run from your desktop. Input the component GUIDs from your log file shown in your question:

Dim installer : Set installer = CreateObject("WindowsInstaller.Installer")
Dim counter : counter = 1

' Get component GUID from user
componentguid = Trim(InputBox("Please specify component GUID to look up (sample provided, please replace):", "Component GUID:","{4AC30CE3-6D22-5D84-972C-81C5A4775C3D}"))
If componentguid = vbCancel Or Trim(componentguid) = "" Then
   WScript.Quit(0) ' User aborted
End If

' Get list of products that share the component specified (if any)
Set componentclients = installer.ComponentClients(componentguid)
If (Err.number <> 0) Then
   MsgBox "Invalid component GUID?", vbOKOnly, "An error occurred:"
   WScript.Quit(2) ' Critical error, abort
End If

' Show the products
For Each productcode in componentclients
   productname = installer.productinfo (productcode, "InstalledProductName")
   productlist = productlist & counter & " - Product Code: " & productcode & vbNewLine & "Product Name: " & productname & vbNewLine & vbNewLine
   counter = counter + 1
Next

message = "The below products share component GUID: " & componentguid & vbNewLine & vbNewLine

MsgBox message & productlist, vbOKOnly, "Products sharing the component GUID: "

DumpComponentList.zip: Windows Installer Expert Phil Wilson has another VBScript which will dump all Windows Installer components to a text file. The above script is adapted from that script which you can find here: DumpComponentList.zip.

DTF: For .NET there is the DTF wrapper for the Windows Installer Win32 / COM API (Microsoft.Deployment.WindowsInstaller.dll - this file is installed with WiX). Here is an answer from Tom Blodget using LINQ to access Windows Installer information.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164