![access runtime 2010 encountered an error during setup access runtime 2010 encountered an error during setup](https://i.stack.imgur.com/wjHOz.png)
$Operation = Dismount-WindowsImage -Path $MountPath -ScratchDirectory $ScratchPath -LogPath $LogPath -Save -CheckIntegrity " -ForegroundColor 'Yellow ' -BackgroundColor 'Black ' Write-Host " `nCommitting Changes and Dismounting Image. # Unmount and save servicing changes to the image Start-Process -FilePath "CMD.EXE " -ArgumentList "/C REG UNLOAD HKLM\EXTERNAL " -Wait -WindowStyle Hidden `n " -ForegroundColor 'Yellow ' -BackgroundColor 'Black ' # Run garbage collector so we can safely unload the registry hive Set-ItemProperty -Path $MountHiveKey -Name 'Exclusive ' -Value '0 ' | Out-Null Write-Host "Setting Exclusive Registry Key Value to 0. # Set the permissions on the registry key using the control access rule # Create the control access rule for the registry key # Get the ACL for the registry key now that we have access # Set Owner using owner control access rule # Get a blank ACL since we don't have access "EXTERNAL\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending " ,::ReadWriteSubTree ,::TakeOwnership # Open key with Read/Write and Take Ownership privileges $RegACL = New-Object ( "Administrators ", "FullControl ", "ObjectInherit,ContainerInherit ", "None ", "Allow ") # Create new ACL control access rule object Write-Host "Failed! `n " -ForegroundColor 'Red ' -BackgroundColor 'Black ' Write-Host "Successful! `n " -ForegroundColor 'Yellow ' -BackgroundColor 'Black ' $Operation = Enable-Privilege -Privilege 'SeTakeOwnershipPrivilege ' # Get privileges in order to be able to take ownership of the registry key $Operation = Start-Process -FilePath "CMD.EXE " -ArgumentList "/C REG LOAD HKLM\EXTERNAL $MountHivePath " -Wait -WindowStyle Hidden Write-Host " `nMounted Image Info: `n $Operation " -ForegroundColor 'Yellow ' -BackgroundColor 'Black ' $Operation = Get-WindowsImage -Mounted -ScratchDirectory $ScratchPath -LogPath $LogPath | Out-String $Operation = Mount-WindowsImage -ImagePath $ImagePath -Index $ImageIndex -Path $MountPath -ScratchDirectory $ScratchPath -LogPath $LogPaths $Operation = Copy-Item -Path $ImagePath -Destination $BackupImagePath -Force
![access runtime 2010 encountered an error during setup access runtime 2010 encountered an error during setup](https://www.accessrepairnrecovery.com/blog/wp-content/uploads/2020/12/access-Cannot-Be-Started-Unable-To-Initialize-The-Windows-Registry-Error.png)
Write-Host " `n`n`n`n`n`nBacking up $ImagePath to $BackupImagePath. Public static bool EnablePrivilege(long processHandle, string privilege) $ ') + 'bkp ' Internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020 Internal const int TOKEN_QUERY = 0x00000008 Internal const int SE_PRIVILEGE_ENABLED = 0x00000002 Internal static extern bool LookupPrivilegeValue(string host, string name, Internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok) Ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele) Internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, $ Env:Path = 'C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM C:\Windows\System32 ' This is set for current session only, no need to remove it afterwards.
![access runtime 2010 encountered an error during setup access runtime 2010 encountered an error during setup](https://s3.amazonaws.com/harmonie-documentation/outlook/images-email/send-logs-support.png)
# Set Environment Path in order to use the latest DISM and System32. $LogPath = ( Join-Path -Path $ScriptPath -ChildPath 'DISM.log ') $ScratchPath = ( Join-Path -Path $ScriptPath -ChildPath '\Scratch ') $MountHiveKey = 'HKLM:\EXTERNAL\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending ' $MountHivePath = ( Join-Path -Path $MountPath -ChildPath '\Windows\System32\Config\Software ') $MountPath = ( Join-Path -Path $ScriptPath -ChildPath '\Mount ') $ScriptName = ::GetFileNameWithoutExtension( $MyInvocation. $ScriptPath = ::GetDirectoryName( $MyInvocation.