Windows Deploying Messenger via Command Line

Stephen Boss Updated by Stephen Boss

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.

Before proceeding, make sure you have completed the following:
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.

The Messenger Installer will only add Messenger for Windows if it was never installed for the user currently logged into the machine.

This method is best for systems where employees work from their own machine or device.
This method is not recommended for systems where many people use the same machine (like terminal servers) or if you'd like more control over which version of Messenger is deployed.
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

We recommend this deployment method as USER context installs support auto-updates and your users will always run the latest version of Messenger
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

This method is best for systems where many people use the same machine (like terminal servers) or if you'd like more control over which version of Messenger is deployed.
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

This is not recommended as SYSTEM context installs do not support auto-updates and you will need to manage scheduled re-installs and make sure that users have the latest version
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
  1. 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"}
  1. 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

# 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."
}

Advanced uninstall scripts:

  1. Download and run the Windows Uninstall Chatgenie and Messenger.bat file
  2. Download and run Messenger exe uninstaller.bat to remove any remaining copies

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()
# **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

How did we do?

Deploying Messenger to Mac

Contact