Example script to defragment the c:, can this be run while the user is logged off?
Hello,
We are starting to play around with scripting using KACE. We'd like to run a defrag script for our remaining XP machines and noticed there is a default one that comes with KACE. We want to schedule this to run once a week at night. We are able to execute it while we are logged in to the machine, but if we log off it doesn't look like it is running. We tried checking allow run while disconnected and allow run while logged off but it still fails. We checked the processes remotely on machines we ran this on via dameware and don't see defrag.exe running when logged off. We don't see any logs indicating defrag ran while logged off.
I'd like to know if this command simply can't execute while logged off, or if there is a setting in KACE preventing it. If it can't be run while logged off, does anyone know of another command that can?
Answers (1)
create a schedule on one machine for the time you want, copy and push that task to the others. you can get the file from the c:\windows\tasks dir
Go to Control Panel and open the Scheduled Tasks folder. Right
click your defrag job and select Properties from the menu. Make
sure that "Run only if logged on" is unchecked on the Task
page. Next, click on the Settings tab. Make sure you've checked
"Wake the computer to run this task" if the computer will be in
standby mode overnight.
Here are a few articles you may want to look at for more info:
How to Automate Disk Defragmenter Using Task Scheduler Tool in
Windows XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;555098
Schedule a Task to Defragment Drives
http://www.microsoft.com/windowsxp/using/setup/learnmore/tips/gehrke1.mspx
Comments:
-
I'm aware of how to run a scheduled task. This won't work for us for reasons I won't get into here.
The question I am asking pertains to the default defrag script that comes with KACE. - edwimb 11 years ago