Tales from the Geek
Follow the life of a guy as he works, plays, and goes to college
-
Replacing the Default Win7 Background
This script requires a couple things. subinacl.exe, and your background must be img0.jpg
The script takes ownership to administrators, sets rights to modify for administrators, replaces the image, sets rights back to what it is supposed to be, then uses subinacl to give ownership back to TrustedInstaller
takeown /F C:\Windows\Web\Wallpaper\Windows\img0.jpg /A
icacls C:\Windows\Web\Wallpaper\Windows\img0.jpg /grant Administrators:M
Copy img0.jpg c:\Windows\Web\Wallpaper\Windows\img0.jpg /y
icacls C:\Windows\Web\Wallpaper\Windows\img0.jpg /grant:r Administrators:RX
subinacl /file “C:\Windows\Web\Wallpaper\Windows\img0.jpg” /setowner=”NT SERVICE\TrustedInstaller”