Guerilla Install Tactics for Visual Studio.NET Final

By Peter A. Bromberg, Ph.D.

Peter Bromberg  

Well, after 3 days and nights of pure torture downloading our MSDN Universal Subscription copy of Visual Studio.NET Enterprise Architect Final at average speeds something like 12Kbps on a cable connection that would normally clock in somewhere between 80 and 120 Kbps, I opened the EN_VS.NET_Ent_Arch_Full.EXE and surprise! - all 24,930 files unzipped perfectly!




As always, I looked at the README stuff. I used to just fire up Setup.exe, but now I'm a little older and hopefully wiser. I've determined that the most important of the Commandments and Great Truths for Microsoft Developers is "Thou shalt carefully examine the README prior to touching Setup.exe". Observing this simple rite with true reverence has improved my efficiency as a developer - now, instead of spending 50% of my time installing and uninstalling software, and the other 50% actually using it, I spend only 25% of my time installing / uninstalling. Hey, that's a 50% improvement in developer productivity!

First, if you want to see some useful information on installation issues for the .NET Framework, read our article on that .

Now came the "moment of truth": I did what MS refers to as a "Clean Uninstall" of Mobile Internet Toolkit, IE Web Controls, ASP.NET Premium, VS.NET Beta 2, the Framework SDK. I removed mscoree.dll from the System32 folder, and fired up Setup.exe. It promptly reported that I had to remove a previous BETA installation of .NET Framework v.1.0.2914 before I could continue. Which of course, brings me to the second most important of the Commandments and Great Truths for Microsoft Developers, "There is no such thing as a Clean Uninstall".

The fact of the matter is, after you uninstall BETA 2, RC1, RC3, Build 9144 or any of the others, you are likely to find that HUNDREDS of orphaned Registry entries and DOZENS of folders and files have been carefully and strategically left on your system to boobytrap you into turning into a raving lunatic and going to live in a cave in Afghanistan, because your only thought will be "Now I have to reformat my hard drive and lose all my precious software to get this product to install".

Yet, Dear Reader, Fear Not! For although we worship at the Altar of the Great Registry, we shall fear no DLL.

Now lets go through some free Guerilla Uninstall training! The trick here of course is that we want to try and get our system to look to Setup.exe like NO VERSION of VS.NET was ever installed, right? Well, the logic I follow goes as follows (Be advised, your mileage may vary, and if you do any of this stuff, and it screws up your system, you BETTER HAVE A BACKUP of your Registry AND know how to recover it, and I will remain blameless!):

1) Back up your Registry (Programs/Accessories/System Tools/Backup and choose "Emergency Repair Disk" and check the "Also Backup the Registry...." option).

2) Have a way to move the backup registry files back over the one you screwed up (Recovery Console, set of Setup Disks with Repair disk, Boot Disk with NTFSDOS, or -- as I do -- another hard drive with another operating system you can boot into and get to the files that way).

3) Now we fire up Regedit and start a search for the version string that Setup.exe reported it "thought" was still installed on your system, even after you did a "Clean Uninstall" (in my case this was "v1.0.2914"). You can be pretty confident that any key or subkey containing this string deals ONLY with VS.NET BETA version you had installed. Anytime you find a key or subkey containing this string, DELETE the parent (root) key. Then hit F3 and let it find the next one. You can get into a real rhythm with this, kind of like: CLICK -- DEL -- YES -- F3 CLICK -- DEL--YES--F3 etc. You better get used to it because you will likely find hundreds of them! (Right, that was what they call a "Clean Uninstall"!). I suspect that probably if you only removed the keys that say "Installer/Products" that would do it, but hey - you're already there so why not just take the time to get rid of all of them?

4) Now you need to attack the folders. There are several in WINNT with names that have ".NET" in their names. There are some under Program Files, and there are a bunch more in "Documents and Settings" - even in the AllUsers folder. Get rid of anything that looks like .NET or Visual Studio / 7.0. I even had one folder with mscorcc.dll that wouldn't delete because some process had a lock on it. So, I renamed the parent folder, rebooted, and got rid of it that way. On my XP partition, even mscoree.dll was there and "locked" after everything was uninstalled. So I renamed the file (don't ask me how I could have renamed it when I couldn't delete it, but it worked), then I rebooted and was able to delete it.

5) Now, ABSOLUTELY, POSITIVELY DISABLE all stuff like ZoneAlarm, Norton Antivirus and any other similar program that might interfere with the scripted installation process of the VS.NET install. If they are services, stop them and set them to DISABLED temporarily while you complete your installation. You've been WARNED!!!

When you have finished all this, and your fingers didn't slip and hit the wrong key, you should be able to run Setup.exe and it will be happy. The good news is that Final installs somewhat faster than BETA 2, and the best news is that you get to keep all your precious programs and settings that would have taken you a week to replace! Folks, you won't find this Guerilla Install Tactic anywhere else - not in the KB, not in MSDN, not in the newsgroups. You saw it here first! It's an Eggheadcafe.com exclusive scoop!

I've also seen a few posts about using the MSIZap utility. You can find info on this and where to get it on our previous article about the Framework that's referenced above. However, because of the locked files and folder stuff I mentioned above, I prefer to use the "brute force" guerilla method with the registry as described.

As I complete this article, it's January 19, 2002 -- just three days after Visual Studio .NET Final was first made available to MSDN Universal and other subscribers. Since then, I've successfully completed FULL INSTALLS of VS.NET Enterprise Architect on both Windows 2000 Advanced Server and Windows XP Pro, and I"ve had to use this technique on both machines in order to get a successful install, so I suspect (and hope) that this article will attract some significant readership. Regarding the .NET Framework only ("dotnetfx.exe"), we've already successfully installed this in Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Pro, and Windows ME. If you find out information you can add, or you have questions, please feel free to join Eggheadcafe.com (free) and post your information on our forums.

 

 

Peter Bromberg is an independent consultant specializing in distributed .NET solutions in Orlando and a co-developer of the NullSkull.com developer website. He can be reached at info@eggheadcafe.com