Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of users of myExe
Message
From
25/02/2011 11:15:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
List of users of myExe
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01501843
Message ID:
01501843
Views:
144
Hi,

I would like to built a query resulting a list of all active users of myExe (on Server) in VFP.

so far I have:
lcExe = 'Notepad.Exe'

loLocator = createobject('WBEMScripting.SWBEMLocator')
loWMI = loLocator.ConnectServer()
loWMI.Security_.ImpersonationLevel = 3
loProcess = loWMI.ExecQuery([SELECT * FROM Win32_Process WHERE Name ='] +lcExe='])
create cursor curUsers (username c(20), pcname c(20))
if loProcess.Count>0
   for each loProcess in loProcess
**** get user name 
**** update curUsers
    endfor
endif
How to get the names?

Regards,

Koen
Next
Reply
Map
View

Click here to load this message in the networking platform