WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WMI
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WMI causing LLSMGR to start

Keywords:    WMI Control console  LLSMGR

Question:

I am running the attached code within a larger script and it uses WMI to get the LastBootupTime of a server.
CurServerName="MYSERVER"
Locator = ObjectOpen("WbemScripting.SWbemLocator")
Service = Locator.ConnectServer(CurServerName,"root/cimv2")
Security = Service.Security_
Security.ImpersonationLevel = 3
Class = "Win32_OperatingSystem"
Instance = Service.InstancesOf(Class)
hEnum = ObjectCollectionOpen(Instance)
Obj = ObjectCollectionNext(hEnum)
LBT = Obj.LastBootupTime
LBT = StrSub(LBT,1,14)
ObjectCollectionClose(hEnum)
ObjectClose(Instance)
ObjectClose(Security)
ObjectClose(Service)
However, the moment the line 'Instance = Service.InstancesOf(Class)' executes, a copy of the Licensing Service Manager LLSMGR.EXE starts up on the remote machine (a Windows2000 Advanced Server, SP2, running temrinal services in Remote-Admin mode) running under the security context of the privileged account I use to make the call!!

Subsequent runs of the program create further LLSMGR.EXE processes on the servers!!

Any clue why this would be happening and how we could stop this, since it managed to keel over one of our servers recently?

Answer:

Make sure you close all the objects.

Also maybe try ObjectAccess instead of ObjectOpen. The theory is that if it is already running, it will use an existing copy. Might work.

Also, my guess is that LLSMGR.EXE is getting started as a result of the remote connect.

What happens if you attempt to connect to this machine via the WMI Control console?

To open the WMI Control console, click Start, click Run, type wmimgmt.msc, and then click OK....Connect to the remote machine and see if LLSMGR shows up...

Resolution:

So, I am now closing all the Objects, and using ObjectAccess() instead of ObjectOpen() and although it still created the LLSMGR.EXE process, it does not seem to create additional processes now when the routine is run several times.

And when I connect via the WMI Control console, that starts it, at least once you connect and then select 'Properties'! But I pick a different server and try this, and the process does not start there...

I did some comparisons between the affected servers and others on our network, and found that the affected servers had a number of registry keys defined that referenced the LLSMGR application, which were not present anywhere on other servers.

I exported the various registry keys, deleted them and re-ran the WMI queries... and no more LLSMGR processes!

So, something must have caused the application to register itself in some way on these servers which in turn led to the processes being started during WMI calls.

Anyhow, seems to be fixed now.

Thanks for your time in helping with this!


Article ID:   W15364
File Created: 2002:09:05:13:51:28
Last Updated: 2002:09:05:13:51:28