Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a domain full of Windows computers (some are XP, some are Vista, most are 7). I want to run a single executable, once, on each machine without leaving my seat.

I have full administrative access to the entire network. Is there a straight forward way of doing this or am I going to have to get up?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

There is an easy way to do this using psexec. You can get psexec from Microsoft at:

http://technet.microsoft.com/en-us/sysinternals/bb897553

Now what you'll need after installing that to somewhere in your PATH (for example c:\windows\system32), is a text file that has all of the hostnames that you want the command run on. Then you can simply run:

psexec @linktoTEXTfilehere -u username -p password commandtorunhere.exe

Just remember that if the filenames have any spaces in them, to surround them in quotes. Also, if you are using a domain account use the format domain\username when specifying the user to run as.

share|improve this answer
    
My new favourite toy! Thankyou! –  JMK Apr 5 '12 at 14:45

It sounds like you want PSExec from Sysinternals.

e.g.

C:\>psexec \\* c:\bin\test.exe

The \\* part will attempt to run the specified command/program on every machine in the domain. Look at the options for PSExec as there are a number of useful switches you can flip.

share|improve this answer

Your Answer

 
discard

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.