Using LE Launchers…

This blog post was inspired by a question in the Login VSI – Customer Slack. The question was how to automate the use of the launchers, since the launchers require an interactive (logged in user) session and cannot run as a service.

Two different approaches came out of that conversation. I’ll outline both of the here.

1. Using Windows AutoLogon user

This method allows for an almost completely hands-off approach for your launchers. While this approach does NOT require that you have console access (either physical or through you hypervisor manager), that would help if you ever need to monitor the launcher agent(s).

  1. Once you have installed and tested the Launcher Agent, configure Windows AutoLogon. It’s probably best to use a service account that only has rights to the launcher VMs. If you haven’t configured Windows AutoLogon before or need a refresher, see this article Configure Windows to automate logon – Windows Server | Microsoft Learn.
  2. Configure the Launcher Agent to run on logon. Standard methods apply.
    • Logon Script (AD object)
    • GPO – User Config\Policies\Windows Settings\Scripts (Logon/Logoff)
    • Registry Run/RunOnce key – HKCU\Software\Microsoft\Windows\CurrentVersion\Run

This will ensure that when the Windows Launcher (VM or physical) boots up, it will automatically start the launcher agent.

NOTE: Keep in mind that these autologon sessions will be in Session 0 (Console session). So, if you need to RDP to them to check on them, you will need to use the /admin switch for MSTSC.EXE to connect to that session. Or use the hypervisor console if you have access to it.)

2. Microsoft Remote Desktop Connection Manager

Because I have a large number of launchers to manager, I prefer to use Remote Desktop Connection Manager (part of the Microsoft SysInternals tools. You can download it from Remote Desktop Connection Manager – Sysinternals | Microsoft Learn

I also have worked in large environments where I do not have access to the hypervisor to console into the launcher VMs.

BTW, you can also use RDCMan for the physical launchers that you may be using in remote offices, etc.

With this method, I create a VM that is my “management VM.” It’s only function is to provide access/visibility to my launchers.

Setting up Remote Desktop Connection Manager

I use an AD account that, again, is only used for working with launchers, a “service” account, if you will. I will logon to the Management VM with this account, as well as the Launchers themselves. This allows the other members of my team to logon to check on the launchers if they need to

  1. RDCMan is a portable application and you don’t need to install it. Just download the .zip file and extract the executable to a folder.
  2. You should create a group for you launchers. This allows you to define the connection properties at the group level and let the children inherit them. For instance, if the password changes, you only have to change it once, at the group level. You can segregate launchers by regions, datacenters, applications being tested or whatever you like. You can also next groups!
    Click on File\New.
  3. Choose a name and location for the .RDG file, which will also be the name of the group in the tree,
  4. Now, let’s add some servers to the group. Click on Edit/Import Servers in the menu bar.
  5. In the Import Servers dialog box, you can add a list of servers by pointing at a text file or just type (or paste) a list of servers in the white box under File name:

    You can also set the properties in this dialog box, which will create the entries with these settings. I prefer to leave them as default, which (for the most part) is Inherit from parent.
    You should now see a tree with your group name and child objects of your servers.
  6. Now, let’s set the parameters for the session connections. These are the settings I use, but feel free to set them to your needs.
  7. Right click on you group name and select Properties.
    • Logon Credentials – This will allow RDCMan to automatically logon to the launcher with the specified credentials when connecting a session.
    • RDS Settings – I set this to match the resolution of the VDI sessions being launched by LE. This helps to ensure that the controls of the applications are on the screen and can be interacted with.
    • Display Settings – This setting controls the behavior of the session window within RDCMan. I like to set the scaling to scale the windows so I can resize teh window any way I want and not have to deal with the scrollbars.
    • Those are really all of the settings that I set, but look around for any others that you need.
  8. After you’ve clicked the OK button, you can test that the group is working by right-clicking on the group and selecting Connect group.
  9. You will get a confirmation window.
  10. You should now see you sessions start to connect to you launchers.
  11. Be sure to save the configuration file. Use the File/Save all menu option. You can save the individual file or save it as a new file. I find it better to get in the habit of Save all, so I don’t miss a config change.

Configure the Launcher Agent to run on logon.

As there are a number of options to do this, choose what works for you.

  • AD User Object Logon Script
  • AD Group Policy User Logon Script
  • Windows Registry – Run\Run Once key
  • User’s Startup Folder (C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)

I prefer using the Group Policy option as it allows me flexibility on when to run it. Since I am using the same account to logon to my Management machine that I logon to the launchers, I can not try to launch the agent on the management machine.

Optional configurations

In the Slack conversation, a requirement to schedule this was mentioned. Another great reason for using RDCMan is that you can run it with command line switches. So you can use your favorite task scheduler to have it automatically run RDCMan and connect your group(s).

On the download page for RDCMan (see above), there is a section with the available command line switches.

Please leave a comment if you have setup/manage you launchers in a different way.

Leave a Reply