Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List of users of myExe
Message
 
 
To
25/02/2011 11:15:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01501843
Message ID:
01501845
Views:
91
Maybe I'm missing something but VFP EXE would run on a workstation not on the server.

>
>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
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform