Turn Disk Defrag Schedule Off

Page 1 of 2 12 LastLast

  1. Posts : 16
    Windows 7 Pro SP1 x64
       #1

    Turn Disk Defrag Schedule Off


    Howdy,
    There's an article here:
    Disk Defragmenter Schedule- Turn On or Off

    Which is very obvious, actually I need to disable the Disk Defragmenter Schedule CheckBox via registry!
    I need help, if anyone knows which registry key to modify.
    Just please refrain asking why I wanna use the registry method or show any other method!
    Cheers.
      My Computer


  2. Posts : 21,004
    Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10
       #2

    Hello omidsolo mate just go to that tutorial and post a reply Brink will answer your query

    PS Don't forget to back up the registry first though if you play in there Registry - Backup and Restore
      My Computer


  3. Posts : 16
    Windows 7 Pro SP1 x64
    Thread Starter
       #3

    Thanks dude, done, hope I receive a response :)
      My Computer


  4. Posts : 21,004
    Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10
       #4

    Yes you will mate he is a very busy fellow being Admin and doing what he does on the 7 8 and now 10 forums which includes a vast number of the tutorials - frankly I don't know how he does what he does
      My Computer


  5. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #5

    omidsolo said:
    I need to disable the Disk Defragmenter Schedule CheckBox via registry!
    The answer is not as obvious as you may think. The Disk Defragmenter Schedule checkbox configuration is not saved in the form of a registry key. Rather the setting is determined by the enabled state of a very specific task.

    Would you be okay with some PowerShell method instead, Omidsolo?
      My Computer


  6. Posts : 21,004
    Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10
       #6

    Actually Pyprohly has said it in a nutshell and far better than I could have done. Personally playing in the registry is something I think I may have mentioned requires great care and in any case requires a back up before one does anything
      My Computer


  7. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #7

    A VBScript solution.

    Code:
    ' ToggleScheduledOptimisation.vbs
    ' Toggles the on or off state of the Disk Defragmenter Schedule.
    
    Function PromptForElevation()
    	If Not CreateObject("WScript.Shell").Run("Net Sess", 0, True) = 0 Then
    		CreateObject("Shell.Application").ShellExecute "WScript", """" & WScript.ScriptFullName & """", "", "RunAs", 1
    		WScript.Quit
    	End If
    End Function
    
    PromptForElevation()
    
    Set objScheduleService = CreateObject("Schedule.Service")
    objScheduleService.Connect()
    
    Set taskScheduledDefrag = objScheduleService.GetFolder("\Microsoft\Windows\Defrag").GetTask("ScheduledDefrag")
    
    If taskScheduledDefrag.Enabled Then
    	taskScheduledDefrag.Enabled = False
    Else
    	taskScheduledDefrag.Enabled = True
    End If
      My Computer


  8. Posts : 6,285
    Windows 10 Pro X64
       #8

    Actually there is no need to turn off defrag. It will recognize the SSD and not defrag it.
      My Computer


  9. Posts : 16
    Windows 7 Pro SP1 x64
    Thread Starter
       #9

    So, there's no way via registry for sure ?!
      My Computer


  10. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #10

    omidsolo said:
    So, there's no way via registry for sure ?!
    Sorry, perhaphs I wasn't clear enough.

    Omidsolo, the state of Disk Defrag Schedule is not determined by any registry key or value. There is no "way via registry" because that setting is simply not stored the registry. Period.

    The registry stores a lot of settings, there's no denying that, but some things that we call 'settings' aren't alway stored in the registry. They are instead interpreted from the state of things, such as, if a certain file exists, or maybe if a particular process is running, or maybe if a certain task is enabled or disabled which is exactly how the Disk Defrag Schedule checkbox is determined.

    Windows does not revolve around the registry, mate.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:22.
Find Us