> After one successful installation of SP2 I have had a problem on the second
> machine. Installation went through the backup registry and restore point
> process and then errored out with the following message:
> "Unable to read from or write to the data base"
Hi
Try this:
Place the text below in a .bat (batch) file (e.g. paste it into a new
notepad document and save it with e.g. the name fixdb.bat)
Then run the batch file by double clicking on it.
You should run the batch file just after a reboot of the computer (as
the first thing).
The batch file will tell you when it is finished.
Please post any result back here, good or bad :-)
Start batch file:
--------------------8<----------------------
@echo off
:: Batch file that tries to remedy error # 800710D9
:: "Unable to read from or write to the database".
:: Author: Torgeir Bakken
:: Date: 2004-08-30
:: Stop the Cryptographic service
%SystemRoot%\System32\net.exe stop CryptSvc
:: Rename all log files in the %SystemRoot%\Security folder
FOR %%a in (%SystemRoot%\Security\*.log) DO move /y %%a %%a.old
:: Rename the %SystemRoot%\System32\CatRoot2 folder
move /y %SystemRoot%\System32\CatRoot2 %SystemRoot%\System32\CatRoot2old
IF not exist %SystemRoot%\System32\CatRoot2 GOTO CONT01
:: In case the folder rename failed because of locked files
:: rename all log files in the %SystemRoot%\System32\CatRoot2 folder
FOR %%a in (%SystemRoot%\System32\CatRoot2\*.log) DO move /y %%a %%a.old
SET catroot2locked=True
:CONT01
cls
echo.
echo Please wait, this might take some time...
:: Unregister DLL files that are associated with Cryptographic Services
CD /D %SystemRoot%\System32
start /wait regsvr32.exe /s /u softpub.dll
start /wait regsvr32.exe /s /u wintrust.dll
start /wait regsvr32.exe /s /u initpki.dll
start /wait regsvr32.exe /s /u dssenh.dll
start /wait regsvr32.exe /s /u rsaenh.dll
start /wait regsvr32.exe /s /u gpkcsp.dll
start /wait regsvr32.exe /s /u sccbase.dll
start /wait regsvr32.exe /s /u slbcsp.dll
start /wait regsvr32.exe /s /u cryptdlg.dll
:: Reregister DLL files that are associated with Cryptographic Services
start /wait regsvr32.exe /s softpub.dll
start /wait regsvr32.exe /s wintrust.dll
start /wait regsvr32.exe /s initpki.dll
start /wait regsvr32.exe /s dssenh.dll
start /wait regsvr32.exe /s rsaenh.dll
start /wait regsvr32.exe /s gpkcsp.dll
start /wait regsvr32.exe /s sccbase.dll
start /wait regsvr32.exe /s slbcsp.dll
start /wait regsvr32.exe /s cryptdlg.dll
:: Configure and start the Cryptographic service
%SystemRoot%\system32\sc.exe config CryptSvc start= auto
:: Start the Cryptographic Service
%SystemRoot%\system32\net.exe start CryptSvc
cls
echo.
If "%catroot2locked%"=="True" GOTO CONT02
echo Finished, please reboot the computer and then try to install SP2 again...
GOTO END
:CONT02
echo Please run the batch file again with a newly restarted computer...
echo (but if it is newly restarted, just do a reboot and then try
echo to install SP2 again)...
GOTO END
:END
echo.
pause
--------------------8<----------------------

Signature
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Bigal - 30 Aug 2004 23:11 GMT
Torgeir, your suggestion worked. Thanks a lot.
"Torgeir Bakken (MVP)" wrote:
> > After one successful installation of SP2 I have had a problem on the second
> > machine. Installation went through the backup registry and restore point
[quoted text clipped - 91 lines]
>
> --------------------8<----------------------
Sabrina - 15 Sep 2004 02:11 GMT
Torgeir, you are genious! Many thanks from me too :) .
I only think there should be 'move /h' (instead of 'move /y') in the batch.
Torgeir Bakken \(MVP\) - 15 Sep 2004 02:50 GMT
> Torgeir, you are genious! Many thanks from me too :) .
Your welcome :-)
> I only think there should be 'move /h' (instead of 'move /y')
> in the batch.
No, I use /y in case there exists files/folders there from before.
A quote from "move.exe /?":
/Y Suppresses prompting to confirm you want to
overwrite an existing destination file.
I can't see that /h is supported by move.exe at all?

Signature
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Sabrina - 15 Sep 2004 11:41 GMT
> > I only think there should be 'move /h' (instead of 'move /y')
> > in the batch.
[quoted text clipped - 7 lines]
>
> I can't see that /h is supported by move.exe at all?
Oops... Sorry, you are right. I ran it under 4NT command shell, which
needs "move /H" for hidden and system files.
Fgow - 26 Oct 2004 17:25 GMT
> > After one successful installation of SP2 I have had a problem o
> the second
[quoted text clipped - 107 lines]
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx *
YOU ARE THE MAN.
I was about ready to re-instal XP then desided to do a search, and I a
glad I did.
Thanks a To
-
Fgo
RanchoDoug - 21 Mar 2005 19:11 GMT
"Torgeir Bakken (MVP)" wrote:
-snip-
> Try this:
>
> Place the text below in a .bat (batch) file (e.g. paste it into a new
> notepad document and save it with e.g. the name fixdb.bat)
>
> Then run the batch file by double clicking on it.
Thanks,
After hours and hours trying to find why my Wife's Dell couldn't install
SP2, I found your post and it worked perfectly. All my other machines had no
problem.
Doug
aligaus - 29 Jun 2006 20:09 GMT
This is what i keep getting - any ideas???
Please !!??
9.906: 2006/06/29 20:04:53.277 (local)
9.922: c:\61af9338e20457d03088\i386\update\update.exe (version
5.5.1005.0)
9.953: Service Pack started with following command line:
10.250: Return Value From OnACPower = 1
10.250: OnACPower returned value( 0x1 ) which is Equal To 0x1
10.250: Condition succeeded for section OnACPower.Section in Line 1 of
PreRequisite
10.250:
SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\WindowsFeatures is not
Present
10.250: First Condition in A6Block.Section Succeeded
10.250: Condition succeeded for section A6Block.Section in Line 2 of
PreRequisite
21.828: PrepareToTrustInfFile: MySetupCopyOEMInf failed: 0x5
21.828: IsInfFileTrusted: PrepareToTrustInfFile Failed: 0x5
21.906: UnRegisterSpuninstForRecovery, failed to delete
SpRecoverCmdLine value, error 0x2
21.906: DoInstallation: Failed to unregistering spuninst.exe for
recovery.
21.937: Access is denied.
24.062: Message displayed to the user: Access is denied.
24.062: User Input: OK
24.062: Service Pack 2 installation did not complete.
25.218: Message displayed to the user: Service Pack 2 installation did
not complete.
25.218: User Input: OK
25.218: Update.exe extended error code = 0x5
25.218: Update.exe return code was masked to 0x643 for MSI custom
action compliance.
--
aligaus