Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List of users of myExe
Message
 
 
À
25/02/2011 11:15:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01501843
Message ID:
01501845
Vues:
92
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform