Many programs can be more simply controlled using command line switches.
Here are some examples of programs that can be controlled using command line switches:
SCANDISK:
Syntax
scandskw [drive:] [/A] [/N] [/P]
scandisk drive:\dblspace.nnn
scandisk drive:\drvspace.nnn
Parameters
drive:
Specifies one or more drives to be checked.
/A or /All
Checks all local, nonremovable hard disk drives.
/N or /NonInteractive
Starts and closes ScanDisk automatically. However, this switch does not prevent ScanDisk from stopping to report errors found on the drive. You can, however, set ScanDisk to not report errors - press the “Advanced” button in ScanDisk for more information.
/p or /Preview
Runs ScanDisk in Preview mode, where it reports and seems to correct errors that it finds, but it does not actually write changes to the disk.
DEFRAG
Syntax
defrag [drive: | /all] [/F | /U | /Q] [/noprompt] [/concise | /detailed]
Parameters
drive:
Drive letter of the disk to be optimized.
/all
Defragment all local, nonremovable drives.
/F
Defragment files and free space.
/U
Defragment files only.
/Q
Defragment free space only.
/concise
Display the Hide Details view (default).
/detailed
Display the Show Details view.
/noprompt
Unattended mode; do not stop and display confirmation messages.