• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 890
  • Last Modified:

Kill an app across domain

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?
0
armitdept
Asked:
armitdept
1 Solution
 
Ashish PatelCommented:
Below commands can do that.
tskill Coredr.exe
tskill corebuyw.exe
0
 
JoeCommented:
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
0
 
armitdeptAuthor 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?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Farhan KaziSystems EngineerCommented:
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
0
 
armitdeptAuthor Commented:
How am I going to organize the computers.txt file?
computername coredr.exe
computername coredr.exe
computername coredr.exe
Etc
Etc
Thanks,
0
 
Farhan KaziSystems EngineerCommented:
You only have to list computer names inside Computer.txt file.  You have to give process name inside the WMIC statement.
Like:

WMIC /NODE:@"Computers.txt" Process WHERE "Name='coredr.exe'" DELETE
                                                                                              ^-------------------- this is the process name

Computer.txt file should look like:
computername1
computername2
computername3
computernam4e




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

Thanks again.
0
 
armitdeptAuthor 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?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now