Disk Defragmenter

How to Change the Schedule for Disk Defragmenter in Vista

information   Information
This will show you how to turn the Disk Defragmenter automatic Run on a schedule on or off, and how to change the schedule to run Disk Defragmenter when you want it to run.
Note   Note
The Disk Deframenter .exe file is located at C:\Windows\System32\dfrgui.exe .
Tip   Tip
For a faster alternative that includes a progress graph, you can use the free Auslogics Disk Defrag.
warning   Warning
Solid State Drives (SSD) do not need to be defragmented. Doing so may lower the lifespan.





OPTION ONE
To Change the Disk Defragmenter Schedule

1. Open the Start Menu.​
A) In the white line (Start Search) area, type dfrgui and press Enter.​
B) Go to step 3.​

OR
2. Open the Start Menu.​
A) Click on All Programs, Accessories, System Tools, and then on Disk Defragmenter.​

3. Click on Continue in the UAC prompt.​
NOTE: If will take a little bit while Disk Defragmenter analyzes the disks.​
Schedule.jpg

4. To Turn On the Disk Defragmenter Schedule
A) Check Run on a Schedule. (See screenshot above)
B) Go to step 6.​

5. To Turn Off the Disk Defragmenter Schedule
A) Uncheck Run on a Schedule. (See screenshot below step 2)​
B) Go to step 9.​

6. To Modify the Schedule Time
A) Click on the Modify Schedule button. (See screenshot below step 3)​
B) Make your time adjustments: (See screenshot below step 6C)​
  • How Often: Daily, Weekly, or Monthly
  • What Day: Pick a day, Sunday to Saturday.
  • What Time: Select a time from list.
Tip   Tip
Recommended Schedule of Times to Defrag
Tip   Tip

NOTE: The more you save and delete items off your hard drive, the more often you should defrag. Adjust to your needs.
[TABLE=class:-grid,-width:-500][TR][TD]
Schedule
[/TD]
[TD]
Description
[/TD][/TR]
[TR][TD]
Once a Month
[/TD]
[TD]
For a user that is only on the computer a few hours a week and does not do much file saving and deleting. You rarely install and uninstall programs.
[/TD][/TR]
[TR][TD]
Once a Week
[/TD]
[TD]
For most average users that use the computer for a few hours on a daily basis and does a lot more file saving and deleting. You only do a few installing and uninstalling of programs.
[/TD][/TR]
[TR][TD]
Once a Day
[/TD]
[TD]
For your power user that uses the computer for several hours a day and does an unbelievable amount of file saving and deleting. You do a lot of installing and uninstalling of programs.
[/TD][/TR][/TABLE]


C) Click on OK.​
Modify.jpg


7. To Select Volumes to Defragment
NOTE: This option is only added when you install the Vista SP1.​
A) Click on the Select volumes button. (See screenshot below step 3)​
B) Check the drives you want to be included in the defrag and uncheck the drives you do not want to be included. (See screenshot below)​
C) Click on OK.​
Select_Volumes.jpg


9. To Manually Run Disk Defragmenter Now
A) Click on the Defragment now button. (See screenshot below step 3)​
B) Do steps 7B and 7A.​
NOTE: If you need to stop Disk Defragmenter, click on the Cancel defragmentation button.​

10. When done, click on OK, if it is not grayed out, or Close if it is. (See screenshot below step 3)​





OPTION TWO
Set Defragmenter to Wake the Computer to Run

NOTE: By default Disk Defragmenter will only run when the computer is running and during low or idle usage in the background unless you run it manually, and not when the computer is in sleep mode or turned off. This will show you how to set Disk Defragmenter to wake the computer from sleep mode to run. This way you can schedule it to run when you are not using the computer in Option One above.
1. Open the Start Menu.​
A) In the white line (Start Search) area, type taskschd.msc and press Enter.​
B) Go to step 3.​

OR
2. Open the Control Panel (Classic view).​
A) Click on the Administrative Tools Icon.​
B) Click on Task Scheduler.​

3. In the left pane, click on the arrow next to Task Scheduler Library, Microsoft, and Windows to expand the folders. (See screenshot below step 4)​
4. Click on the Defrag folder.​
Task.jpg

5. In the middle pane right click on ScheduledDefrag and click on Properties. (See screenshot above)​
6. Click on the General tab. (See screenshot below step 7)​
7. Check the Run with highest privileges box.​
General_Tab.jpg

8. Click on the Conditions tab. (See screenshot below step 9)​
9. Check the Wake the computer to run this task box, and click on OK.​
Properties.jpg

10. Close Task Scheduler.​
That's it,
Shawn




 

Attachments

  • thumb_Disk_Defragmenter.png
    thumb_Disk_Defragmenter.png
    10.7 KB · Views: 560
Last edited by a moderator:
Hello Kev, and welcome to Vista Forums.

Yeah, I hear you. That's why I use the free Auslogics Disk Defrag when I do a manual defrag. You might see how you like it. :)

Shawn
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
Well I downloaded it - it was really quick to do its thing and says its increased my laptops speed by 2% :)

Many thanks and thanks for a great forum - keep up the good work

Kev
 

My Computer

You're welcome Kev.

Shawn
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
New here, When i used DF it took over 5 hours (its was a new laptop) and it took some of my GB off (this was before i had to wipe out my whole laptop and reinstall everything). Is this meant to happen? I haven't used it since.
 

My Computer

Hello Moviefan, and welcome to Vista Forums.

I do not see how Disk Defragmenter could delete anything. It just reorganizes the hard drive to get rid file fragmentation.

For a faster alternative that includes a progress graph, you can might try the free Auslogics Disk Defrag.

Shawn
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
My disk defrag is not running as scheduled. I have changed my scheduled time, but when I went to Task Scheduler to fix it where it would wake the computer to defrag, my Task Scheduler Library is empty. I can't find any reference to an empty library anywhere in the forums.
 

My Computer

I can't get Disk Defragmenter to start. I've tried 4 times - once by typing dfrgui.exe into the Start Search box, twice by choosing Disk Defragmenter in Accessories>System Tools, and once by going to C:\Windows\System32\dfrgui.exe in Windows Explorer. In Task Manager, I can see that it starts for 1 second and disappears.
 

My Computer

System One

  • Operating System
    Windows Vista Home Premium SP2, 32-bit
    Manufacturer/Model
    Retrofitted Refurbished Gateway
    CPU
    AMD
    Motherboard
    ASUS M3A78-EM
    Memory
    4 GB
    Monitor(s) Displays
    Acer 22-in Flat Screen Monitor
    Mouse
    Logitech M705 Wireless Mouse
    Keyboard
    Logitech K350 Wireless Keyboard
Hello Andy,

You might see if running a SFC /SCANNOW command may help if the file is corrupted. :)
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
I had just run an SFC before attempting to run Defrag. I also rebooted since posting. It still doesn't work.

I don't want to run it, but I want to see if it's running on a schedule or if it's off. There are plenty of utilities that will defrag, but they sometimes conflict with Windows Defrag. I'd hate to be defragging back and forth.
 

My Computer

System One

  • Operating System
    Windows Vista Home Premium SP2, 32-bit
    Manufacturer/Model
    Retrofitted Refurbished Gateway
    CPU
    AMD
    Motherboard
    ASUS M3A78-EM
    Memory
    4 GB
    Monitor(s) Displays
    Acer 22-in Flat Screen Monitor
    Mouse
    Logitech M705 Wireless Mouse
    Keyboard
    Logitech K350 Wireless Keyboard

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
Sir, that is the link to page one of this discussion. This discussion is why I posted my "defragmenter won't open" post.

I tried reinstalling it by loading dfrg.inf, but it is not where it should be. I do have Auslogics Disk Defragmenter installed. Could that have removed the built-in defragmenter?
 
Last edited:

My Computer

System One

  • Operating System
    Windows Vista Home Premium SP2, 32-bit
    Manufacturer/Model
    Retrofitted Refurbished Gateway
    CPU
    AMD
    Motherboard
    ASUS M3A78-EM
    Memory
    4 GB
    Monitor(s) Displays
    Acer 22-in Flat Screen Monitor
    Mouse
    Logitech M705 Wireless Mouse
    Keyboard
    Logitech K350 Wireless Keyboard
No, Auslogics wouldn't affect it. I'd say run the SFC scan a few times with a restart between each time to see if it may restore the file.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
Andy-

Based on other problems you have had, such as the "default programs won't load", I have a suspicion that either you have some malware/virus or your Vista installation is corrupt. Please don't get mad at me for making such a statement but you've had problems with so many other Windows functions, it just begs the question about those things. I certainly can't reproduce these problems on two different installations of Vista, SP2.
 

My Computer

System One

  • Operating System
    Vista Home Premium 64 bit SP2
    Manufacturer/Model
    Cyberpower
    CPU
    Intel Quad CPU Q6700 2.67 GHZ
    Motherboard
    NVIDIA 780i
    Memory
    4 GB
    Graphics card(s)
    MSI GTX 560 TI Twin Frozr
    Sound Card
    Sound Blaster SB Audigy
    Monitor(s) Displays
    Viewsonic VG2436
    Screen Resolution
    1920x1080p
    Hard Drives
    Samsung HD 105SI WDC WD20
    Case
    Apevia XJupiter
    Cooling
    air
    Mouse
    Logitech MX 600
    Keyboard
    Logitech MX 3200
    Internet Speed
    30 Mbps
Wither, I don't get mad at such statements. I just don't see how it helps me. I know that the system is not infected to a 99% certainty. Could I have had a previous infection that damaged Windows? Possibly. Have I run registry cleaners at times in the past 12 years? Yes, but I've also defragmented in that time using the built-in tool. I've also used third-party tools that I like better because they show graphically where I stand in the process. However, those tools also conflict with the built-in defragmenter. I could defrag with Windows then check with the third-party tool and be told that my disk got even more fragmented.

I was following along one of the tutorials for improving system performance and one of the steps was to defragment the drive. I was trying to follow the advice in this thread about defragmenting and getting it to run. It isn't working.

Internet searches found results that said third-party defragmenters could take over for the built-in. I also found that Task Scheduler had to be running for defrag to work. I went to Task Scheduler and it is running, but I got a persistent error. As soon as I open Task Scheduler, I get a dialog box that says:

"The task image is corrupt or has been tampered with.ManualDefrag"

When I click OK, I am let into Task Scheduler and it appears to work fine. Until I choose to look at the schedule for Windows Defrag and I get the error again. When I click OK, I am let into that schedule too. When I got into the schedule, it said it was last run November 2012. I selected to Run the task and it completed without telling me anything other than changing the last run to the current date. There was no dialog box at all to tell me it was running. Another search result said I can reinstall defrag using the dfrgui.inf file, but that is not on my INF folder. I have found a DfrgUI.exe.mui file, but I don't know if that will install Defrag or do something else.

Over the weekend, I ran a CHKDSK /r on each of my drives and several SFCs. No problems have been found except a non-writeable backup boot sector on a drive I don't boot from and will be removed shortly.

###########################################
EDIT: I GOT IT FIXED!! I followed the advice to repair Task Scheduler here: https://support.microsoft.com/en-us/kb/2305420

The Defrag User Interface now opens and it is defragmenting. I also happened to find that it is not automatically defragmenting because the trigger on the Scheduled Task is disabled even though the task itself is enabled.
 
Last edited:

My Computer

System One

  • Operating System
    Windows Vista Home Premium SP2, 32-bit
    Manufacturer/Model
    Retrofitted Refurbished Gateway
    CPU
    AMD
    Motherboard
    ASUS M3A78-EM
    Memory
    4 GB
    Monitor(s) Displays
    Acer 22-in Flat Screen Monitor
    Mouse
    Logitech M705 Wireless Mouse
    Keyboard
    Logitech K350 Wireless Keyboard
That's good news!
 

My Computer

System One

  • Operating System
    Vista Home Premium 64 bit SP2
    Manufacturer/Model
    Cyberpower
    CPU
    Intel Quad CPU Q6700 2.67 GHZ
    Motherboard
    NVIDIA 780i
    Memory
    4 GB
    Graphics card(s)
    MSI GTX 560 TI Twin Frozr
    Sound Card
    Sound Blaster SB Audigy
    Monitor(s) Displays
    Viewsonic VG2436
    Screen Resolution
    1920x1080p
    Hard Drives
    Samsung HD 105SI WDC WD20
    Case
    Apevia XJupiter
    Cooling
    air
    Mouse
    Logitech MX 600
    Keyboard
    Logitech MX 3200
    Internet Speed
    30 Mbps
Back
Top