Set Up H2R On-Prem Agent Windows executable service
Instructions to set up On-Prem Windows executable service¶
- 
Download the On-Premise installation package from the connection page as shown below, which contains the setup files needed to install and run the agent.
  - 
Unzip the installation package after it's downloaded. Inside, you'll find five files:
- config.enc
 - run.bat
 - secrets.enc
 - decrypt.bat
 - stop.bat
 
Before running any commands, make sure you're in the folder where you extracted the installation files.
 - 
Open powershell terminal with admin privileges on your windows server.
 - 
Run ./run.bat [ path to private key ] [ -p passphrase ] [ --username username]
Make sure to provide all the options to the command in the order they are mentioned.- path to private key (REQUIRED) -- Path to user's private key. It should always be provided at first position.
 - -p (OPTIONAL) : Passphrase provides an additional layer of security by encrypting your RSA private key.
 - --username (REQUIRED) : Admin username to access the Active Directory server.
 - 
-h or --help : When provided it will display the help text for the script.
Example:
- 
$ ./run.bat \Users\JohnSnow\.ssh\id_rsa --username admin@example.com - 
With passphrase :
 
$ ./run.bat \Users\JohnSnow\.ssh\id_rsa -p secret@16548 --username admin@example.com - 
 
Run 'Get-Service -Name "onprem*"' on your server to check if the agent is up and running. - 
After set up of installed package , click on the "Verify Connection" button.
 
Figure 4. Verify Connection button 
Once the On-Premise Agent is up and running with connection verification, user can continue to configure the workflow by clicking on "Configure Workflow" button.
 
How to stop the running On-Premise agent¶
When the flow is paused or deleted, the user can stop the agent by running the stop.bat script present in the same package. Run the below command in the powershell terminal opened in the downloaded on-prem package directory.
$ ./stop.bat