Windows Deploying Messenger via Command Line
- Introduction
- Deploying via Command Prompt
Introduction
Messenger is available as an msi on Windows for easy deployment via command prompt or for mass deployment via your favorite RMM, MDM, or other deployment solution.
1. Finished setting up messenger.
2. Understand the difference between Partner-level and Customer-level deployments.
About Messenger for Windows
Messenger lives in the tray and by default will auto start with Windows. To open the app, find the icon in your tray and open it.
Deploying via Command Prompt
Retrieving your App ID
You will need an App ID to deploy Messenger for your customers - this tells messenger to inherit your branding.
You can retrieve your partner-level App ID from the Thread Admin Panel -> Messenger -> Installation.
Recommended MSI per-user context
The Messenger Installer will only add Messenger for Windows if it was never installed for the user currently logged into the machine.
What to consider:
- Automatic updates are downloaded and installed for each member
- No need for maintenance — Messenger will keep itself up-to-date and secure
- Every member maintains their own version of Messenger
- Uninstalling the MSI installer won't remove the Messenger app from user accounts
Silently deploy Messenger at USER context and skip Sales Question
msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE FLOW=customer INSTALL_TYPE=user /qn
MSI system context
What to consider:
- All user-related data (workspace info, preferences, logs) is stored in %ROAMINGAPPDATA%.
- Teams must monitor that the latest version of Messenger is installed.
- IT maintenance required to keep Messenger up-to-date and secure.
Silently deploy Messenger at SYSTEM context and skip Sales Question
msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE FLOW=customer INSTALL_TYPE=system MSIINSTALLPERUSER="" /qn
Additional Arguments
Command Arguments | What it Does |
APP_ID=YOUR_APP_ID | Deploy the .msi with your APP_ID & enter your parent or the client APP_ID. Required msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE INSTALL_TYPE=user FLOW=customer |
FLOW=customer | This enables a support-only flow which allows you to bypass the first screen in the end-user messenger experience. This screen asks the question which routes to either a sales or service flow. msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE FLOW=customer INSTALL_TYPE=user |
MSIINSTALLPERUSER="" | By default, Messenger installs at the user context. Adding this flag allows you to deploy at the system context. But keep in mind that system context installs don't support auto-updates and you need to maintain auto-updates, by creating scheduled re-installs msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE MSIINSTALLPERUSER="" INSTALL_TYPE=system FLOW=customer |
STARTUP=disabled | By default, Messenger will auto start with Windows. Adding this flag allows you to deploy Messenger so that it doesn't auto start. msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE STARTUP=disabled INSTALL_TYPE=user FLOW=customer |
/qn | Install silently msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE INSTALL_TYPE=user FLOW=customer /qn |
/norestart | Prevent system restart, only needed for uninstallation. |
Command Line Examples (PowerShell Scripts)
Uninstall Messenger without Restart
- Find IdentifyingNumber (UUID) of Thread .msi app with the command below and copy IdentifyingNumber with braces around.
Get-WmiObject -class Win32_Product | ? {$_.Name -eq "Messenger"}
- Uninstall the messenger silently without system restart. Replace {IDENTIFYING_NUMBER} with the one you found.
taskkill /f /im Messenger.exe ; msiexec /x "{IDENTIFYING_NUMBER}" /qn /norestart
Keeping SYSTEM context installs up-to-date
By default, Messenger will auto update only USER context installs. If you deployed at SYSTEM context you will need to force update the app from time to time
# Kill a running instance
taskkill /f /im Messenger.exe
# Install latest update
msiexec /i "https://assets.getthread.com/messenger/downloads/desktop/messenger.msi" APP_ID=YOUR-APP-ID-HERE FLOW=customer INSTALL_TYPE=system MSIINSTALLPERUSER="" /qn
Unistall Messenger (Windows)
Uninstalling from User context (follow 2 steps below)
- Create
FIRST_STEP_Uninstall_Messenger.bat
and run the following batch script
@echo off
echo Killing any running instances of Messenger...
REM Kill any running instances of "Messenger"
taskkill /F /IM Messenger.exe /T
REM If there's a system tray version or other variations
taskkill /F /IM ChatgenieMessenger.exe /T
echo Uninstalling applications...
REM Uninstall "Chatgenie Messenger" or similar names
wmic product where "Name like 'Chatgenie Messenger%%'" call uninstall /nointeractive
REM Uninstall "Messenger" or similar names
wmic product where "Name like 'Messenger%%'" call uninstall /nointeractive
set "packageName=Messenger*"
powershell.exe -Command "Get-Package -ProviderName Programs -Name '%packageName%' | ForEach-Object { Uninstall-Package -ProviderName Programs -Name $_.Name -Confirm:$false }"
echo Applications were successfully uninstalled.
pause
- 2. Create
SECOND_STEP_Uninstall_Messenger.ps1
and run the following powershell script `
# Kill a running instance
taskkill /f /im Messenger.exe
# Define the path to the Messenger Uninstall.exe
$updatePath = "$env:LOCALAPPDATA\Programs\Messenger\Uninstall Messenger.exe"
# Uninstall Messenger for the current user silently without confirmation dialog
Start-Process -FilePath $updatePath -ArgumentList "/S" -Wait
Uninstalling from System context
# Kill a running instance
taskkill /f /im Messenger.exe
# Define the name of the app to uninstall
$appName = "Messenger"
# Function to get the Product Code of an installed MSI package
function Get-ProductCode {
param([string]$appName)
$uninstallKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
$uninstallKeyWow6432 = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
$appKey = Get-ChildItem $uninstallKey, $uninstallKeyWow6432 |
Get-ItemProperty |
Where-Object {$_.DisplayName -eq $appName}
if ($appKey -ne $null) {
return $appKey.PSChildName
}
return $null
}
# Get the Product Code of the app
$productCode = Get-ProductCode $appName
if ($productCode -ne $null) {
# Uninstall the app using the product code
Start-Process msiexec.exe -ArgumentList "/x $productCode /qn" -Wait
} else {
Write-Host "App not found."
}
To uninstall messenger for MacOS please visit this page.
Customizing Messenger Behavior
Changing Messenger shortcut icon
Create the powershell script (eg. changeIcon.ps1) and run it
$shortcutPath = "C:\Users\USER_NAME_HERE\Desktop\Messenger.lnk"
$iconPath = "YOUR_ICON_PATH_HERE.ico"
$shell = New-Object -ComObject WScript.Shell
$shortcut = $shell.CreateShortcut($shortcutPath)
$shortcut.IconLocation = $iconPath
$shortcut.Save()
Deeplink support
# **Open Messenger from other applications using deep links**
# Trigger this url:
# our legacy link was chatgenie://?open=true
thread-messenger://?open=true
# With Powershell:
Start-Process -FilePath "thread-messenger://?open=true"
App Auto-startup Windows 10+ (default: enabled)
When Messenger is installed and opened for the first time. Massenger gets registered to the registry of windows startup apps. The user can disable and enable autostart for Messenger from Windows 10 settings menu or from Taskbar → Startup tab