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!)

About this user

Bruce M. Axtens http://codeaholic.blogspot.com

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

kill remote application

'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

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed