I have a client with a legacy VB6 app which we occasionally tweak. It has an exe and many DLL’s. Over the years I graduated from using a batch file to a script (WSF) file to let them pull updates. The script file checks the date of the local version of the file against the date of the files on the server. If any are newer, then the script copies the file down and unregisters then re-registers the DLL.
It’s been a great solution for many many years. Until they started getting new machines with Vista on them.
I had one permission issue after another. This was not simply a matter of running the script as admin. Even (testing) with UAC off, I had no better luck.
To begin with the users run the script that lives on the server. Vista doesn’t like this.
I had to move the script to the local machine.
The script references drive letters that are mapped to network drives.
Changed all network pointers within the script to IP addresses. I haven’t tried using fully qualified network names. That’s a good next step in case IPs change down the road.
Script must be run as admin in order for DLL registration to be allowed. But alas, there is no built in “Run as Administrator” context menu.
Luckily, somebody built one. It’s part of a great updated Vista PowerToys collection. Start with the TechNet Magazine article, New Elevation PowerToys for Windows Vista by Michael Murgolo.
When the original script registered and unregistered DLLs, it did so quietly. In Vista the response messages were displayed.
I modified the script to make those be silent using the command line switch: regsvr32 /s
Now this is a nice short little list. But just imagine how many hours of frustration I went through to get to this.
One thing I found when web searching how to solve this problem was many many blog posts and forum threads from real live sysadmins also complaining vocally about this problem. It seemed as though there would just be no solution at all. The last lingering thing that I don’t like is that the users must right click the shortcut to run the script as an admin. It’s not intuitive. Fortunately we can assure that each user going to Vista can have this explained to them since we’re not talking about thousands of end users. In scenarios where there are lots of end users, I would hope that there are smarter deployment techniques in place. Our .NET apps are all distributed and updated via ClickOnce. Not that this was effortless to achieve. It took years for Microsoft to get the technology almost right and even then we struggled and sometimes still feels like a house of cards.
Don’t breathe!



