« June 2007 | Main | September 2007 »

August 2007 Archives

August 20, 2007

WPKG and Remote Windows Administration

I installed WPKG on the new Windows template this semester. Its remote administration capabilities are already proving useful.

On a Samba domain, there isn't much that you can do to modify your Windows machines once they are installed. We use Symantec Ghost to generate new templates every semester, but that's hard work and bugs do not get fixed very fast. Ghost Console is a theoretical solution for this, but our computers in outside labs are connected to us by a magic VLAN (not run by us) that eats multicast packets. And I have heard bad reports about trying to install large packages through Ghost Console.

I put together a remote administration system a year ago based on PsExec and some batch scripts. It was a failure. It was too complex and one of the biggest problems was keeping track of failed installs and newly ghosted computers.

I thought about writing a new system, one with an actual GUI, etc., but I thought I'd give WPKG a spin first. It's not perfect, or even all that good, but it gets the job done.

In past two or three days I have used WPKG to:


  • Push out the new Adobe Illustrator serial key to every machine.

  • Push out fixes to machines using Epson 4180 scanners.

  • Push out special All Programs menus to "special needs" machines.

  • Change our McAfee anti-virus settings.


The Adobe Illustrator key was the hardest part. Adobe was slow generating the key, and got it to us just hours after we began installing the latest template. I had installed Illustrator, but without the key it was useless.

My first step was to call up Adobe to ask them for a command-line method to insert the key. As expected, I didn't have any luck with the tech support guy I spoke to. "That's going to have to stay a secret," he told me.

I could have tried a silent reinstall. I knew that a silent install of Illustrator was possible, since I had done it with Adobe CS2. Unfortunately, the silent installer wanted the original media. And it wanted that media in the same place as it had been on the first install. And it wanted the media for every CS3 product on the computer, not just Illustrator. That wasn't really doable across the network.

So I decided to write an AutoIt script to install Illustrator. Writing macro programs is always a pain, but that's life. It was important to use "WinWait" commands instead of "WinWaitActivate" and "ControlSend" instead of "Send" because I would be dealing with non-visible Windows. I ran into a bug with "ControlSend" sending ";" instead of ":" but I worked around it.

The hard part came when I tried to run the AutoIt script through WPKG. System users cannot interact with GUI programs. I looked around the web to find out how other people had dealt with this, and it turned out that they mostly hadn't.

The only solution I did find was impossible for us. He had used auto-login user to run his WPKG installs at boot. This method struck me as intrusive, and besides, it seemed impossible with an already deployed system.

I thought about using "runas /USER:Administrator" but that can't be scripted.

So I downloaded PsExec, the old SysInternals tool, and used that to make connections as Administrator to the local machine. As long as PsExec is passed the "-i" flag, everything works.

The scripts for the non-Illustrator changes were built along similar lines.

So that's remote Windows administration in a nutshell for you. It makes me want to write a serious tool for doing all this instead of relying on all this hackery, but that will wait until someone decides they want to pay me to do it.

About August 2007

This page contains all entries posted to Coding Is Hard in August 2007. They are listed from oldest to newest.

June 2007 is the previous archive.

September 2007 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.35