I want to make a script:
run an IE cache file cleanup script every Monday (via Group Policy)
I'd like to ask everyone: how should this code be written so it can run under power users (it works with administrator privileges, but all the PCs in our workplace are set to power user privileges)?
Also, can the AT command create a task name? (Otherwise, if the user creates one named AT1 himself, the startup script will delete it.)
The code is as follows:
@echo off
echo
schtasks /delete /tn "At1" /f (first delete the auto-created task with the AT name (AT1))
at 8:40AM /Every:Monday cmd /c del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" (create the task named AT1)
echo
run an IE cache file cleanup script every Monday (via Group Policy)
I'd like to ask everyone: how should this code be written so it can run under power users (it works with administrator privileges, but all the PCs in our workplace are set to power user privileges)?
Also, can the AT command create a task name? (Otherwise, if the user creates one named AT1 himself, the startup script will delete it.)
The code is as follows:
@echo off
echo
schtasks /delete /tn "At1" /f (first delete the auto-created task with the AT name (AT1))
at 8:40AM /Every:Monday cmd /c del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" (create the task named AT1)
echo


