The hard drive in my development box died last week, and although I’ll spare you the story of the replacement process, I thought it might be interesting to document the process of rebuilding my dev box, and provide color commentary while I’m at it.

  1. Install Windows Vista (Business)
  2. Get domain admin (my boss) to log in and connect my machine to the domain
  3. Add my domain account as an administrator
  4. Log out and log back in as my domain accout (it’s important to do this ASAP or I end up with shortcuts and things in the ‘root’ user account).
  5. Adjust Windows settings (via “Programs and Features”) to include the IIS Features required for SQL Reporting services (*). I had to add the “Basic Authentication” to this list, I think, and I changed a few other features while I was in there … this actually required a reboot for some reason (presumably not because I added minesweeper and solitaire).
  6. Install Windows PowerShell (in hopes of doing other things faster)
  7. Create User Account for Sql Server to use
  8. Install SQL Server (before Visual Studio, to avoid SQL Express and the resulting lack of SQL Manager)
  9. While waiting for that, slow it down by copying my Projects, Documents, and Pictures folders over from the backup … I need my PowerShell profile and wallpaper before the defaults drive me insane.
  10. Change my wallpaper and avatar (that orange flower is actually annoying).
  11. Install Notepad++ (and copy userDefineLang.xml from backup for PowerShell scripts)
  12. In order to finder Change Explorer settings to:
    1. Show Hidden files and folders
    2. NOT Hide extensions for known file types
    3. Hide protected operating system files (I leave this, because Vista has tons of hidden junction points (for compatability) in my user directory which are very distracting)
    4. Launch folder windows in a separate process (Explorer still crashes sometimes in Vista)

Some side notes:
I’m actually capable of compiling most of my projects (using MSBuild on the command line) without installing SQL Server, and the rest of them require third party controls which I will not install until after Visual Studio is installed. However, having installed SQL Client, Notepad++ and PowerShell I can actually edit, recompile, and run queries via PowerShell … so in an emergency, at this point I can start fixing bugs ;)

Windows Vista, SQL Server, Visual Studio, and MS Office all want me to go online and check for service patches as soon as I install them. Since I feel fairly secure sitting behind my firewall, I don’t bother with this until all of them are installed — Microsoft Update will find and install all of the service packs in one fell swoop.

SQL Server and Visual Studio are the only two apps I install which have installers which are so badly behaved that I don’t even try to install them in my usual sub-folders (C:\Programs\DevTools\ in this case).. SQL Server, for instance, will make a “C:\Program Files\Microsoft SQL Server\” folder no matter what you tell it during install, and nothing I’ve found can convince it to do otherwise, so I might as well install to that location, and not end up with multiple confusing folders (I’ll make junctions in C:\Programs\DevTools\ later to keep myself sane).

More Software

  1. Install Visual Studio 2005. This will take a while, so I get a fresh cup of coffee, start writing this post, and start playing with a WordPress plugin. I guess I could install VS 2008 B2 (people keep saying I should), but the last time we messed with beta development tools here we got bit badly by some changes in the final release that cost us hours of manual grep’ing…
    1. I don’t bother installing Dotfuscator, Crystal Reports, or SQL Server express.
    2. I don’t generally install Visual J# — I have never seen a J# app, or even J# sample code, but I do have a couple of tools which require portions of the J# project support for some reason (I’ll have to come back and make a note here when I remember what they are).
    3. This time I didn’t install Visual Basic either. VB.net code is relatively rare … and because of the idiocy of Microsoft in choosing the term “.net,” and the abundance of VB6 code … when I’m searching for .Net solutions I tend to use “C#” as my search term anyway, so I rarely see VB. On those rare occasions when I need to edit or compile a VB app I tend to edit in Notepad++ or convert it in MonoDevelop…
  2. Install Visual Source Safe. I had hoped that by my next install we’d have switched completely to MS Team Server or to Subversion, but Team Server turns out to cost ridiculous ammounts of money despite our Certified Partner status, and we haven’t found the time to switch to Subversion since we found that out for sure.
  3. Try to copy and paste something, and notice ClipX is missing. Install.
  4. While trying to install ClipX’s Stickies plugin (requires creating a plugins folder in the ClipX install location, and copying file to that folder) I have to click 6 extra times because of UAC — I turn off the secure desktop, but I don’t want to disable UAC, so I need to be able to easily run Explorer as root. PowerShell to the rescue (I am reminded that I never got around to making this script create shortcuts).
  5. My profile can’t be loaded because execution of scripts is disabled. Ok, that’s a really annoying default. Set-ExecutionPolicy RemoteSigned but now my profile causes problems because my profile uses PowerShell Community Extensions which I haven’t installed yet — I’ll do that later.
  6. Now try to use my hotkey to launch Explorer as root, and realize I haven’t installed AutoHotkey yet. The version I have in my pre-downloaded folder is old, so I go to download the new one, and discover I haven’t installed Firefox yet.
  7. Install Firefox (for the moment, resist the urge to install extensions)
  8. Install AutoHotkey
  9. Need to look up a serial number. Install KeePass. I actually run KeePass from my USB drive (so that I keep all my passwords current no matter whether I change them while at work or at home), but I keep a backup copy of the key file and software on my main box at work and at home in case some day I loose or forget my USB drive (that hasn’t happened since I upgraded to a thumbdrive from a SD card + reader a while back so I could keep it on my keychain — because I forgot the old one at our other office location all the way across town).
  10. Try to install (an old copy of) the Component One controls using that serial number so I can compile the rest of my apps in “production” mode (production mode involves preprocessor #if statements to remove dependencies on nUnit/mbUnit).
    1. C1’s installer is a travesty, and I finally resort to typing the number by hand …
      1. Three separate boxes for the three parts of the number which are just dash-separated.
      2. Pasting the whole number only pastes the first box
      3. Alt-Tab’ing off to look up the rest of the number sets input focus back onto the “Organization” or “User Name” input fields if the focus was on one of the serial number boxes.
    2. After all of that, it doesn’t install. Maybe because it wasn’t running elevated and can’t write to “Program Files” ... it’s an .msi file so I can either: run msiexec from an elevated PowerShell window, or install the controls somewhere else.
    3. These things shouldn’t come with installers anyway … it’s just a bunch of control assemblies. But it needs to be put in the GAC, registered with Visual Studio, and who knows what else. I try to install it next to my open source controls in C:\Users\JBennett\Projects\Controls\... but the install still fails. Must be that it needs to be admin to put the controls in the GAC? Very poor installer to fail completely because of something like that. (I’m starting to get annoyed).
    4. Run PowerShell, but reencounter the missing Community Extensions.
    5. Install PSCX … and wonder if there’s a way to carry PowerShell snapins on a USB key and not install them… one last error remains: missing mow’s PowerTab … this one is actually installed in my $ProfileDir/PowerTab, but mow’s installer hard-coded the profile path, and my new profile path is subtly different. Simple fix.
    6. Finaly succeed in installing ComponentOne controls by running from the Elevated PowerShell console. Turns out installing to the GAC is optional, so I have no idea why it had to be admin.
  11. Install nUnit so I can compile my projects in regular debug and release modes. This one goes in C:\Programs\DevTools, it’s a lot more than just assemblies.
  12. It’s high time I ran Windows updates (I need another coffe break). Run “Updates” and click the “get updates for more products.” Install the Microsoft Update update to Windows Update (wow, that’s a little mindbending).
  13. Total: 41 Updates (including one for Microsoft Office, which I haven’t installed yet, what’s up with that?)
  14. 2 hours later and one reboot later … tried to open a solution in Visual Studio and found the Visual Studio 2005 SP1 update for Vista compatability hadn’t been installed. Back to Windows updates….
  15. 2 Updates: The compatability pack for Visual Studio, and a critical SQL Server patch. The only thing that takes longer to install than a Visual Studio patch is a SQL Server patch. I finally clicked “Shut Down and Install Updates” and went home.

Feedback

Jason Stangroome posted a comment suggesting that I shouldn’t be running my domain account as administrator (I’m not displaying comments on the page right now, you can read them in the feed, and I get emails for each one, and respond to them via email or, when they’re particularly interesting, by modifying the post). He claims that:

On both XP and Vista for the last two years we have had a basic domain account called “LocalAdmin” added as a local administrator to all dev workstations. We use this to install stuff. Otherwise, our personal domain accounts are just boring users (not even Power Users).

Visual Studio, SQL Server, web development and all the usual stuff works fine as non-admin.

More power to you, Jason, if you’re able to work without being in the administrators group.

Microsoft recommends that when using Visual Studio 2005, you do the following:

  • Run Visual Studio with elevated administrator permissions
  • Be a member of the "Administrators" group on the local machine
  • Right-click the Visual Studio icon and select the "Run as administrator" option from the context menu

If you look at this list of known issues which only apply to those using Visual Studio 2005 on Vista without being an administrator, I find that several of those affect me. Just the process of debugging web apps in IE is quite simply unacceptable, even leaving aside all the other problems, like the fact that profilers don’t work, you can’t browse web services on your own machine, and the managed code SDK debugger won’t let you change options. When I try to open our current web project in Visual Studio running non-elevated I get this error message:

---------------------------
Microsoft Visual Studio
---------------------------
Unable to read the project file 'Home.csproj'. The Web Application Project Home is 
configured to use IIS.To access local IIS Web sites, you must run Visual Studio in 
the context of an administrator account. By default, Windows runs applications in
a limited-privilege user account even when you are logged on to the computer as 
an administrator. To run Visual Studio with administrative privileges, right-click the 
Visual Studio icon and then click 'Run as administrator'.
---------------------------
OK   Cancel   Help   
---------------------------

Honestly, I’d also hate having to log in (as that administrator account) each time I wanted to test the installers, or shut off or restart the local SQL Server (which I don’t leave running all the time), etc. It just doesn’t seem worth it, and with the interaction required to actually elevate things, I don’t see the danger in being a member of the administrators group.

Day Two

Technically, this is day three, because day two was spent in various unscheduled meetings, and at home, taking care of sick kids. That’s pretty much par for the course in the real world ;).

So I finally tried to open up and compile my main project, only to find that the “signtool.exe” which I use as part of the build process to code-sign the assemblies for click-once deployment is … missing. Yep — it’s part of the Windows SDK. This makes me wince, because, although I clearly need the SDK in order to sign my apps, I was hoping not to have to install it before I created my “I can compile” disk image. I’m already up to 27GB (and I still haven’t decided if I should install MS Office).

  1. Open Firefox and finde that since I downloaded everything from my secondary PC the other day, I never got around to setting the proxy server. Set the proxy server.
  2. Don’t forget to tell Firefox that when it starts it should “Show my windows and tabs from last time.”
  3. Spend 10 minutes googling trying to figure out which is the latest Windows SDK. What’s up with that?
  4. Try to download Windows SDK (the ‘online’ version rather than the ISO, because I can’t find an ISO version of this “Update” and the update is really a full version which requires you to manually uninstall the old stuff).
  5. Forced to install WGAPluginInstall.exe in order to proceed.
  6. Restart Firefox (hmm, I didn’t think I had to do that last time).
  7. Finally start downloading the SDK (had to manually click, because the page got stuck on “Transferring data from m.webtrends.com” has anyone else had this problem on the Microsoft sites lately?).
  8. In extreme frustration (after trying for the 100th time today to mouse across onto my other computer) go and download Synergy (Is the Synergy project dead?).
  9. Install Synergy, and to my suprise, it still has my configuration. It must be storing that in my “Documents” folder instead of in app settings, because I deliberately didn’t bring App Settings from the old box.
  10. Try running synergy, and it dies, because the dev box has a new name now.
  11. Restart Synergy and add the new name as an alias … tell Windows Firewall to unblock Synergy, and we’re good.
  12. Notice that the SDK download is called “setup.exe” and I can’t rename it from within Firefox. Go and get the Download Statusbar extension to fix that.
  13. Installing SDK.
    1. Don’t forget to set the samples to install in something like “C:\Users\JBennett\Projects\SDK Samples” because you shouldn’t be compiling things into “C:\Program Files” (plus it requires an elevated compiler).
    2. Odd that the SDK shows .Net Compact Framework 2.0 as grayed out, and the comment says “is not installed by default” and yet, it’s checked, and I can’t uncheck it.
    3. Spend some time wondering if I actually use the Win32 portion of the SDK any more. Almost everything I write is in .Net nowadays. (I installed the Win32 stuff anyway, just in case I want to compile GeoShell at work).
  14. Rebooted for the SDK (I don’t think it really needs that, but who knows).

Yay! I can compile

Well, I should say: I can compile my WinForms apps. I have to install a few more things to be able to compile the web and wpf apps, including:

Now I can finally compile everything … but I need to install a few extra tools before I create our image. Several of the apps I personally consider mandatory aren’t used by other developers on our team … but these few are needed by everyone:

  • Daemon Tools, I would leave out of my image, except it’s tricky to install it without getting adware, and since this image will be shared by others in our group in the future, I install it.
  • ISO Recorder (because I had to burn an ISO to CD as part of my imaging process, and for some reason my XP box wasn’t handling that task well).
  • If this wasn’t Vista, I’d be sure to include the Consolas Font for Visual Studio (it’s installed on Vista by default).

I’ll post a bit about this imaging process tomorrow, assuming all goes well, but in the meantime, here’s a partial list of my additional software (what I can think of from looking in my download folder from the previous build): Reflector, Virtual PC 2007, FileZilla (I still use 2.0 at work ‘cause I need proxy support), Silverlight 1.0, Expression Blend and Expression Web, Paint.Net, TugZip (for 7Zip support), Bitstream Vera fonts, and some Visual Studio plugins: GhostDoc and Documentor (which is an addin for DXCore and which reminds me that I ought to get CodeRush), TestDriven, AnkhSVN, Project Aggregator, Enterprise Library 3.0, and more.