Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcefully end task of another program
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00951521
Message ID:
00951580
Views:
8
This message has been marked as the solution to the initial question of the thread.
This requires Windows Scripting 5.X
FUNCTION terminateProcess(lcProcess)
lcComputer = '.'
loWMIService = Getobject('winmgmts:' ;
    + '{impersonationLevel=impersonate}!\\' + lcComputer + '\root\cimv2')
colProcessList = loWMIService.ExecQuery ;
    ('Select * from Win32_Process')
For Each loProcess In colProcessList
   IF UPPER(loProcess.name) = lcProcess
     loProcess.terminate()
   endif
Next
>Hello,
>
>Is it possible to end the task of another program, when having the window handle, using an API call?
>
>Thanks for your help in advance.
Previous
Reply
Map
View

Click here to load this message in the networking platform