HP RGS Command Line options not working as expected

1.9k Views Asked by At

I have a HP RGS Receiver v7.1 installed on my desktop which initiates a remote Session to my RHEL based workstation running HP RGS sender deployed in a LAN. Now when launching the HP RGS Receiver it brings up a window asking for the host name or IP Address of the PC to connect to (in this case the RHEL box). When provided the hostname, the next question asked is the username and the password. When all these details are provided, the connection is successfully established and all works as expected. I am trying to autolaunch the HP RGS Receiver so I can bypass entering the hostname or ipaddress, username and password during each launch.

When reading the usermanual, there is clearly a way of doing this by using the HP RGS commandline autolaunch properties. The property Rgreceiver.Session..IsConnectOnStartup should allow me to setup autolaunch while I provide the hostname, username and password in the following properties:

Rgreceiver.Session.n.Hostname
Rgreceiver.Session.n.Username
Rgreceiver.Session.n.Password
Rgreceiver.Session.n.PasswordFormat

So it is assumed that when I pass these as command line options while launching the HPRGS executable rgreceiver.exe it should all read the values from the command line and directly establish the connection without me having to enter these details. However it does not seem to work I assume that in n we specify the session number = 1 (because we are working with only a single session)

The following command does not seem to have any impact:

Rgreceiver.exe -Rgreceiver.Session.1.IsConnectOnStartup=1 -Rgreceiver.Session.1.Hostname="MyHostName" -Rgreceiver.Session.1.Hostname="MyUserName" -Rgreceiver.Session1.Password="mypassword" -Rgreceiver.Session.1.PasswordFormat=Clear

The HPRGS software behaves the same with or without command line and sending in the commandline does not seem to have any impact on the way it launches neither it gives any error. I have tried to above command line through multiple ways (for e.g. using delimeters and without delimiters, using different values for session number and so on) but it seems Rgreceiver does not even recognize that the commands were given in the first place. I have run out of all options. Any help will be appreciated.

2

There are 2 best solutions below

0
On

Update 2016-12-12: As of version 7.3.1 (possibly earlier), this feature is working.

Receiver version 7.3.1 now reads the authentication credentials supplied. If no Password is supplied, then the Username field is ignored.

In a .rgreceiver file, the following may be given:

Rgreceiver.Session.0.IsConnectOnStartup=1
Rgreceiver.Session.0.Hostname=remote.host
Rgreceiver.Session.0.Username=remoteuser
Rgreceiver.Session.0.Password=clear text password
Rgreceiver.Session.0.PasswordFormat=Clear

Note the lack of quotation marks! Any quotes following the Password= will be interpreted as part of the clear text password.

Note that the User Guide states the Username and Password have to be UTF-8.

You should, of course, use the Encrypted option, and encode your password per the RGS manual:

Encrypted= This password format is supported on Windows
only and is the hexadecimal string representation of the password
encrypted using the Windows command CryptProtectData.
See http://msdn.microsoft.com/en-us/library/aa380261(VS.85).aspx
for more information.
Clear= This password format is unencrypted text.
XOR= This password format is the hexadecimal string
representation of a password encrypted using an XOR cipher
using a key of 129.

The Remote Desktop Password Encryption and Decryption Tool linked from Remko Weijnen's blog will apparently do this encryption for you (although I could not get this to work). Since this is the only vaguely secure way of saving your password in the file, I would strongly recommend using only the IsConnectOnStartup and Hostname fields.

For previous versions, the Password field is apparently ignored, and the Username along with it.

Also, the other answer from Christian hints that using a different session number is key. I'm here to confirm that it is: the first session must be number 0.

The following command gets as far as attempting a connection to the specified host and prompting for username and password:

C:\Program Files (x86)\Hewlett-Packard\Remote Graphics Receiver>.\rgreceiver.exe -Rgreceiver.Session.0.Hostname=host -Rgreceiver.Session.0.IsConnectOnStartup=1

Specifying the user with -Rgreceiver.Session.0.Username=user does not work. It needs a .Password= option too.

1
On

You might try using session number "0" instead of "1"? I have used RGS auto-launch files as described in the user guide to connect to test systems, but I used session "0".