Jump to content

Scripting Defrag in Windows 2000


Recommended Posts

Guest jsuknaic
Posted

I am new to this tool and I have been trying to script the use of the defrag tool provided in Windows 2000. Below is how the script is written:

Run, %systemroot%\\system32\\dfrg.msc

Winwaitactive, Disk Defrag

Send, {ALTDOWN}A{ALTUP}D

Winwaitactive, Defragmentation Complete

Send, {TAB}{ENTER}

Winwaitactive, Disk Defrag

Send, {ALTDOWN}{F4}{ALTUP}

When I run the script I get an error message that states the following:

Line 1:

Run, C:\\WINNT\\system32\\dfrg.msc

Error: unable to run program. (Ensure that backslashes \ have been used properly).

I have checked the location of the file and all appears well. I can use this command (the first line) to run notepad.exe. I think it may have something to do with executing an .msc file, but I am not sure. Can anyone help me?

Guest jsuknaic
Posted

Thank you SOOOO much! That did it. I sincerely appreciate your fast response.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...