Flattening the world
Yesterday, I finally decided to bite the bullet and flatten my dev machine. I got this machine in 2003, and obviously installed XP on it, I've been self-hosting Vista on it since some time around April of this year, upgrading just about every week.
The thing about upgrades of interim builds of the OS is that sometimes things don't quite work right after the upgrade. Sometimes things get ACL'ed incorrectly, sometimes registry settings get migrated that should be reset, sometimes stuff gets put in the wrong place. These problems get noticed and fixed after they occur, but they sometimes leave little bits and pieces behind.
One great example hit about 2 months ago - I suddenly lost my ability to view JPGs in the sidebar. They worked just fine everywhere else (I thought), but not from the sidebar. Digging into the sidebar code, I realized that the sidebar was just calling ShellExecuteEx on the JPG file, which led me to realize that I couldn't launch JPGs from the command interpreter either. Digging into the ShellExecuteEx code, I realized that the file association handler for JPG files wasn't working correctly - it was loading a DLL, but the object hosted in that DLL didn't implement some class.
I looked at the COM registration in regedit, and it looked ok, so I asked for the shell team for help. They asked me to get a regmon trace, and using the trace, they figured out what had happened. It turns out that the handler for some COM class was moved from one DLL to another DLL back in July. No big deal, the COM registry had been fixed up so it wasn't a problem. The problem for me was that an upgrade back in June had accidentally virtualized the COM registration for the object that contained this class. When the registry was updated, the virtualized registry wasn't updated (because the system didn't know about it).
Our customers would never see this bug, neither would any user performing a clean upgrade, it only showed up because I upgraded from build-to-build - if I'd clean installed it would never have hit me.
So yesterday, I decided that it was time to flatten my dev machine[1]. I've had enough "wierd" things happen (strange Outlook behaviors, etc) that I decided it would just be safer to reset the world.
It's weird, I've not reinstalled an OS on my of my machines in a VERY long time (at least a couple of years now), it felt strange.
But I figured it had to be done. First thing I did was to uninstall all the software on my machine that I didn't think I used day-to-day (I had a LOT of junk that had built up over time). I wrote down all the stuff I knew I would need, and made sure that I had copies of the software to reinstall. I next used the Windows Easy Transfer (migration wizard) tool to back up my user settings, and reinstalled the OS. So far so good. I next used the migration wizard to put my stuff back, and reinstalled all my apps.
The cool thing is that it worked just about perfectly. I now have a newly scrubbed clean machine, all my data's back (and even then, my old data's not been lost - the upgrade copied all the data that was going to be reset to the Windows.old directory on my hard disk). I'm still going through confirming that I didn't leave any data behind that I cared about, currently it looks perfect.
[1] Flatten vs. Pave over. To flatten a machine is to reinstall the OS clean, to pave a machine is to reformat the hard disk. You flatten a machine to resolve OS corruptions, you pave over a machine to recover from a virus infection[2].
[2] KC Lemson is getting to me :)
Edit: Fixed stupid typo.
Comments
Anonymous
November 16, 2006
This whole idea of resetting/rebooting is so weird. it creeps into other things that you do and you re-do the same things losing precious time. Microsoft must come a long way trying to solve this problen already but still lot of us have caught that habit and re-do/re-set things.Anonymous
November 16, 2006
The comment has been removedAnonymous
November 16, 2006
That's a familiar story - personally, I reinstall the OS every 8 months or so, just to get rid of the general cruft that builds up. Highly recommended. Some folks actually throw away their PC and buy a new one, rather than go through this process. They perceive the software degradation as a physical degradation. Hopefully those PCs get recycled.Anonymous
November 16, 2006
Interesting - I know people who love to reinstall their machines (my wife's one of them). Personally I don't - I've never had enough stuff build up that it actually mattered. This was a very special case caused by many, many upgrades of an in-development operating system. It's interesting - I've already noticed that Newsgator Inbox is much happier after the reinstall.Anonymous
November 16, 2006
The comment has been removedAnonymous
November 16, 2006
The comment has been removedAnonymous
November 16, 2006
I've had b2 on my laptop (preceded by RC1 and by b2, yes I went back to b2), and some of the ACLs are munged and it's annoying to have to elevate just to move certain files or empty the recycle bin. I'm gonna format/reinstall once the RTM build shows up on MSDN. It'll be worth taking a day to rebuild the machine just to get rid of the annoyances.Anonymous
November 16, 2006
> The thing about upgrades of interim builds of the OS is that > sometimes things don't quite work right after the upgrade. I've read lots of reports, outside of Microsoft, none of them written by me, saying that this is the thing about upgrade installs of released versions. Lots and lots of people recommend doing clean installs either into a new partition or after paving an (the) existing partition, and just temporarily inserting their old installation CD to prove ownership of the previous version. Lots and lots of people have good reasons to make that recommendation. > These problems get noticed and fixed after they occur, but > they sometimes leave little bits and pieces behind. That seems to be about 2/3 true. Noticed after they occur, and sometimes they leave little bits and pieces behind.Anonymous
November 16, 2006
The comment has been removedAnonymous
November 16, 2006
I'd like to know by what criteria "Windows Easy Transfer" choose to backup files? You know, software nowadays dump files/settings everywhere. php.ini can be in it's directory, or windows directory. Some uses .ini files, and others uses .dat/.sav files or even other proprietary formats. And most softwares have their settings in registry. But if it'll backup everything, maybe it'd also carrie unused rubbish files... Could I simply trust that everything would be safe?Anonymous
November 16, 2006
Cheong, I don't know the answer, sorry. It appears to have heuristics that pick up some non MS applications though, my guess is that there's a way of plugging into it, because several 3rd party apps were included.Anonymous
November 16, 2006
Mike, You're right that registry hives can become fragmented over time. I always install PageDefrag (http://www.microsoft.com/technet/sysinternals/FileAndDisk/PageDefrag.mspx) and have it run on boot up to keep my registry and pagefile contiguous.Anonymous
November 16, 2006
I've just had both my workstations replaced. In the past, the only times when my workstations (or their parts) were replaced is when the hard disks passed away. This time, I had a chance to backup my data and list my software, and even got the old disks installed on the new PCs for a while. Turns out it is much harder this way... When your PC just dies, you start to work with what you've got. But when the old one is just retiring, you'll alway be in doubt about what you've left behind. And this time, it's totaly up to you! Took me two days to setup my work environment. Don't think it would have taken a minute longer if my old workstations would have just disappeared.Anonymous
November 21, 2006
Something in Vista RC1 broke my way of doing things:
- Attach external HDD to laptop
- Use WinHex to do 1:1 copy of the intenal laptop HDD (this doesn't work after RC1, access denied)
- Install Vista on clean laptop hdd
- mount the old system volume from the external HDD and use it as backup and source for needed files and configurations. Somehow I managed to go around the access denied issue and install RC2 but forgot how. I have an adapter to install the laptop hdd to desktop computer through USB if all else fails.
Anonymous
November 30, 2006
I fell in love with the Vista setup and how it took care of everything. And that was just the RC. I'm sure the RTM would be even better. Hopefully a lot of ppl get to share my experience and enjoy the new OS soon! Maybe, I can do some setup toons at http://sillygloop.spaces.live.com :)Anonymous
February 07, 2007
If I had but one legacy meaningful enough to leave on this world after I pass, I dearly hope that it is my footnote methodology.