Running Disk Cleanup Silently
I have the below running as an online shell script. It seems to run fine but when it runs the scheduled task it jut seems to sit there forever. The Registry keys go in so effectively taking care of /SageSet:100 and if I run the command locally it works fine. I have ensured that I am putting the registry keys into the 64 Bit hive but when it runs I see that Disk Cleanup has started as a background task but it seems like its just sitting there waiting for input like to be told what to run.
It runs as the Local System User and I have tried running it as an admin user with the same result.
Reg Import DiskCleanupSettings.reg /reg:64
schtasks /create /tn DiskCleanup /tr "C:\Windows\System32\cleanmgr.exe /sagerun:100" /sc once /st "14:40" /RL HIGHEST /ru System
schtasks /run /tn DiskCleanup
Does anyone have any ideas on what might be the issue?