In regards to: C:\ProgramData\Microsoft\Windows\SystemData
Changes to this folder can corrupt Windows Spotlight from working
again please backup system before trying to make various
offline hacks for the lock screen and login screen.
How to use Task Scheduler to run System Task in Windows 10
It seems that this location is used for storing lockscreen cache
organised by user, deleting the images in the location is used by
thewindowsclud, while deleting the folders in the directory is only
found in one pastebin hack solution.
I have not found any way to easily take ownership of the folder and revert the permissions so have instead found a simple way to run the task as System.
Save a batch file ClearSystemDataCache.cmd with the following (this relates to above question, otherwise make script to be run by system):
Del /s /q C:\ProgramData\Microsoft\Windows\SystemData\*.*
Run taskschedular as admin
Name the task --> Clear SystemData Cache *(or name of task)
Change User or Group --> Advanced --> Find Now --> Scroll Down Select 'System' --> OK --> OK
Tick 'Run with Highest Privileges'
Under actions tab browse and select ClearSystemDataCache.cmd
Set up an automatic triggers under triggers tab, such as on unlock.
Click --> OK --> OK
Now can right click on task and 'Run' or wait for set trigger.
This task can be also exported as an xml file and imported into other computers.
No need to use takeown or icacls to make these system changes.
Reading:
SO How do you run CMD.exe under the Local System Account?
Edugeek - 10 holding onto cached lock screen images?
Thewindowsclub - How to remove Lock Screen images history from Windows 10
Microsoft Forum - LockScreen Cache not updating
Pastebin - Set Lockscreen for windows 10
SU - Is there a way in which I can use takeown to apply ownership to every directory on the drive?
Questions:
SU - How to use Icals & Takeown to make changes and reset in Windows 10
SU - 'Access Denied' how to revert permissions - icacls and takeown