Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Killing process
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01328909
Message ID:
01328911
Vues:
13
Check Re: Sergey's IsExeRunning() is TOO good... Thread #1315947 Message #1316077

>Hi
>am using Win32_Process to kill a process which works fine. but i've problem in terminal services environment where it tries to kill processes of other users also. my question is how can i kill process of current user only ?
>Thanks for the advise
>
>m.loCIMV2 = GetObject("winmgmts://localhost/root/cimv2")
>m.loProcesses = loCimv2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'myapp.exe'")
>For Each objProcess in loProcesses
>objProcess.Terminate(0)
>NEXT
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform