//flex table opened by JP

Click to See Complete Forum and Search --> : Force all open programs to close from command line?


tantone
01-07-2004, 11:24 AM
Is there are way to do this without logging the user off or shutting down/rebooting the computer at the same time?

rraehal
01-07-2004, 02:20 PM
You can try this program:
http://www.beyondlogic.org/solutions/processutil/processutil.htm

There is a program that comes with Windows to do this but I do not remember the name. It is a little more cumbersome to use than the link above.

Why not use task manger to kill programs?

capybara
01-08-2004, 08:58 PM
Originally posted by rraehal
You can try this program:
http://www.beyondlogic.org/solutions/processutil/processutil.htm

There is a program that comes with Windows to do this but I do not remember the name. It is a little more cumbersome to use than the link above.


pskill is part of the windows resource kit

Bob The Great
01-08-2004, 09:22 PM
you can type tasklist then just end explorer by typing taskkill then explorers PID. If its XP it should go offline which will kill most things but it will restart giving you a cleandesktop.

just remembered something else, I think if you type taskkill /s it will kill the system tasks, I don't remember if it reboots or just restarts...

seanieboy77
01-10-2004, 11:59 PM
I always hit alt F4 and it'll shut down whatever you/re running - takes you back to the desktop

Swordfish
01-11-2004, 12:13 AM
Originally posted by rraehal

Why not use task manger to kill programs?

ditto....the name(Task Manager) itself was self explanatory.

CTRL+SHIFT+ESC.:t

tantone
01-11-2004, 02:19 AM
I probably should have specified that I needed to be able to do this from a command line as in a batch file being run in the background?

Actually, I needed to do this from the command line because I wrote a batch file, with the help of a VB script, that installs a few software updates for our users (who have user-level access) using the credentials of a temporary domain admin account I set up--and I needed this batch file to run without any user intervention whatsoever.

The runas command in the batch file still forces you to type in the password of the account, which is where the VB script comes in. It takes care of that for the users.

BUT, the updates that were being installed required that certain programs NOT be running as it would really make things ugly--for the user and for me.

So, I needed some way to kill those certain programs automatically from within the batch file (you can ask a user to ensure that those programs are closed, but inevitably, a ton of people will still mess it up).

Anyway, I found a nice little program called "process.exe" that you can call from within the batch file, tell it which proces to close (either the PID or the process name) and it will take care of it. I just type in the batch file the process names of the two programs I need closed prior to the installation and it takes care of it, then kicks off the updates.