Running SharePoint 2010 on a domain controller

If you need to run SharePoint 2010 on a domain controller, then you have to run the following PowerShell command on your SharePoint server to enable Sandboxed Solutions:

$acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName
$person = [System.Security.Principal.NTAccount]"Users"
$access = [System.Security.AccessControl.RegistryRights]::FullControl
$inheritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
$propagation = [System.Security.AccessControl.PropagationFlags]::None
$type = [System.Security.AccessControl.AccessControlType]::Allow
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access, $inheritance, $propagation, $type)
Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl

This PowerShell command will add an ACL access rule on your server, without which SPUCWorkerProcess.exe process won't start even though Microsoft SharePoint Foundation User Code Service will start.

P.S.: It's never a good idea to run any server applications (including SharePoint 2010) on your domain controllers, so please avoid it whenever possible.