Uninstalling MHI Products Silently - Installer Utility

This article provides instructions for using the Installer Utility to silently uninstall MHI products.

1. Background

We use an in-house developed manifest-based Installer Utility which consists of the following files:

Installer-Silent Uninstall-InstallerFiles.png (29 KB)

The Installer Utility is based on the MyUpdater utility and is used to install the following products:

  • PSCAD Free
  • Beta versions of all software
  • Released versions of PSCAD, GFortran 8.1, GFortran 4.6, PRSIM, Enerplot, PSCAD Initializer, FACE, and so on

We create and send out a single ZIP installer package which contains the following files and folders:

Installer-Silent Uninstall-Zip Installer Pkg.png (46 KB)

2. Minimum Requirements

The Installer Utility only supports silent uninstalls if Installer.exe is dated Aug 27, 2021 or better.

3. Silent Uninstallation - Method 1

To silently uninstall, say PSCAD v5.1 (64-bit), do the following:

  1. Browse to the manifest folder located here:

    C:\Users\Public\Documents\Manitoba HVDC Research Centre\UpdateClient

  2. Locate the manifest for PSCAD 5.1 (64-bit). In this case, we would be looking for a file called:

    manifest.PSCAD 51 x64.xml

  3. Open that file in Notepad, or similar.

  4. Look for a line that begins with:

    <Product

  5. Look on that line for the quoted value of the Name attribute. For example, see highlighted value below for example:

    Installer-Silent Uninstall-Name Attribute.png (30 KB)

  6. Copy the text inside the quotes, which in this example is PSCAD 51 x64

Note: Do not use the DisplayName value as that is not resolvable in silent uninstall mode.

 

Option 1 - Run in an Elevated Command Prompt

  1. Start an elevated Windows Command Prompt.

  2. Browse to the folder which contains the once extracted Installer Utility engine and \Product folder.

  3. Type in or copy in the following, then press Enter:

    Installer.exe /Silent=True /Uninstall="PSCAD 51 x64"

Option 2 - Create and Run an Elevated Batch File

  1. Browse to the folder which contains the once extracted Installer Utility engine and \Product folder.

  2. Create a new file called SilentUninstall.bat in that folder, then open it in Notepad or similar.

  3. Copy in the following:

    echo off

    REM Ensure we are on the correct drive

    %~d0

    REM Ensure we are in the correct folder

    @cd "%~dp0"

    Installer.exe /Silent=True /Uninstall="PSCAD 51 x64"

  4. Save the batch file.

  5. To perform a silent uninstall, right click on the SilentUninstall.bat file, and select Run as Administrator.

Example - Silently Uninstall PSCAD Free x64

  1. Start an elevated Windows Command Prompt.

  2. Browse to the folder which contains the once extracted Installer Utility engine and \Product folder.

  3. Type in or copy in the following, then press Enter:

    Installer.exe /Silent=True /Uninstall="PSCAD Free x64"

Resolving Uninstall Issues

When running in silent uninstall mode, the Installer.exe will return one of the following codes:

Installer-Silent Uninstall-ReturnCodes.png (75 KB)

If the uninstall fails, you can determine what exactly failed by doing the following:

  1. Browse to the following hidden folder:

    C:\Users\YOUR_USER_ID\AppData\Local\Manitoba Hydro International\Installer\Messages

  2. Open the last auto-saved messages file.

  3. Review the messages for any and all error messages.

  4. You can either try to resolve the issues yourself, or email the messages file to support@mhi.ca for PSCAD support staff to review and advise you on any required resolution steps.

4. Silent Uninstallation - Method 2

Requirement: The product must have been originally been installed using the Installer Utility in order to use this method.

If you have the original Installer, and if it has a SilentUninstall.bat file, then the product can be uninstalled by executing the following code using an elevated script or batch file:

                 “<absolute path>\SilentUninstall.bat”

5. Silent Uninstallation - Method 3

Requirement: The product must have been originally been installed using the Installer Utility in order to use this method.

  • Whenever the Installer Utility is run, it will update the latest cached engine located as shown below, if the executing engine is newer than the cached version,

C:\Users\Public\Documents\Manitoba Hydro International\Installer\Engine

  • So to uninstall a product, for example, GFortran 4.6.2, execute the following code using an elevated script or batch file:

“C:\Users\Public\Documents\Manitoba Hydro International\Installer\Engine\Installer.exe” /Silent=True /Uninstall="GFortran 46"

6. Silent Uninstallation - Method 4

This method can be used to remove program folders and registry keys, whether the product was installed using InstallShield Wizard or the Installer Utility.

  • Use an elevated script or batch file to delete the program folders (if they exist).

  • Use an elevated script or batch file to delete the product registry keys, their values, and any sub keys (if they exist). Contact the MHI support desk for registry keys.

For example, these are the registry keys for GFortran v4.6.2:

HKLM\SOFTWARE\WOW6432Node\MHRC\GFortran\4.6.2
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\GFortran 46
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{46200FCC-0409-11D5-8481-0050BAC22C49}
 

This not necessarily a pristinely clean uninstall, but the application and its installation-related registry keys will be removed.

Any environment variable changes will not be reversed or reverted.

Back