Install Ranorex Agent without Wizard batch file

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 5
Joined: Fri Nov 18, 2016 3:02 pm

Install Ranorex Agent without Wizard batch file

Post by PatrickGruber » Thu Nov 23, 2017 3:34 pm

Hi Community,
I have to install the agent quite often on some machines and the Wizard is really annoying because usually I just click next, next, next and then write the Hostname of that machine inside the Name of the agent.

Therefore I built a script which automatically sets the Name of the agent to the hostname and skips the wizard:

Code: Select all

@echo off
ECHO =================================
ECHO Install Ranorex Agent and set Name to hostname and skip Wizard
ECHO =================================
ECHO (Requires Run as Administrator!)

msiexec /i "C:\temp\RanorexRemoteAgent-2.0.7.msi" /qn

echo Wait for "RanorexRemoteAgent.exe" to start, if started continue!
timeout 15
net stop RanorexAgentLauncher
taskkill /f /im "RanorexRemoteAgent.exe"

echo Name = "%computername%"
echo AcquireLicensePollInterval = 00:00:30
echo Launcher = "Always"
echo LauncherPort = 44789
echo DiscoveryPort = 10000
echo ApiPort = 8081
echo ShowWizard = false
echo ShowMinimizeDialog = true
echo StayOnTop = false
echo KeepSessionConnected = true
echo SessionReconnectTimeout = 00:00:05
echo CustomExecutionDir = ""
echo KeepFiles = 1.00:00:00
echo KeepReportFiles = 30.00:00:00
echo DebugMode = false
) > "C:\Program Files (x86)\Ranorex\Agent\Data\config.toml"

net start RanorexAgentLauncher

echo "Wait a second before the Agent will popup"
Hope this will help you as well or you may optimize this script for you.

Happy testing,