In this article, you will find the steps that you need to perform in order to uninstall the HEIMDAL Agent (Windows). There are several ways how to uninstall the HEIMDAL Agent. Here are the
1. Uninstalling the HEIMDAL Agent from the Control Panel (Programs and Features)
2. Uninstalling the HEIMDAL Agent using the WMIC
3. Uninstalling the HEIMDAL Agent using the MSIEXEC Uninstall string
Uninstalling the HEIMDAL Agent from Control Panel (Programs and Features)
To uninstall the HEIMDAL Agent, you are required to have Administrator permissions. To do that, follow the steps below:
1. Click the Start button and type Control Panel.
2. Click on Programs and then Uninstall a Program.
3. From the Programs and Features list, select the Heimdal Thor Agent and click Uninstall.
Uninstalling the HEIMDAL Agent using the WMIC
Download the Heimdal_Agent_AllVersions_uninstall_script.bat file and run it with Administrator permissions. This script performs a check in the WMI and looks for any application named Heimdal Thor Agent, which it removes. The command line performed by the script is:
wmic product where name="Heimdal Thor Agent" call uninstall /nointeractive
This command line should initiate a silent uninstall of the HEIMDAL Agent as seen in the snippet below:
Uninstalling the HEIMDAL Agent using the MSIEXEC Uninstall string
You can uninstall the HEIMDAL Agent using the UninstallString (in Command-Prompt, running as Administrator). The script below uses the WMIC to find the Product Code (GUID) of the HEIMDAL Thor Agent (which is different from one version to another) and uses it to run the MsiExec to uninstall it. At the end of the command line, we have added the silent parameter /qn to make it run silently):
@echo off
REM Script to get Product Code of Heimdal Thor Agent and uninstall
REM Define the application name
set "appName=Heimdal Thor Agent"
set "productCode="
echo Searching for the Product Code (GUID) of "%appName%"...
REM Use WMIC to find the Product Code
for /f "skip=1 tokens=2 delims==" %%I in ('wmic product where "Name like '%%%appName%%%'" get IdentifyingNumber /value 2^^&1') do (
set "productCode=%%I"
goto :uninstall
)
echo Error: Application "%appName%" not found or Product Code could not be retrieved.
pause
exit /b 1
:uninstall
echo Found Product Code: "%productCode%"
echo.
echo Uninstalling "%appName%"...
REM Construct the MSIEXEC command
set "msiexecCommand=msiexec.exe /X%productCode% /qn"
REM Execute the MSIEXEC command
echo Running command: %msiexecCommand%
%msiexecCommand%
REM Check the exit code of MSIEXEC
if errorlevel 0 (
echo.
echo "%appName%" was uninstalled successfully.
) else (
echo.
echo Error: Application uninstall failed with error code %errorlevel%.
echo Please check the application's documentation or the Windows Installer logs for more information.
)
exit /b 0
In case the HEIMDAL Agent is limited by an uninstall password set in the Group Policy, you can pass in the uninstallpassword='your_password_goes_here' argument:
@echo off
REM Script to get Product Code of Heimdal Thor Agent and uninstall
REM Define the application name
set "appName=Heimdal Thor Agent"
set "productCode="
echo Searching for the Product Code (GUID) of "%appName%"...
REM Use WMIC to find the Product Code
for /f "skip=1 tokens=2 delims==" %%I in ('wmic product where "Name like '%%%appName%%%'" get IdentifyingNumber /value 2^^&1') do (
set "productCode=%%I"
goto :uninstall
)
echo Error: Application "%appName%" not found or Product Code could not be retrieved.
pause
exit /b 1
:uninstall
echo Found Product Code: "%productCode%"
echo.
echo Uninstalling "%appName%"...
REM Construct the MSIEXEC command
set "msiexecCommand=msiexec.exe /X%productCode% /qn uninstallpassword='your_password_goes_here'"
REM Execute the MSIEXEC command
echo Running command: %msiexecCommand%
%msiexecCommand%
REM Check the exit code of MSIEXEC
if errorlevel 0 (
echo.
echo "%appName%" was uninstalled successfully.
) else (
echo.
echo Error: Application uninstall failed with error code %errorlevel%.
echo Please check the application's documentation or the Windows Installer logs for more information.
)
exit /b 0
The script is available for download below.