Batch PSTools files
I am making a batch file to kill explorer.exe on a remote, and then start it again (Because it keeps crashing on various machines).
The PSKill part works, it kills explorer.exe on the remote machine, however using PSExec doesn't start it again, and I don't know why. I have tried using the -d and -s switches, but that launched explorer.exe in the context of my user, which is useless because it needs to be in the context of either that system, or that specific user logged on. (We don't know their passwords)
Here's what I have so far:
Like I said, it needs to run in the context of the logged on user, without knowing their username and password. Or becoming a VBScript to fish that out or something.
ECHO What is the name of the computer?
SET /P COMPUTERNAME=
PSKILL.exe \\%COMPUTERNAME% explorer.exe
PSEXEC.exe \\%COMPUTERNAME% explorer.exe