SQL Server 2008 installation aborts due an access denied

Trying to install SQL Server 2008 on a standalone environment using an administrator account and getting an access denied? The problem could happen in case you have removed Local Administrator from ‘Debug privileges’ on local security policies or just because your local domain GPO removes it.

SQL Server installation log:

(…)

The Detail.txt indicates 3 "Access is Denied" errors. See below for the relevant extract:
2008-09-19 09:20:25 SQLEngine: : Checking Engine checkpoint 'GetSqlServerProcessHandle'
2008-09-19 09:20:25 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' to be created
2008-09-19 09:20:27 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' or sql process handle to be signaled
2008-09-19 09:20:27 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-09-19 09:20:27 Slp: Access is denied
2008-09-19 09:20:27 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-09-19 09:20:27 Slp: System.ComponentModel.Win32Exception: Access is denied
2008-09-19 09:20:27 Slp: at
System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
2008-09-19 09:20:27 Slp:    at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
2008-09-19 09:20:27 Slp:    at System.Diagnostics.Process.OpenProcessHandle()
2008-09-19 09:20:27 Slp:    at System.Diagnostics.Process.get_Handle()
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerStartup.StartSQLServerForInstall(String sqlCollation, String masterFullPath, Boolean isConfiguringTemplateDBs)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
2008-09-19 09:20:27 Slp:    at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
2008-09-19 09:20:27 Slp: Exception: System.ComponentModel.Win32Exception.
2008-09-19 09:20:27 Slp: Source: System.
2008-09-19 09:20:27 Slp: Message: Access is denied.

2008-09-19 09:20:28 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080919_085714\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
2008-09-19 09:20:28 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080919_085714\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
2008-09-19 09:20:28 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20080919_085714\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
2008-09-19 09:20:42 Slp: Access is denied
2008-09-19 09:20:42 Slp: Watson bucket for exception based failure has been created

(…)

The Summary returns following hex code: Configuration error code – 0x5D9A8C61

(…)

The access denied is raised on OpenProcess  WIN32 API, looking to MSDN WIN API description:

HANDLE WINAPI OpenProcess( __in DWORD dwDesiredAccess, __in BOOL
bInheritHandle, __in DWORD dwProcessId );
Parameters
dwDesiredAccess [in]

The access to the process object. This access right is checked against the security descriptor for the process. This parameter can be one or more of the process access rights <https://msdn.microsoft.com/en-us/library/ms684880(VS.85).aspx>.

If the caller has enabled the SeDebugPrivilege privilege, the requested access is granted regardless of the contents of the security descriptor.
bInheritHandle [in] If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.
dwProcessId [in] The identifier of the local process to be opened.
Return ValueIf the function succeeds, the return value is an open handle to the specified process.
If the function fails, the return value is NULL. To get extended error information, call GetLastError <https://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx>.

Remarks
To open a handle to another local process and obtain full access rights, you must enable the SeDebugPrivilege privilege. For more information, see Changing Privileges in a Token <https://msdn.microsoft.com/en-us/library/ms717797(VS.85).aspx>.
The handle returned by the OpenProcess function can be used in any function that requires a handle to a process, such as the wait functions
<https://msdn.microsoft.com/en-us/library/ms687069(VS.85).aspx>, provided the appropriate access rights were requested.
When you are finished with the handle, be sure to close it using the CloseHandle <https://msdn.microsoft.com/en-us/library/ms724211(VS.85).aspx> function.

Note: Please reboot your machine after granting this permission, gpupdate /force is not enough, reboot is needed.

If problem still persists please execute the following command to reset SCM settings to default values

SC sdset winhttpautoproxysvc D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;LCRP;;;IU)(A;;LCRP;;;SU)