How do I install or uninstall an .msi or .exe using another .exe?

Article:HOWTO5074  |  Created: 2005-09-29  |  Updated: 2007-11-06  |  Article URL http://www.symantec.com/docs/HOWTO5074
Article Type
How To



Question
How do I install or uninstall an .msi or .exe using an .exe wrapper?

Answer

Follow these steps to execute an .msi  and .exe(B) from an .exe(A).wrapper: 

  1. First both the .msi and .exe(B) that will be launched from .exe(A) should be installed onto the computer using an InstallFiles action.
  2. Next, to install an .exe from within the .exe, you need to use an Execute Program action to launch .exe(B). 
  3. Make sure to select to select Wait for program to Exit on this dialog.
  4. To execute the .msi from .exe(A), use another Execute Program action and populate it as follows:

    Exe Path:  C:\Windows\System32\msiexec.exe
    Command Line: /i <Path to .MSI where you installed it to the end users machine>
    Check Wait for program to exit and use other values as their defaults.

To uninstall .exe(B) when .exe(A) is uninstalled, go to the Uninstall page of Installation Expert in .exe(A).

  1. Select the Add button and select Execute Program.
  2. Go to the registry to determine the uninstall string for .exe(B) (you will need .exe(B) to still create an uninstall log) at:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

  3. Enter the entire string from the uninstall key into the Add field. Use quotes as needed.

To uninstall the .msi from .exe(A).

  1. Retrieve the product code from the .msi. 
  2. Select the Add Button in the Uninstall Page to add in a second Execute program.
  3. Enter <pathto MSIEXEC.exe> /x {ProductCode}.

The product Code has to be in {}. For example:

C:\Windows\System32\msiexec.exe /x {ProductCode}


Legacy ID



2745


Article URL http://www.symantec.com/docs/HOWTO5074


Terms of use for this information are found in Legal Notices