Hello,
I have a user that loves to play games and watch movies during working hours (as we all do), I often use pskill.exe and pslist.exe from sysinternals (fun little apps that lists & kills processes remotely on client machines) to get the job done, but I am trying to automate it a bit more (getting lazy) by setting up two .bat files (one if possible) that will:
a.) Launch PSLIST in a DOS window with programs variables set while keeping the DOS window open.
b.) Launch PSKILL in a seperate DOS window with
a PROMPT for the next command in the comand line.
What I have done thus far...which works for my purposes.
a.) I setup a shortcut with the target of:
C:\WINDOWS\system32\cmd.exe /K C:\whodunnit.bat to keep the DOS window open. The 1st .bat (whodunnit.bat) file goes like this:
c:
@ ECHO OFF
title OPERATION KILLJOY!
START "KILLJOY" c:\whodunnit2.bat /MAX
pslist -t \\COMPUTERNAME -u COMPUTERNAME\administrator -p LOCALPASSWORD
b.) This is where I'm stuck, is there a command that allows DOS to prompt you for the next command/INPUT, such as entering a computer name or typing in a non-static number (process thread) with the ability to press ENTER to initialize it???
I was even thinking of creating a MENU if that would seem feasible enough. What I have so far on c:\whodunnit2.bat:
c:
@ ECHO OFF
pskill -t \\COMPUTERNAME -u COMPUTERNAME\administrator -p LOCALPASSWORD 1028
The 1028 in the command would be the non-static thread number that would change dynamically, it could also be replaced by the .exe name of the process. Any ideas out there?