Creation of an SFX archive
The .SFX archive is a self extracting archive that will allow you to automate the agent’s setup on installation.
In this documentation we will see how to create this archive with WinRAR.
Prepare the necessary files
To start you need to prepare some files that are mandatory regarding the creation of this SFX archive.
Start by downloading the .zip version of the agent on the dashboard.
Unzip it et gather the following files :
- RG-Setup.exe
- vcredist_x86.exe
Create 2 more files in the same folder as those unzipped files :
- Commentaires.txt which will contain :
Path=%temp%
Setup=RG-Setup.bat
Silent=1
Overwrite=1
- RG-Setup.bat which will contain : /! \ Some information are meant to be modified in the following script - see below /! \
@echo off
REM *******************************************************************************
REM ********************* DEPLOYMENT OF THE RG SUPERVISION CLIENT ********************
REM *******************************************************************************
REM **********Tests the existence of the service and quits if it already exists**************
sc query RG-Supervision > NUL
if not errorlevel 1060 exit
REM *******Set the install path depending on the architecture********
set InstallPath=%ProgramFiles%
if exist "%ProgramFiles(x86)%" set InstallPath=%ProgramFiles(x86)%
REM **********************Installation of the C++ redistribuable package***************
"%temp%\vcredist_x86.exe" /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"
REM **********************Agent setup**********************************
"%temp%\RG-Setup.exe" --action register --login LOGIN --password PASSWORD --node #IDNODE --install-path "%InstallPath%\RG-Supervision"
REM **********************Cleaning************************************************
Del "%temp%\vcredist_x86.exe" /F /Q
Del "%temp%\RG-Setup.exe" /F /Q
:QUIT
exit
In the "Agent setup" section of the script you need to indicate :
- LOGIN : your connection login on the dashboard (email address)
- PASSWORD : the password linked to the login
- #IDNODE : ID of the node* in which you want to deploy preceded by #.
*To get the node ID :
- Select the node in the RG dashboard
- Check the URL of the page : right after …/node/ you should see a number. This is the ID
Generate SFX archive
Now that we are all set regarding the files we can generate the SFX archive :
-
Select the three following files :
- RG-Setup.exe
- RG-Setup.bat
- vcredist_x86.exe
-
Right-clic -> Add to archive…
-
On the setup page :
-
Place yourself on the “Général” tab and tick “Create an SFX archive” :
-
Next, place yourself on the “Commentary” tab and “Browse” to select the Commentaires.txt file created earlier :
-
-
Finalize by clicking on “OK”