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

Click here to load this message in the networking platform