Firstly, I can't use Group Policy as our team doesn't manage that. The company is a massive FTSE company with a team for every aspect of IT you can think of.

Our team needs a way of installing programs remotely either by batch files or scripts utlising Windows Installer and .msi files.

I've so far managed to install Java using psexec (see below)

psexec \\pcname -u *username* -p *password* -i 
msiexec.exe /a "msilocation\install.msi"

This works without any problems. However I want something a little more automatic than that.

However what I would like to do is to be able to run a script or batch file from my machine that will install the msi on all remote workstations listed. I'm pretty certain you can list workstations in batch file but I maybe wrong.

I'm not to fussed if I have to do the fix in a script or batch file to be honest. I just can't use Group Policy etc.

  • "massive FTSE company" with no deployment tools?
    – symcbean
    Jun 15, 2011 at 10:01
  • 2
    The corporate domain uses Group Policy, but regional offices like ourselves don't have access to Group Policy and change requests take forever to go through.
    – stead1984
    Jun 15, 2011 at 10:11
  • Then, in addition to bypassing the structures in place, you'll also need to work out how to bypass the software licence auditing tools?
    – symcbean
    Jun 15, 2011 at 10:25
  • We are not rolling out licensed products, mearly pluggins and custom software tools.
    – stead1984
    Jun 15, 2011 at 10:47
  • Are you able to use login or machine startup scripts? Jun 15, 2011 at 12:01

4 Answers 4


Create a text file named COMPUTERS.TXT and put all the computer names in it, one per line.

Then, create a .CMD file with the following code:


I added %%i\ in front of *username to specify the remote machine admin user.


I fixed a typo in the code...changed psexec \\%%1 to psexec \\%%i.


FOR /F "tokens=1" %%i IN (COMPUTERS.TXT) DO (
  psexec \\%%i -u %%i\*username* -p *password* -i msiexec.exe /a "msilocation\install.msi"
  • It doesn't seem to work, I've made the amendments required. I don't get an error message, all the machines are on and on the network.
    – stead1984
    Jun 16, 2011 at 7:31
  • @stead1984 There was a typo in the code. I changed \\%%1 to \\%%i. Try that and see what happens.
    – aphoria
    Jun 16, 2011 at 11:32
  • At my previous job I did it this way, for MSI installation and otherwise, for years to do almost everything. I love PsExec. My favorite tool OF ALL TIME on Winboxen!
    – songei2f
    Jun 16, 2011 at 13:22
  • @aphonia I've made the changes as said but still nothing. It does look like it runs.
    – stead1984
    Jun 16, 2011 at 13:47
  • @stead1984 Try using notepad.exe or calc.exe as the program to run...that will make it easier to determine where the problem is.
    – aphoria
    Jun 16, 2011 at 14:39

I created a VB app that I think fits what you're looking for. The application is called Script Zombie. Basically it passes a host name to script to be executed. You can control how many tasks will be spawned concurrently, so you could have your script running against as many as 25 systems at once.

Here's where you can grab the free application: Script Zombie v0.85


if you have admin on the remote devices doesn't psexec have an command line option that uses a text file for input!

  • That would be great if I didn't need to specify a local admin password, as none of our domain user accounts have local admin rights.
    – stead1984
    Jun 15, 2011 at 12:16

As you are able to use startup scripts perhaps you can script this so that each machine initiates it from that end, rather than trying to push it out from remote. If necessary the script could start by checking a file on a shared resource which lists the machines that should be involved and exit if it's name is not on the list.

You must log in to answer this question.

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