.      How to articles       Windows Services       Group Policy             Donate        
Computer step by step

How to Start/Stop Optimise drives

Service name: defragsvc

Display name: Optimise drives


Helps the computer run more efficiently by optimising files on storage drives.

Path to executable:

C:\WINDOWS\system32\svchost.exe -k defragsvc

This method shows you how to Start/Stop Optimise drives service from Command Prompt

Perform the following steps:

Please go to Start and click on the Type here to search

Type cmd, right click on cmd icon under the Programs and click on Run as administrator

Services Regedit CMD Msconfig

Please confirm User Account Control pop-up

Please select, right and copy a registry key from below, then right click on command prompt window, select Paste and press Enter

To Start Optimise drives service:

net start defragsvc

sc start defragsvc

Note: You can’t start a service if Startup type is on Disabled.

To Stop Optimise drives service:

net stop defragsvc

sc stop defragsvc

To change Startup type:


REG add "HKLM\SYSTEM\CurrentControlSet\PerfHost\defragsvc" /v Start /t REG_DWORD /d 2 /f

sc config defragsvc start= auto


REG add "HKLM\SYSTEM\CurrentControlSet\services\defragsvc" /v Start /t REG_DWORD /d 3 /f

sc config defragsvc start= demand


REG add "HKLM\SYSTEM\CurrentControlSet\services\defragsvc" /v Start /t REG_DWORD /d 4 /f

sc config defragsvc start= disabled

Automatic (Delayed Start):

REG add "HKLM\SYSTEM\CurrentControlSet\services\defragsvc" /v Start /t REG_DWORD /d 2 /f

sc config defragsvc start= delayed-auto

Note: When you change to Automatic (Delayed Start) a new key DelayedAutostart is created with value 1.

REG add "HKLM\SYSTEM\CurrentControlSet\services\defragsvc" /v DelayedAutostart /t REG_DWORD /d 1 /f

When you change to Automatic from Automatic (Delayed Start), DelayedAutostart change value to 0.

REG add "HKLM\SYSTEM\CurrentControlSet\services\defragsvc" /v DelayedAutostart /t REG_DWORD /d 0 /f