Failure during Windows Server 2008 System State Backup & System Writer Missing

For some of those new to DPM 2007, you might find yourself in a situation where a Windows Server 2008 (and R2) is failing during backups consistently.  The consistency part is the ironic is that it is always failing and might lead you to review a bit more what is going on.  This problem, as outlined in this post, is often related to missing the Windows Backup feature on Windows Server 2008.

However, there are cases where some servers will fail unless you reset permissions for the System Writer.  This was outlined in this forum post yet no one actually batched this up and shared and since I had quite a few servers that I needed to run this on I batched this up and it corrected the issue.

To correct this problem, simply copy this batch file and execute on your Windows Server 2008 servers in question -

 REM  Set ACLs correct for System Writer
REM  *************************************
Takeown /f %windir%\winsxs\filemaps /a
icacls %windir%\winsxs\filemaps  /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\filemaps  /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\filemaps  /grant "BUILTIN\Users:(RX)"
icacls %windir%\winsxs\filemaps  /grant "Administratoren:(RX)"
Takeown /f %windir%\winsxs\filemaps\* /a
icacls %windir%\winsxs\filemaps\*.*  /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\filemaps\*.*  /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\filemaps\*.*  /grant "BUILTIN\Users:(RX)"
icacls %windir%\winsxs\filemaps\*.*  /grant "Administrators:(RX)"
Takeown /f %windir%\winsxs\temp\PendingRenames /a
icacls %windir%\winsxs\temp\PendingRenames  /grant "Administrators:(RX)"
icacls %windir%\winsxs\temp\PendingRenames /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\temp\PendingRenames /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\temp\PendingRenames /grant "BUILTIN\Users:(RX)"
Takeown /f %windir%\winsxs\temp\PendingRenames\*.* /a
icacls %windir%\winsxs\temp\PendingRenames\*.*  /grant "Administrators:(RX)"
icacls %windir%\winsxs\temp\PendingRenames\*.* /grant "NT AUTHORITY\SYSTEM:(RX)"
icacls %windir%\winsxs\temp\PendingRenames\*.* /grant "NT Service\trustedinstaller:(F)"
icacls %windir%\winsxs\temp\PendingRenames\*.* /grant "BUILTIN\Users:(RX)"

REM  Restart the Cryptographic Services
REM  **********************************
net stop cryptsvc &;& net start cryptsvc

After executing this, you will be set and ready to re-run your job and off you go.  This is the smallest post in history but it solved a big problem of mine on a couple of servers.

-Chris