[BAT FILE] Using BAT To Exit a Process From Task Manager's Process

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

DigitalAbsence

Thread Starter
Joined
Mar 29, 2009
Messages
3
I Need a Script I Can Input Into Notepad And Save The File As a BAT That Will Exit a Process I Specify, Im New To The Site And Have Low Level Experience In Programing With Notepad BAT Files.
Thanks, -Digital.
 
Joined
Aug 7, 2007
Messages
9,028
Welcome to TSG!

Helps to know what OS you are going to use this in. WinXP and later have the Taskkill command. NT4 and Win2K can use the kill.exe utility from the NT4 Resource kit, or pskill from Sysinternals.

How will you specify the process, by Name or by PID?

taskkill /IM Notepad.exe will kill notepad
add /F to force it to close, and add /T to terminate child processes.

Type taskkill /? in a Command Prompt for all the options.

HTH

Jerry
 

DigitalAbsence

Thread Starter
Joined
Mar 29, 2009
Messages
3
Well I want it to run in windows XP, Basically Im Trying To Create a NON-Harmful Fun Virus Using a BAT file, It Would Kill The "Explorer.ExE" Process. When You End Explorer.ExE It Closes The UI (Start Menu And Bottom Task Bar). Just a Prank For My Friend.
 
Joined
Aug 7, 2007
Messages
9,028
Should've remembered that April 1st is coming up.

Something to think about is that if your friend doesn't know how to use the Task Manager to restart explorer, or to shut down the system, they may just "pull the plug".

Anytime you power off a system rather than shutting it down, there is always a chance of file corruption, which can cause data loss, or even an unbootable system. Especially if your friend tries to boot several times.

If this runs at startup, keep in mind that there are numerous system services and other programs all starting at the same time. Meaning the system is reading from both the System and Software registry hives quite heavily at this point. Corrupt one of those hives, and you could end up with one of these messages:

Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM
Windows XP could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SOFTWARE


Repairing either of these errors, while not too difficult for an experienced tech, would not be considered an easy fix.

So your "NON-Harmful Fun Virus" could end up being anything but.

And if this is a company owned computer; well, I've worked for places where a prank like this would be cause for immediate termination.

Jerry
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top