psexec Computer Trick
From my computer, I
can open a cmd console screen with a message on it on another computer using psexec.
Here's how:
- I need to already have administrative privileges on the target computer.
- psexec needs to be installed on my computer.
- I create a batch
file that looks like this:
@echo OFF
echo Tell me if you got this.
echo.
pause
del %0
(The last line is the batch file "self-destruct" command.) - I open a command window, and type psexec \\targetcomputernameorIP -i -c "C:\path\to\file.bat"
The -i switch runs
the process interactively with the logged on user. The -c switch copies
the file to that computer before running it.