How to Reinstall or Fix Volume Shadow Copy Service (VSS) and Microsoft Software Shadow Copy Provider Service‏

How to Reinstall or Fix Volume Shadow Copy Service (VSS) and Microsoft Software Shadow Copy Provider Service‏


Create a batch file with the following content:

cd /d %windir%\system32

Net stop vss

Net stop swprv

regsvr32 ole32.dll

regsvr32 oleaut32.dll

regsvr32 vss_ps.dll

vssvc /register

regsvr32 /i swprv.dll

regsvr32 /i eventcls.dll

regsvr32 es.dll

regsvr32 stdprov.dll

regsvr32 vssui.dll

regsvr32 msxml.dll

regsvr32 msxml3.dll

regsvr32 msxml4.dll



Upon running the batch file if you get one or both of the following errors:

dllregisterserver in swprv.dll failed:
regsvr32 /i swprv.dll returns the error "DLLInstall in swprv.dll
failed. Return Code was: 0x8000ffff"

dllregisterserver in es.dll failed


Followed by the recorded events in the event log with the event ID 12289:

Then there are three events in the event log all event ID 12289 source: VSS


Volume Shadow Copy Service error: Unexpected error RegOpenKeyExW(-2147483646,SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost,...). hr = 0x80070005.

And

Volume Shadow Copy Service error: Unexpected error CComModule::RegisterServer(TRUE). hr = 0x80020009.

And

Volume Shadow Copy Service error: Unexpected error RegOpenKeyExW(-2147483646,SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost,...). hr = 0x80070005.

Or when opening the Properties of the hard disk drive and opening the Shadow Copies tab you see the error:
Initialization failed

Error 0x8004230f: the shadow copy provider had an unexpected error while tring to process the specified operation

Or the Microsoft Software Shadow Copy Provider Service is not installed or had been uninstalled or is missing in the services list

Solution:

Run the following three Microsoft Hotfixes in this specific order, and reboot after EACH one has been installed for a total of three reboots:

1.KB 943669

2.KB 975928

3.KB 979457

Give Full Permission to Administrator and System account for the registry 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost'

And again run the batch file to register the DLLs

Reference for error and command prompt commands:
http://support.microsoft.com/kb/940032

contributed by: David P. Rowe