Update: See the anti-climactic conclusion to this case here.
For the past several days I’ve been struggling mightily to install the standalone version of SharePoint 2010 on my Windows 7 workstation. Since the announcement went out at the recent SharePoint 2009 conference, all the cool kids are doing it.
So, I downloaded the beta bits from MSDN, got a copy of Setting Up the Development Environment for SharePoint Server from MSDN and settled in. First stop was to get SQL Express 2008 installed – this was relatively simple, although I did have some issues around permissions that were easily and quickly resolved.
I then followed the guidance in the doc for pre-requisites. Actually, a better source is Jie Lie’s blog post, SharePoint 2010 Pre-Requisites Download Links. A key trip-up for me was obtaining the right version of the Windows Identity Framework (Geneva) – silly me, I got the latest version (3.5.0.0) rather than the version Lie has on his blog, 1.0.0.0. The Microsoft SQL Server 2008 Native Client is also a must-have, as it creates a named-instance SQL database called SHAREPOINT that is required for the standalone install. Other than this, I followed the instructions in the MSDN article for setting up my machine, altering the XML config file and tweaking IIS.
So, the installer ran smoothly until I hit a couple of snags:

If you search for “Error 1935 HRESULT 0x80070020”, you’ll find that it is a broad error code that essentially means another process has a lock on an assembly that you need access to. The solution turned out to be calling up msconfig and disabling all the non-system services and restarting (see Aaron Stebner’s blog post from Nov. 25/06 on how to do this).
After I resolved this problem, the installer finally ran without a hitch. So, the next step was to run the Configuration Wizard. And so my troubles began. The wizard would run until reaching 2/10 tasks for creating the configuration database. Then it bailed:

The exception had me puzzled: “User cannot be found”. This got me thinking that maybe permissions in the database were not what they should be. So I opened the Security/Logins node in SQL Server Management Studio to add the dbcreator role to the NT AUTHORITY\NETWORK SERVICE and NT AUTHORITY\SYSTEM accounts (these are used by the installer when running a standalone setup for the primary admin accounts). I should add that I had issues earlier than this that required me to add the roles just to get the wizard to turn over.
I verified that the databases were indeed being created:

So, I deleted them and decided to try running PSCONFIG.EXE from the “14 Hive” (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN) by opening a command console using “Run As Administrator”. Same issue:

I looked into the specifics of the exception via the Event Viewer and found these details:
An exception of type Microsoft.SharePoint.SPException was thrown. Additional exception information: User cannot be found.
Microsoft.SharePoint.SPException: User cannot be found.
at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, SPSiteSubscription siteSubscription, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName) {SNIP for brevity}
Given that everything up to this point was working well, I decided to open the assembly up in Reflector to determine what code was being executed that would throw this exception. This required looking into the GAC where the assemblies are stored which is easily done via the View GAC as Folder registry trick.
Sifting through the overloads on the SPSiteCollection.Add method, I finally came across the root method and noticed this:

The plot thickens: This code fragment attempts to resolve the secondary contact login information which is passed into the SPSiteCollection.Add() method into an SPPrincipalInfo object. If it fails to resolve, null is returned and a generic SPException is thrown. Ta-da.
So, this mystery appears to hang on what information is being passed in for the secondary contact login – one would think that since this is a standalone install it would be the same as the primary contact, ie. NT AUTHORITY\NETWORK SERVICE or my credentials (which is a member of BUILTIN\Administrator). But it’s apparently not.
I’ll post a follow-up once I unravel this part…