Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

kill remote application (See related posts)

'probably 2k and xp only

'not my own code. Borrowed from
'http://groups.google.com/group/microsoft.public.scripting.vbscript/browse_thread/thread/f197a145c8c9f1e6

Option Explicit

Dim sComputer, sProcess, oShell
Const WindowStyle = 0
Const WaitOnReturn = True

sComputer = "XXXXXXX" ' remote machine
sProcess = "XXXXX.exe" ' app on remote machine
Set oShell= CreateObject("WScript.Shell")
oShell.Run "TaskKill /s " & strComputer & " /im " & strProcess & " /f", WindowStyle, WaitOnReturn
Set oShell = Nothing


You need to create an account or log in to post comments to this site.


Related Posts