Wednesday, March 16, 2011

How to remotely install software

Over the years I have used many Jedi Mind Tricks and utilities to install software onto remote users' PCs. For a while I used to run Microsoft System Management Server (SMS) to push out software and when SMS (not to be confused with "Short Messaging Server", though it is easy to confuse it with "slow Microsoft software") worked, it did a great job of pushing out software. After a while SMS became a problem child at times and I had done some creative things using DOS batch files and registry hacks. In fact those are still my favorite way to do things. I have also done some VBScripting to push out things as well but this doesn't work as well as I would like.

Today I received a message, "How do we push out software with a batch file and have the install run with admin rights?" Well, I knew I had done it before using some Windows Resource kit utils but I hadn't done it in a while. So I began "Googling" to refresh my memory. Along the way I discovered a utility from SysInternals (which Microsoft wisely bought out a few years ago). This utility is called psexec. With it, you can remotely execute programs onto a machine. In my case, I used it to push out Google Chrome browser to people.

You can use this very easily, here is how:

First, you need to go to this page and grab the psexec tools.

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

I put mine in the c:\windows\system32 directory. But you could also open it in another folder and add it to your system path. You will need to run the psexec once to accept the license agreement. When you copy, don't let it overwrite your existing DLL.

Next, create a file In my case, I created a file on the root of C: called serverlist1.txt

Populate it as follows: (one PC name per line)

yourpcname
myneighborspcname

When the file is ready, run this. I ran it on my cubical neighbor's PC and my machine. Probably not perfect test subjects, but the psexec runs as you unless you specify a different user, which is an option if you know their password.

Here is the command (I drop to a DOS command window and run it as follows:

psexec @c:\serverlist1.txt -s -i -d msiexec /i \\mmyserver\public\chrome\GoogleChromeStandaloneEnterprise.msi /qn

The /qn is a MSIEXEC thing that tells it to install quietly. Here are some helpful links along the way.

Windows Environment Variables

A good article that gave me the clues I needed to get this working

No comments:

Post a Comment