Heimdal - installer

Looking to transition to Heimdal from current EDR. Have powershell script to install via RMM but looking to push it out via Immy. What information is needed to get a software package added in Immy?

I made a Heimdal install package initally when getting in on ImmyBot - but never requested it created.

For now, if you just want to “make it yourself” this has been a working solution for me.

Dynamic version script:

$UriString = “https://heimdalprodstorage.blob.core.windows.net/setup/HeimdalLatestVersion.msi

$msiContent = Invoke-WebRequest -uri $UriString

$LatestVersion = $msiContent.Headers[“x-ms-meta-version”] -join “”

$LatestVersion = [version]$LatestVersion

Write-Host “LatestVersion: $LatestVersion”

$FileName = ‘HeimdalLatestVersion’

$FileNameWithVersion = “$FileName-$LatestVersion.msi”

$Response = New-Object PSObject -Property @{

Versions = @((New-DynamicVersion -Uri $UriString -Version $LatestVersion -PackageType Executable -FileName $FileNameWithVersion))

}

return $Response;

Install Script (basically 100% copypasted from the “Default MSI Install”):

Invoke-ImmyCommand -Timeout 600 -IncludeLocals {
$InstallerLogFile = [IO.Path]::GetTempFileName()
$Transforms = “”
if($LicenseFilePath -and (Test-Path $LicenseFilePath) -and $LicenseFilePath -like “*.mst”)
{
Write-Host “Applying $LicenseFilePath as MSI Transform”
$Transforms = “TRANSFORMS="$LicenseFilePath”"
}
$Arguments = @"
/c msiexec /i “$InstallerFile” /qn /norestart /l “$InstallerLogFile” HEIMDALKEY=$LicenseValue $Transforms
"@
Write-Host “InstallerLogFile: $InstallerLogFile”
$Process = Start-Process -Wait cmd -ArgumentList $Arguments -Passthru
Write-Host “Exit Code: $($Process.ExitCode)”;
switch ($Process.ExitCode)
{
0 { Write-Host “Success” }
3010 { Write-Host “Success. Reboot required to complete installation” }
1641 { Write-Host “Success. Installer has initiated a reboot” }
default {
Write-Host “Exit code does not indicate success”
Get-Content $InstallerLogFile -ErrorAction SilentlyContinue | select -Last 50
}
}
}

Basically the only thing that is “special” about the Heimdal-installation script is the “HEIMDALKEY=$LicenseValue” that needs to be added in the arguments.

@kbartos @MrBock
I’ve pushed a software to global that seems like it will be correct based on their KB and what @MrBock shared, but I don’t have a license key to test with.

Can you guys check it out and let us know if it works correctly for you?

Hi Gav,

I just tested with our own license, and it seems to work just fine, at least the way it always has for us.

I want to give a heads up generally, that when updating heimdal through Immy, the agent interface, seems to stop running (though the agent service runs just fine) - so for some users the “Heimdal” icon will disappear after an update.

Never an issue we needed to address across our customerbase, but something I’d just throw out there.

Thank you @MrBock @Gav

@MrBock I wonder if this might be as simple as adding a post install script that checks for the process that would usually be running to display the tray icon and if not running to start it… Spit balling here as I’ve not looked at the software installed and have no method of trying to update an existing install.

Maybe reporting to the vendor that updating their software via the SYSTEM context causes that behaviour and perhaps the vendor can provide a fix with their installer.

The Vendor’s support generally has issues understanding questions that are not related to their internal documentation - so no luck there, sadly.

However, a post install script would work - restarting the service seemed to do the trick for the most part.
We have just recently stopped selling (or at least stopped new sales), so we have not bothered to implement a script for it atm.