Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default closing a remote process

I am trying to close an application running on a different network computer.

The following kills the Outlook.exe application running on Dell-650 but the
file is not closed properly and creates some problems.

Can anybody point me to information about the WBScrip. object and the
different switches and variables?

Do I have to reference any library? It works but it does not give me access
to help files.

Thanks,

Antonio

Option Explicit
Sub main()


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

sComputer = "dell-650" ' remote machine
sProcess = "outlook.exe" ' app on remote machine
Set oShell = CreateObject("WScript.Shell")
oShell.Run "TaskKill /s " & sComputer & " /im " & sProcess & " /f",
WindowStyle, WaitOnReturn
Set oShell = Nothing

End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing die hard process EXCEL.EXE Francesco Geri Excel Programming 6 October 7th 05 11:16 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM
Mail merge issue - ghost Excel process remains after closing application d_b Excel Programming 1 August 16th 04 02:29 PM
Mail merge issue - ghost Excel process remains after closing application d_b Excel Programming 0 August 16th 04 01:12 AM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"