3

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?

2 Answers 2

8

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.

2
  • My new favourite toy! Thankyou!
    – JMK
    Apr 5, 2012 at 14:45
  • what happen if the exe need to choose something ? or clicking next button ? I need to install kaspersky internet security 2017 on all PCs on my network
    – sam
    Aug 23, 2017 at 17:31
3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .