1 of 1 people found this helpful
Anytime you do something in a script, it is being executed as the local system account that has full privileges to the machine. So just create the custom script, and permissions shouldn't be an issue if you kick off the defrag with the script.
You may also not need to do a batch file, and just execute "defrag.exe c:" with a custom script.
I did get the batch file to work so I didn't have to do it as a LANDesk script. The only thing now is that the user will see the command screen when defrag executes. I did some research and found that there is a silent tag for defrag " \noprompt", however this tag does not work with XP.
Any ideas on how to make defrag silent so the user does not see the screen?
I just tested out a custom script that is silent to the end user. Go into manage scripts, and click new custom script, and give it a name. Then replace all the data in the opened script with this:
[MACHINES] remexec0=defrag c:
That should make it silent and not require a batch file. Just schedule that up and run it. The /noprompt switch is not necessary.
That worked out great. Thanks!
There is also an option to use Hidedos.exe to hide the dos box if that is what is showing up...
In the script
REMEXEC0=<qt/>%LDMS_CLIENT_DIR%\HIDEDOS.EXE<qt/> cmd /c defrag c:
You may want to add a line to copy it down to the client first from LDlogon or packages...
**Rename it to EXE
HideDos.txt 28.0 K
Do you guys know of a way to run disk cleanup using LANDesk script.
Checkout this link
You can create a "job" by running cleanmgr with a /sageset:number command, so
Creates registry entries in
and for each object, for example "Internet Cache Files" it would create a binary value called
Where 0001 is the number specified in the sageset command, and the system zero fills it. It sets the value to 2 if you want that to be cleaned up with disk cleanup.
So what you need to do is run it once manually on your machine, and select all the options you want, then export that registry key and put that on the landesk server. Then just push out that registry entry, then execute the task.
[MACHINES] REMEXEC0=regedit /s \landeskappsdiskcleanup.reg REMEXEC1=cleanmgr /sagerun:1