Wednesday, 30 January 2013

102 simple steps for installing and configuring a new Windows 8 machine

Wednesday, 30 January 2013

As sure as night turns into day, sooner or later your PC will descend into an unrecoverable abyss where it no longer boots, stays booted or can’t even get booted to begin with. I’ve had memory go bad, motherboards die, CPUs fried, many mechanical disks develop bad sectors and now for the second time, an SSD gradually turn itself into nothing more than a paperweight.

I now have a very robust backup strategy which I’ll come back to (courtesy of previously losing data and deciding that was never going to happen again!), but having a disk fail is about more than just restoring from backup, it’s about rebuilding the whole damn thing. This is my perfect world scenario:

Restoring an iPhone from iCloud

Automatic daily backup of everything to iCloud then a lost device or an upgrade just means authenticating and waiting. Job done.

Unfortunately this is not the PC world we live in and particularly for folks like me involved in building software, getting from zero to where you were when everything went wrong is a very high friction exercise. I reckon it’s the better part of a day’s effort to reinstall, reconfigure and restore files and you’ll still be finding missing things a month later.

Now I could actually still slave the faulty disc and read from it (it just wasn’t stable to boot from), so in theory I could have used the likes of Acronis or Ghost to image the old disk to the new one and viola – the old machine is back. Problem is though, you inevitably get that OS rot through continuous installations, uninstallations, driver updates, toying around and otherwise just doing what us devs tend to do. A clean install – although tedious – is a fresh start.

So for my own benefit (because I know it’s just a matter of time until I need to do this again) and to demonstrate the many, many, many (etc) steps involved in getting back to somewhere close (but not exactly) where I was before things went bad, here’s the whole end-to-end process

Operating system installation

This is the easy bit; predictable!

  1. Download Windows 8 from MSDN (but first you need a machine that actually works!)
  2. Make a bootable USB key (thanks to Scott Hanselman’s guide)
  3. Unplug all the existing disks so I don’t accidentally install to the wrong one!
  4. Boot from USB and follow the prompts (including reboot number 1 and reboot number 2)
  5. Manually activate Windows (there’s an easy way when the DNS name does not exist)

The install was actually very fast – 15 minutes from no power to a full OS install, including accidentally booting into USB after the first reboot. Don’t listen to the folks who say Windows only gets slower – it ain’t true!

Windows config & drivers

Installation – even from the latest Windows 8 image downloaded from MSDN today – is not the end of the story. Now comes updates, device drivers and taking a few other Windows options.

  1. Take all the Windows Updates (29 of them totalling 380MB, thank you very much, plus reboot number 3)
  2. Run update again (another 2 updates)
  3. Take all the Win 8 store updates (15 is them there – do we really need two different ways of updating?!)
  4. Get a Windows Experience Index (8.2 processor, 8.2 RAM, 8.1 graphics, 8.1 gaming graphics, 8.1 HDD)
  5. Check for AMD Radeon 7970 video drivers (auto detector says everything is up to date)
  6. Catalyst Control Centre
  7. Position all the monitors in the right place
  8. Plug in the Logitech webcam and let Win 8 install the drivers
  9. Install IIS and Telnet client from Windows features

Download and install from MSDN

I’ve got an MSDN subscription courtesy of the very kind MVP people at Microsoft so the latest of everything gets pulled down again and reinstalled. Downloads are fast enough these days and versions increment so frequently I don’t both to install from local copies any more.

  1. Office (selectively choosing some bits)
  2. Run Windows Update (another 16 updates and 567MB and reboot number 4)
  3. Visual Studio
  4. Update NuGet in VS
  5. Get update 1 for VS (reboot number 5)
  6. Run Windows Update (2 updates found for Office and reboot number 6)
  7. Run Windows update again (7 updates of 103MB for VS and .NET)
  8. SQL Server Management Studio (and then reboot number 7)
  9. Run Windows Update (3 more small updated for VS – haven’t we done this already?!)

One of the neat things in Win 8 is the ability to mount ISO files as drives which means no more MagicISO thank you very much.

Auto install via Chocolatey

To avoid manual install pain, I thought I’d give Chocolatey a run after getting all excited listening to Rob Reynolds talk about it on .NET Rocks the other day. These are literally the exact commands I ran from having zero Chocolatey goodness to 21 software packages silently install (except the italics points or comments in brackets, of course). No mess (almost), no fuss (also almost), highly recommended.

  1. @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
  2. cinst chocolatey
  3. cinst 1password
  4. cinst dropbox
  5. cinst evernote
  6. Update Evernote as the version is out of date
  7. cinst notepadplusplus
  8. cinst adobereader
  9. Update Adobe Reader as the version is out of date
  10. cinst vlc (thank you Windows 8 for no longer having a DVD player)
  11. Update VLC as the version is out of date
  12. cinst fiddler
  13. cinst windirstat
  14. cinst GoogleChrome
  15. cinst Firefox
  16. cinst virtualbox
  17. cinst git
  18. cinst TortoiseGit
  19. cinst githubforwindows
  20. cinst tortoisesvn
  21. cinst resharper
  22. cinst reflector
  23. cinst WindowsLiveWriter
  24. cinst iTunes
  25. iTunes fails and asks me to uninstall it – so I do
  26. Manually download and install iTunes

The sequence of this can get a bit tricky; I wanted to setup Live Writer but needed my Google credentials to access the Blogger account. No problem, that’s in 1Password so download that and pull the keychain from Dropbox. Ah, but 1Password won’t work until I enter my serial number and that’s in Evernote so I need that first. Then of course my Evernote password is in 1Password so I need to manually type in a very random, very complex password by reading it off the 1Password app on the iPad. Awesome.

Speaking of awesome (in a non-sarcastic way), this is what Chocolatey is. It might seem like a little thing being able to install from the command line but it takes out a hell of a lot of searching and mucking around. The only negative was the apps that were out of date but at least they all had self-updaters. I briefly harboured an altruistic desire to create Chocolatey packages for the things I needed that weren’t already on there but I was in that “just get the damn thing rebuilt as fast as possible” mode.

Manual download and install

Without Chocolatey goodness, all of these became manual installs.

  1. SkyDrive (because the one baked into Win 8 won’t play nice in desktop mode and the one with Office 13 Pro is SkyDrive pro which only seems to want to connect to SharePoint)
  2. Red Gate’s SQL tools
  3. Update Red Gate SQL Compare (didn’t I just install this?!)
  4. Update Red Gate SQL Data Compare (see above)
  5. Update Red Gate SQL Source Control (this is a bit silly)
  6. Camtasia
  7. SnagIt
  8. Google Earth
  9. Skype
  10. Handbrake
  11. DVD Decrypter
  12. DiffMerge
  13. MetroTwit
  14. WinRAR
  15. Spotify
  16. BitTorrent
  17. Uninstall WinZip Registry Optimiser (thanks BitTorrent)
  18. Uninstalled BitTorrent toolbar from Chrome (yeah, thanks again)

Ok – SkyDrive – what’s going on here? Awesome product in the same way Dropbox is, but breaking it up between desktop and Metro then throwing the Pro one into the mix which seems to be targeted at SharePoint rather than your own SkyDrive cloud is rather confusing. At least it was for me.

Install from local files

There are still a few classics that I have floating around on the NAS and need to install manually.

  1. Photoshop
  2. Illustrator (reboot number 8 – was that really necessary?!)
  3. Canon Pixma multi-function printer
  4. Microsoft Money (yes, yes, I should move on to something else)

Licensing

Installation is only the first part of the config, a bunch of apps then need license info.

  1. Office
  2. Red Gate SQL Tools
  3. Illustrator
  4. Photoshop
  5. ReSharper
  6. 1Password
  7. Camtasia
  8. SnagIt
  9. MetroTwit

Fortunately none of these get cranky if you’ve already used the key as not being able to boot from the old disk meant no deregistering. In fact the only app that causes any pain in that regard is iTunes because it will only let you “Authorise” 5 machines and when you hit that (which I legitimately did), you need to deauthorise all of them centrally then individually reauthorise each machine again.

Configure

Of course installing is only part of the story, now you need to make things actually behave!

  1. Plug back in the other HDDs I disconnected right at the beginning
  2. Setup Outlook email
  3. Configure all the other Outlook settings (signature, layout, etc)
  4. Schedule a script to copy key files from NAS to a spare local disk (CrashPlan won’t backup from a remote disk without some tweaks – which I must get around to…)
  5. Setup CrashPlan to backup from the local disk
  6. Setup Dropbox
  7. Setup 1Password to use Dropbox
  8. SQL job to backup some key DBs
  9. 1Password browser plugins
  10. Firebug extension in Firefox
  11. Sign in to Chrome to sync data and extensions
  12. MetroTwit bit.ly API key
  13. Map the NAS drive
  14. Paste from Visual Studio Live Writer plugin
  15. Microsoft Money
  16. Connect up the network printer
  17. Setup Live Writer to store everything in Dropbox (registry edit)
  18. iTunes (to get back iTunes Match and enable Home Sharing)
  19. Finally, pin all the usual apps I like back on the taskbar

I didn’t bother to list all the apps that now need to be authenticated to all over again, frankly that’s a hell of a lot of them but fortunately a very low-friction process.

Restoring

So that’s the laborious work done, the thing now is to actually get files back in place. Everyone has their own backup strategies, mine involves using a local NAS with redundant drives as the default document location then backing this up to “The Cloud” via CrashPlan. I also use Dropbox and SkyDrive extensively which have already restored the important bits when I configured them earlier.

  1. Restore each IIS website
  2. Restore each SQL database
  3. Restore data from my NAS

That should be it, but there’s always that niggling feeling that you’ve forgotten something…

But wait – there’s more!

This is not the end, not by a long shot. Now comes the months of “hmm… this didn’t use to be quite this way before”; missing audio profiles in Camtasia, Visual Studio settings that are just a little bit different (yes, I know you can save these) and just random oddness that inevitably ensues.

Then there’s data that you simply don’t get back, things like recent screen grabs in SnagIt, custom words in the dictionaries of Live Writer and Word, reading preferences in Outlook and so on and so forth.

What’s working well

Everything in “the cloud”. Outlook / Live Mail / Hotmail, Dropbox and SkyDrive made getting data back right where I had it before ridiculously easy.

Having fast internet. Without this restoring from Dropbox and SkyDrive would be painful as would downloading all the latest bits and pieces. I regularly get speeds of over 1MB per sec (a theoretical 20Mbps line) so I barely noticed the tens of GBs I downloaded this afternoon and this evening.

Chocolatey was also awesome as it made installing those 21 apps a cinch. I don’t know how much I’d use it on an everyday basis, but as a way of getting a heap of stuff installed quickly it totally rocks.

Windows 8 speed – it’s blinding! Case in point (other than the 15 minute install time): it’s taking 10 seconds – ten freakin’ seconds – from when the BIOS finishes its business to being at the login screen. That’s rather astounding and whilst yes, I’ve got a high spec machine (6 cores, lots of RAM, fast SSD), it’s also exceptionally fast on slower machines I’ve used. Last week I wrote about The impending crisis that is Windows XP and IE 8 and a number of people commented that they don’t want to upgrade from XP because Windows only gets slower. Nope. No way in the world does that 11 year old operating system get anywhere near this on even modern hardware.

What’s not working so great

The fact that there are 102 steps in all this and that it took seven hours! Seriously though, going back to that iOS restore image, that’s my perfect world. Logistically it’s obviously a massive if not impossible ask in the desktop world of today, perhaps not so much in the Metro (or whatever we call it now) Win 8 world but that’s not a place I visit too much.

Windows 8’s bipolar disorder. I’m sorry folks, I know it gels well with tablets and touch but Metro just doesn’t add anything to my experience and it makes a number of things a whole lot more confusing. Having to update apps from the store independently of Windows Update, having SkyDrive installed but then not installed where I need it, jumping into Metro when I open an image and so on and so forth. On the whole, Win 8 is a much better OS than 7 in terms of speed, stability and providing the features I need (things like Task Manager rock), but I’d very happily take a desktop mode only version and be happier for it.

How do you do it?

I’m really interested to hear because by no means do I think this is the most efficient approach, it’s just the one that works as well as I could get it to. If there are other cloud tricks or app download and install mechanisms (yes, I’m aware of Ninite) then I’d love to hear them because you know it’s just a matter of time…

Tags:

comments powered by Disqus

Leaving comments is awesome, please do. All I ask is that you be nice and if in doubt, read Comments on troyhunt.com for guidance.