Jump to content
Greg.Buerk

Secondary Agent Configuration

Recommended Posts

The Secondary Agent is a way to reconfigure the labtech server to deploy agents to a different base path and registry location. This transformation effects each and every agent on the server and can not be used adhoc. When reconfigured the agent will use a different path other than the windows\Ltsvc folder, it will also use another registry location other than HKLM\Software\Labtech\Service.

The Agent is called a Secondary agent but it is in fact a Multi Agent as you can install an unlimited amount of secondary agents on a single computer. As long as each secondary agent has a different path.

 

Server Configuration

To reconfigure the server make sure all agents are removed before starting configuration. A Scripted procedure could be employed to update existing agents to this new system by installing and removing the agent, but that is beyond the scope of this document.

To Configure the server you will need to know several Pieces of information first

1. A Folder to Store the Agent

2. A Short ServiceName

3. A Main Registrykey that will appear under hklm\Software

4. A UDP Port to use for the tray to communicate.

5. The Default Temp Path

6. A VNC Service name

 

Now create a File Called ForceUpdate.cst in the C:\Inetput\Wwwroot\Labtech\Updates. And use this template to create it replacing {#} with the information from above questions. Below the template is a working cst file to use as a guide.

 

 

----Start Template ----

[update]

Object1=WinVNC

Object2=Tray

Object3=Service

[WinVNC]

ProcessName=LabVNC

[service]

ServiceName={2}

UpdateFile1=LTSvc.exe

DestFile1={1}\LTSvc.exe

UpdateFile2=LTTray.exe

DestFile2={1}\LTTray.exe

UpdateFile3=Interfaces.dll

DestFile3={1}\Interfaces.dll

[Tray]

ProcessName=LTTray

[CUSTOM]

BasePath={1}

ServiceName={2}

MainRegkey={3}

TrayPort={4}

DefaultTempPath={5}

VNCServiceName={6}

FullSystemFunction=1

FinishMessage=The Process has Started.

[uninstall]

AddremoveGuid={206A1CA5-EB86-400E-8B60-B27869F18501}

EndTrayProgramsForcefully=False

----- End Template -----

 

 

------ Start Working Example -----

[update]

Object1=WinVNC

Object2=Tray

Object3=Service

[WinVNC]

ProcessName=LabVNC

[service]

ServiceName=LTMonitor

UpdateFile1=LTSvc.exe

DestFile1=%WINDIR%\ServerMonitor\LTSvc.exe

UpdateFile2=LTTray.exe

DestFile2=% WINDIR%\ServerMonitor\LTTray.exe

UpdateFile3=Interfaces.dll

DestFile3=%WINDIR%\LTSvc\Interfaces.dll

[Tray]

ProcessName=LTTray

[CUSTOM]

BasePath=%WINDIR%\ServerMonitor

ServiceName=LTMonitor

MainRegkey=LabTechServer

TrayPort=44000

DefaultTempPath=%windir%\Temp\test

VNCServiceName=SuperVNC

FullSystemFunction=1

FinishMessage=The Process has Started.

[uninstall]

AddremoveGuid={206A1CA5-EB86-400E-8B60-B27869F18501}

EndTrayProgramsForcefully=False

 

---- Finish Working Example -----

 

 

 

Once you have this File Placed in the C:\Inetput\Wwwroot\Labtech\Updates folder the server is immediately a secondary agent server. You do not need to do anything more other than install agents. Server updates from labtech software will install with no modifications needed.

 

Agent Installation and Updating.

To install an Agent you must use the LTSilent.exe derived installers. You cannot use the MSI or a custom manual install. But this means you can just go to your webpage and run the installer and it will install a secondary agent and not affect the primary agents.

Agents update just like they do normally and through the same channels.

To Uninstall an agent you must issue an uninstall command using the labtech server or create a custom uninstaller to remove the service and exes.

Share this post


Link to post
Share on other sites

Hey Greg,

 

Thanks heaps for posting this, Just one question.. I've just setup a server to act as a secondary agent and when ever the Tray launches it is sitting int he taskbar like an active application but crashed. is this normal?

 

Cheers,

Michael

Share this post


Link to post
Share on other sites

Hey Greg,

 

Yeah, I've just taken a bit more of a look at this i can see the lttray.exe is launching and running but no icon is showing, I've checked the template settings and can confirm that the tray icon is set to show also confirmed that in the registry tree, the Icon file i specified has downloaded to my service location folder but it just isn't showing.

 

Might be missing something obvious but maybe not also. Turned up the debugging via registry and no errors that i can see.

 

Edit: LTTray.exe will only load with the first agent to start, still having issues with the "secondary agent" where it will not show the specified icon, but the primary agent also will not load "LTTray.exe" if the secondary agent has it loaded and vice-versa.

 

Cheers,

Michael

Share this post


Link to post
Share on other sites

Bug in Tray Confirmed. Have fixed this for 2013 final release. The problem is the tray has appended \Tray to the settings path and is not loading them. so if the registry is Software\LabTech1\Server\settings the tray is using Software\LabTech1\Tray\Settings. And the tray port is NOT being used, it instead is overriding with the default by reading the registry TrayPort value, example is Software\Labtech1\Tray\Trayport, this one is only broken on a Labtech Server with 64bit OS.

 

In Summary the Tray is Broken and will not function. I would change the "FullSystemFunction" to a 0 to disable it.

Share this post


Link to post
Share on other sites

Just to make sure I am understanding this correctly... This method could be used to install a LT agent from two different systems onto a single endpoint?

 

Server A has LT Agent from Provider A installed on it. With this method, could Provider B install an LT Agent alongside Provider A's?

Share this post


Link to post
Share on other sites

YES. its just that one of the providers need to have there system setup like this. Adn ALSO remeber this is a SYSTEM wide change you can not mix and match in the same system. They ALL have to be like this.

Share this post


Link to post
Share on other sites

Greg,

 

with this agent configuration, could I expand on this to be able to sync custom scripts, EDF's, searches, groups, etc. to the remote agent? I'm trying to find a way to sync content I create in my LT server to another LT server. suggestions? Thanks.

 

-jeff

Share this post


Link to post
Share on other sites

WELL, yes this would facilitate this, but not automaticly. You could set up a Master MSP server like this and install the agent on labtech servers. Now the LT servers have a second agent pointed to you. From this agent you can use the script to connect to the MYSql Database thats local and import\export\update items to keep them in sync. Mind you this would be controlled by YOU and a script.

Share this post


Link to post
Share on other sites

if provider A is managing a client and already has LabTech installed with a default setting.

Provider B (me) comes along and wants to deploy LabTech so I can figure out what the client has and potentially

Can I have a "custom agent" just for a single client. the way I am reading this is that it changes it globally for all my agents out there

 

/ Craig

Share this post


Link to post
Share on other sites

Hi,

 

We have to rebuild our LT server...

Can we use the "secondary agent" feature for the second one, migrate every agent over and remove the old server?

Or better yet, is it possible to convert the existing (installed) agents to secondaries and deploy the new ones as primaries?

 

Thanks :)

Share this post


Link to post
Share on other sites

What is the process for switching over already installed agents to the secondary configuration?

Share this post


Link to post
Share on other sites

Greg, this is an older post, however we have recently developed a need to do this, however have not been able to get it work with 10.5, any reason you can think it would not work anymore?

Share this post


Link to post
Share on other sites

I am just trying to get this to work with our Dev server too. I was able to create the file but when I run the exe installer, nothing happens. I get the UAC prompt but no confirmation that the installation is complete and the new installation directory isn't created. Unfortunately since it is the EXE installer I don't get a specific error message and I don't see anything logged in the eventlogs.

 

Is there any changes I have to make to get this to work?

 

Neal

Share this post


Link to post
Share on other sites
I am just trying to get this to work with our Dev server too. I was able to create the file but when I run the exe installer, nothing happens. I get the UAC prompt but no confirmation that the installation is complete and the new installation directory isn't created. Unfortunately since it is the EXE installer I don't get a specific error message and I don't see anything logged in the eventlogs.

 

Is there any changes I have to make to get this to work?

 

Neal

 

Firstly, you need to be on either LT10 or LT11 to make this work (it was not working properly in LT10.5 IIRC).

 

With LT11, the only way I was able to get it to work for Automation Nation last year was I had to actually uninstall the primary agent, install the secondary agent FIRST, then re-install the primary agent.

 

If your secondary agent shows up in C:\windows\ltsvc and/or HKLM/Software/LabTech/Service , then something is configured wrong in the forceupdate.cst file

Share this post


Link to post
Share on other sites

Sorry to drag this one up from the depths, but does anyone know if this is still possible in Automate 2019.x?

Share this post


Link to post
Share on other sites
4 hours ago, BenF said:

Sorry to drag this one up from the depths, but does anyone know if this is still possible in Automate 2019.x?

Hi Ben,

I did this as recently as 19.5 for the IT Nation Explore labs. I haven't tried since that particular patch, but it should indeed still work.

-Cody

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...