-1

I am having a 3rd party software in my machine. Let the name be Temp.msi

Now I need to uninstall this software when I am installing my setup (setup.exe).

It should not ask for any prompt, is there any way in installshield to do that?

StackUser
  • 329
  • 1
  • 3
  • 14

1 Answers1

0

If you have the msi which was used to install the software, You can create a custom action that performs silent uninstall of that product by using:

msiexec /uninstall <msi file> /quiet

(or, for Windows XP/2003: /x <msi file> /qn)

If you don't have the original msi, you need to know, or figure out, the Product Code of that software and use

msiexec /uninstall <product code> /quiet

Figuring out the product code can be done in several ways, a lot of information about it is available, such as here.

Community
  • 1
  • 1
yossiz74
  • 889
  • 1
  • 9
  • 16
  • Thanks for the response. If I use the above command in command prompt, it is un-installing the product. But if I use the same command in install shield custom action, it is giving the following error, "Error 1722.There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action NewCustomAction2, location: C:\Windows\SysWOW64\, command: MsiExec.exe /uninstall {C802D011-8E20-4F87-BE0E-D05E4A5091F1} /quiet – StackUser Mar 30 '16 at 13:06
  • 1. Where did you place it in the sequence? 2. Does it run as immeidate execution or deferred execution? – yossiz74 Mar 31 '16 at 06:10
  • you are getting this error because, we can not perform simultaneous installation & uninstallation. Windows dont allow to do this. So to achieve your goal, you can add one prerequisites & in that you try uninstallation of temp.msi. So in this case, Prerequisite always runs before starting of installation procedure of main installer. – Ajit Medhekar Apr 04 '16 at 07:36