Jump to content

KillAll.bat


digip

Recommended Posts

I was playing around with TASKKILL in windows XP(through VMWare) and took a screen print of the output.

This is a bat file that quickly kills all system processes and forces a reboot. I was wondering if anyone here had any one liners that do the same thing. There is pretty much nothing you can do to stop it once it runs. It can also be setup to run against a remote computer by specifying the /S switch and then giving it the computers name or lan ip address if you need to bring it down dirty and force a reboot.

If someone is just a normal or restricted user, and not setup with Adminsitrator access, will it still execute and force the reboot? I have yet to try this, but I would think there are ways to cause this from any user login other than those blocked from running bat scripts.

Link to comment
Share on other sites

I think you can stop this by
shutdown -a

via cmd?

Shutdown -a aborts a shutdown..works, but leaves all the tasks in the system listed as user unknown.

All that is possible after that is a logoff, because there will be no option to "shutdown" from start > turn off computer Picking switch user leavs you with no option to log back on when you logoff, the user icon is gone and a windowskey + L does not bring up the admin login box as well. You would still need to reboot to get back in.

I am trying to add other commands to maybe stop them from being able to get a command or run promt to enter this "shutdown -a" command.

I think for the average user they will not kno wwhat to do when explorer.exe closes and they don't know that they can use taskmgr to get a run prompt to enter "shutdown -a".

Link to comment
Share on other sites

The USB switchblade is good at that also ;)

Just about every computer I plugged it into rebooted, now all the guys in the office don't let me near their PC's if I have a USB stick in my hands!

But anyway....

to RESTART Windows XP:

    SHUTDOWN -r -t 01

to SHUT DOWN Windows XP:

    SHUTDOWN -s -t 01

no input required (if you use -s -t 01) it will shutdown in one second.

Link to comment
Share on other sites

The USB switchblade is good at that also ;)

Just about every computer I plugged it into rebooted, now all the guys in the office don't let me near their PC's if I have a USB stick in my hands!

But anyway....

to RESTART Windows XP:

    SHUTDOWN -r -t 01

to SHUT DOWN Windows XP:

    SHUTDOWN -s -t 01

no input required (if you use -s -t 01) it will shutdown in one second.

That's awesome. I see with a -m computername switch you can do this over the network as well.

I like the shutdown -i for getting a bunch on the network ;)

Some things I found while searching google:

http://www.robvanderwoude.com/shutdown.html

http://blogs.technet.com/jhoward/archive/2.../23/378726.aspx

Link to comment
Share on other sites

The USB switchblade is good at that also ;)

Just about every computer I plugged it into rebooted, now all the guys in the office don't let me near their PC's if I have a USB stick in my hands!

But anyway....

to RESTART Windows XP:

    SHUTDOWN -r -t 01

to SHUT DOWN Windows XP:

    SHUTDOWN -s -t 01

no input required (if you use -s -t 01) it will shutdown in one second.

That's awesome. I see with a -m computername switch you can do this over the network as well.

I like the shutdown -i for getting a bunch on the network ;)

Some things I found while searching google:

http://www.robvanderwoude.com/shutdown.html

http://blogs.technet.com/jhoward/archive/2.../23/378726.aspx

I love the shutdown -i command.  Not only for messing with people, but its a great tool to force reboots and consequently run startup scripts to update software.

Link to comment
Share on other sites

try this

Just run it like this to use the program name:

TASKKILL /F /IM "notepad.exe"

Or this to kill it based on the process ID:

TASKKILL /F /PID 1234

Does that work?

PID changes every time you boot(I think) or start a program. Its a process id assigned by the kernel to keep track of programs. But don't quote me on that.

Link to comment
Share on other sites

it doesnt work on all computers but you could just use:

tskill *

I always thought that was related to Terminal Services. Good to know!

Link to comment
Share on other sites

  • 2 weeks later...
Here in c ++ just do this.

#include<windows.h>

int main ()

{

ExitWindowsEx (EWX_REBOOT ,0) ;

}

the include windows is to include the function to reboot windows without prompt.

and the rest is simple.

.386
.model flat, stdcall

option casemap:none

include masm32includewindows.inc
include masm32includekernel32.inc
include masm32includeuser32.inc

includelib masm32libkernel32.lib
includelib masm32libuser32.lib

.code
start:
   invoke ExitWindowsEx, EWX_REBOOT, NULL
   invoke ExitProcess, 0x00
end start

Assembler ftw.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...