I have written two scripts. One to copy Wise Disk Cleaner Portable to the working directory and a second script to run from the command line to do the actual disk clean up. The second script is: executeShellCommand (c:\atsworking\wisediskcleaner.exe -a, "Execute as System", "All Windows Operating Systems", "Halt on Fail")
The script shows running successfully and does clean up some files. However, if I login to the machine and run the command from the command line, it will find a lot more items to delete so obviously the script is not running correctly. When you do run the script from the command, the program does open its GUI console so it may be that it is not doing it when I try it from Kaseya.
Thanks for your help.
I would guess you will get better results running as user when users are logged in. I have noticed cleaners like this don't get much when run as system.
I am actually in a similar situation with Microsofts built in Disk Utility (cleanmgr.exe). The newish option to clean up old Windows Update files works perfectly while I am at the machine, but even run as user doesn't work from Kaseya.
All I did was update Kaseya's canned Windows Disk Cleanup procedure with this bit: