diff --git a/lockscreen-img.bat b/lockscreen-img.bat index 6684487..9304fbd 100644 --- a/lockscreen-img.bat +++ b/lockscreen-img.bat @@ -95,17 +95,10 @@ copy "%IMAGE%" "%WINDIR%\Web\Screen\img103.png" /y >nul copy "%IMAGE%" "%WINDIR%\Web\Wallpaper\Windows\img0.jpg" /y >nul rem Clear cache -takeown /f "%PROGRAMDATA%\Microsoft\Windows\SystemData" >nul -icacls "%PROGRAMDATA%\Microsoft\Windows\SystemData" /reset >nul -takeown /f "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18" >nul -icacls "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18" /reset >nul -takeown /f "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly" >nul -icacls "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly" /reset >nul -takeown /f "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z" >nul -icacls "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z" /reset >nul -takeown /f "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z\*" >nul -icacls "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z\*" /reset >nul -del /q /f "%PROGRAMDATA%\Microsoft\Windows\SystemData\S-1-5-18\ReadOnly\LockScreen_Z\*" >nul +takeown /r /d Y /f "%PROGRAMDATA%\Microsoft\Windows\SystemData" >nul +icacls "%PROGRAMDATA%\Microsoft\Windows\SystemData" /reset /t >nul +del /q /f "%PROGRAMDATA%\Microsoft\Windows\SystemData\*" >nul +for /d %%x in ("%PROGRAMDATA%\Microsoft\Windows\SystemData\*") do rd /s /q "%%x" cls echo :: Windows 10 AME Lockscreen Wallpaper Changer