Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to place a shortcut on a client which will run a bat (or vbscript) file on a server? (as opposed to the script running on the client)

It seems pretty basic, but I'm at a loss how this would be done.

share|improve this question
up vote 3 down vote accepted

There is an excellent suite of tools called PsTools which includes PsExec. PsExec allows you to remotely execute programs on another machine (or in this case a server). You have to have the appropriate authority/credentials to do so of course.

The following psexec command would run the batch file my_batch_file.bat located in directory "C:\batch" (on the server) as user 'johndoe' with account password 'Asdf1234' on server with name 'ServerName':

psexec \\ServerName -u johndoe -p Asdf1234 c:\batch\my_batch_file.bat

Note that the batch file would have to exist on the server already in this example.

Read more about PsExec here:

share|improve this answer
Thanks, looks like a great option. Since I posted I started going to iis route to run the file, since iis happens to be running on the server already. If that causes me any trouble I'll use psexec. – David Jun 4 '12 at 18:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.