Command Line Parameters
Auslogics Disk Defrag Free comes with a command line tool, 'cdefrag.exe'
It can be found in the program folder once you download and install the program
Syntax
cdefrag.exe <volumes> [-f] [-quiet] [-bk] [-report:"path"]
cdefrag.exe -all [-f] [-quiet] [-bk] [-report:"path"]
cdefrag.exe -path:"path" [-f] [-quiet] [-bk] [-report:"path"]
<volumes>
One or more drive letters of the volumes to be defragmented
-all
Defragments all local disks on this computer
-path
Defragments file or folder (recursively into subfolders). The full path to file or folder should be specified
-f
Forces defragmentation of the disk when free space is low
-quiet
Does not display any information on the screen
-bk
Defragments with minimum CPU usage
-report
Outputs log in HTML format. If no file name is specified, the generated report will be saved in this format: defragYYYYMMDDHHMMSS.HTML
-a
Analyzes specified disks
-o
Defragments and optimizes specified disks, consolidates free space
-dt
Removes temporary files before defragmentation
-off
Turns off computer after defragmentation
-?
Displays help information
Examples
cdefrag D:
Defragment drive D:
cdefrag c: d: e:
Defragment drives C:, D: and E:
cdefrag -all
Defragment all local, non-removable drives
cdefrag -path:"C:\WINDOWS\Driver Cache\i386\driver.cab"
Defragment the "driver.cab" file
cdefrag -path:"C:\Program Files\Microsoft Office"
Defragment the "Microsoft Office" folder
cdefrag d: -f -report:"C:\logs\defrag.html"
Force-defragment drive D: even when free space is low and save the report with details of defragmentation in file C:\logs\defrag.html
cdefrag -all -quiet -bk -report:"C:\logs\"
Defragment all supported drives without displaying any information and with minimum CPU usage. Save the defragmentation report to the C:\logs\defragYYYYMMDDHHMMSS.HTML file
cdefrag -a c: d: e:
Analyze drives C:, D: and E:
cdefrag -a -all
Analyze all local, non-removable drives
cdefrag -o c: d: e:
Defragment and optimize drives C:, D: and E:
cdefrag -o -all
Defragment and optimize all local, non-removable drives
cdefrag -all -dt
Remove temporary files before defragmentation
1
Error defragmenting one or more disks
2
Administrator access rights are required to defragment disks
3
The command line parameters are invalid
4
Defragmentation was cancelled by user
5
Unsupported Windows version
7
Another instance of Disk Defrag is already running
8
Low free space on the disk
9
The computer was turned off or rebooted during defragmentation
Back to top ^
Installer Command Line Parameters
/SP-
Disables the "This will install... Do you wish to continue?" prompt at the beginning of Setup. Of course, this will have no effect if the DisableStartupPrompt [Setup] section directive was set to yes.
/SILENT
/VERYSILENT
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed, but the installation progress window is. When Setup is very silent, this installation progress window is not displayed. Everything else is normal, so for example, error messages during installation are still displayed, so is the startup prompt (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above).
/SUPPRESSMSGBOXES
Instructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'.
The default response in situations where there's a choice is:
- Yes in a 'Keep newer file?' situation.
- No in a 'File exists, confirm overwrite.' situation.
- Abort in Abort/Retry situations.
- Cancel in Retry/Cancel situations.
- Yes (=continue) in a DiskSpaceWarning/DirExists/DirDoesntExist/NoUninstallWarning/ExitSetupMessage/ConfirmUninstall situation.
- Yes (=restart) in a FinishedRestartMessage/UninstalledAndNeedsRestart situation.
5 message boxes are not suppressible:
- The About Setup message box.
- The Exit Setup? message box.
- The FileNotInDir2 message box displayed when Setup requires a new disk to be inserted and the disk was not found.
- Any (error) message box displayed before Setup (or Uninstall) could read the command line parameters.
- Any message box displayed by [Code] support function MsgBox.
/LOG
Causes Setup to create a log file in the user's TEMP directory detailing file installation and [Run] actions taken during the installation process. This can be a helpful debugging aid. For example, if you suspect a file isn't being replaced when you believe it should be (or vice versa), the log file will tell you if the file was really skipped, and why.
The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
/LOG="filename"
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message.
/NOCANCEL
Prevents the user from cancelling during the installation process, by disabling the Cancel button and ignoring clicks on the close button. Useful along with '/SILENT' or '/VERYSILENT'.
/DIR="x:\dirname"
Overrides the default directory name displayed on the Select Destination Location wizard page. A fully qualified pathname must be specified. May include an "expand:" prefix which instructs Setup to expand any constants in the name. For example: '/DIR=expand:{pf}\My Program'.
/GROUP="folder name"
Overrides the default folder name displayed on the Select Start Menu Folder wizard page. May include an "expand:" prefix, see '/DIR='. If the [Setup] section directive DisableProgramGroupPage was set to yes, this command line parameter is ignored.
Back to top ^
Uninstaller Command Line Parameters
/SILENT
/VERYSILENT
When specified, the uninstaller will not ask the user for startup confirmation or display a message stating that uninstall is complete. Shared files that are no longer in use are deleted automatically without prompting. Any critical error messages will still be shown on the screen. When '/VERYSILENT' is specified, the uninstallation progress window is not displayed.
/SUPPRESSMSGBOXES
Instructs the uninstaller to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'. See '/SUPPRESSMSGBOXES' under Setup Command Line Parameters for more details.
/LOG
Causes Uninstall to create a log file in the user's TEMP directory detailing file uninstallation and [UninstallRun] actions taken during the uninstallation process. This can be a helpful debugging aid.
The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
/LOG="filename"
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Uninstall will abort with an error message.
Back to top ^