Blog of the Bao-‘dad’ Tree

Reaching out   –   Giving back   –   Looking inward   –   Paying forward 
« Back to blog

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:
  1. I need to already have administrative privileges on the target computer.
  2. psexec needs to be installed on my computer.
  3. 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.)
  4. 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.

Comments (0)

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter