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:
01328917
Vues:
14
This message has been marked as the solution to the initial question of the thread.
Rajani,

Never being even close to TS, but the following code will also get the owner/domain of the process, maybe you can use that information to selectively kill the processes.
local lcOwner, lcDomain

m.loCIMV2 = GetObject("winmgmts://localhost/root/cimv2")
m.loProcesses = loCimv2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'CALC.exe'")
For Each objProcess in loProcesses
	store Space(0) to lcOwner, lcDomain
	objProcess.getOwner(@lcOwner, @lcDomain)
	? 'Owner:', lcOwner, 'Domain:', lcDomain
	* Here you would code your IF
NEXT
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform