Deploying an Installation Package to Multiple Clients

By crmanski

Deploying an Installation Package to Multiple Clients

When you have several machines on your network that need to have an bit of software updated it is easiest to install the software remotely. This article is going to describe the steps you can take to do this.

PREREQUISITES:

  1. You have an NT domain(Ancient) or Microsoft Active Directory

  2. The Machine that you are installing the software on are a part of your domain.

  3. You need access to a domain account that has local administrative rights on the domain workstations. A user in the “Domain Admins” group will work or if you configure a Domain group like “ITStaff” and add it to the local administrators group on the workstations then you could use an account in that group.

  4. Sysinternals Tools from Microsoft (http://www.microsoft.com/technet/sysinternals/). Specifically psexec, which allows you to execute programs on remote machines if you have the correct permissions.

SETUP: I am going to use a recent Adobe Reader package that I needed to install as an example.

  1. Install sysinternals: http://www.microsoft.com/technet/sysinternals/ on your server or deployment machine (You also can do this logged on to a domain workstation as an admin.)

  2. Download and put the installer in a location somewhere on a file server on the network. (EX: \MyServerUpdatesAdbeRdr80_en_US.exe

  3. On the machine you are deploying from make a folder such as c:deployment. Inside this folder make two files: Adobe8Install.cmd and Adobe8-deploy.cmd

Adobe8Install.cmd contents….

echo “checking for Installers directory on the target…”
if not exist \%1C$installers mkdir \%1C$installers
echo “copying Adobe Reader install to install directory…”
copy \MyServerUpdatesAdbeRdr80_en_US.exe \%1C$installers
echo “Installing Adobe Reader…”
psexec.exe \%1 “c:installersAdbeRdr80_en_US.exe” /sAll /rs
rem Removing shorcuts…
psexec.exe \%1 del “%ALLUSERSPROFILE%desktopAdobe Reader 8.lnk”
psexec.exe \%1 del “%ALLUSERSPROFILE%Start MenuProgramsStartupAdobe Reader Speed Launch.lnk”
psexec.exe \%1 del “%ALLUSERSPROFILE%Start MenuProgramsStartupAdobe Reader Synchronizer.lnk”
echo “All Done.”

Adobe8-deploy.cmd

The easy thing to do is to export a list from Active Directory Management. Right click on the OU that has the target machines and choose export(turn off details view first) and save that file somewhere. Open is up and you will have a simple list of machines…

machine1
machine2
machine3
etc….

In this example you would make the file look like this. Make sure it has the .cmd extension…

@echo off

call RemoteAdobeReaderInstall.cmd machine1
call RemoteAdobeReaderInstall.cmd machine2
call RemoteAdobeReaderInstall.cmd machine3

pause

DEPLOYMENT:

Now all you have to do is run the Adobe8-deploy.cmd file and let it go. If a machine is powered on then you should be ok. Certain things can prevent this from working: Windows Firewall, etc, but if you have some policies in effect you should be able to contact your client machines from your domain controller at least.

Good luck!