We help IT Professionals succeed at work.

Kill an app across domain

918 Views
Last Modified: 2013-12-07
I am experimenting with taskill via winxp and w2k3 server. I have an application that roughly 14 users use across my domain. What I would like to do is create a script to kill this app when it is ran. Reason being this application needs to be reindexed and updated on a regular bassis and users leave it running, going workstation to workstation is getting old. Is there a way I can use taskill or something similar to build a sript to kill these processes. Name of the app is called Coredr.exe and corebuyw.exe.

Can anyone help?
Comment
Watch Question

Below commands can do that.
tskill Coredr.exe
tskill corebuyw.exe
JoeWeb Application Developer

Commented:
Hello armitdept,

You can use Pskill to do this. After you have downloaded it, and installed it try running the below from the command line.

http://www.microsoft.com/technet/sysinternals/utilities/pskill.mspx


usage: pskill [- ] [-t] [\\computer [-u username] [-p password]] <process name | process id>


Regards,

JoeZ430

Author

Commented:
ok i got this to successfully kill a task on a single machine now can you help in killing the app on 14 machines?
Farhan KaziSystems Engineer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Greetings Armitdept,
 
You can utilize Windows XP and 2003 builtin tool called WMIC in batch file or from command line.

Click Start -> Run -> Cmd.exe

WMIC /NODE:@"Computers.txt" Process WHERE "Name='MyProcess.exe'" DELETE
                                    Change this process name ---------------^
       
List all your computer names or IP addresses inside Computers.txt file.  And Change process name that you want to kill.
It will kill that process on all machines that are listed inside Computers.txt file.

Hope this helps!
Farhan

Author

Commented:
How am I going to organize the computers.txt file?
computername coredr.exe
computername coredr.exe
computername coredr.exe
Etc
Etc
Thanks,
Systems Engineer
CERTIFIED EXPERT
Top Expert 2007
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
All of you rock

Author

Commented:
I am sorry I could not split up the points, it would not let me. I owe you all one.

Thanks again.

Author

Commented:
I hope someone is still there....

I run this script and I get the following

Script: G:\Core vb scribt\killcore.vbs
Line: 1
Char: 6
Error: Syntax Error
Code: 800A03EA
Source: Microsoft VBScript compilation error

Can you help?
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.