batcmd.com Windows 7 Services

Disk Defragmenter - Windows 7 Service

Provides Disk Defragmentation Capabilities.

This service also exists in Windows 10, 11 and 8.

Startup Type

Windows 7 edition without SP SP1
Starter Manual Manual
Home Basic Manual Manual
Home Premium Manual Manual
Professional Manual Manual
Ultimate Manual Manual
Enterprise Manual Manual

Default Properties

Display name:Disk Defragmenter
Service name:defragsvc
Type:own
Path:%WinDir%\system32\svchost.exe -k defragsvc
File:%WinDir%\System32\defragsvc.dll
Error control:normal
Object:localSystem
Privileges:
  • SeChangeNotifyPrivilege
  • SeImpersonatePrivilege
  • SeIncreaseWorkingSetPrivilege
  • SeTcbPrivilege
  • SeSystemProfilePrivilege
  • SeAuditPrivilege
  • SeCreateGlobalPrivilege
  • SeBackupPrivilege
  • SeManageVolumePrivilege

Default Behavior

The Disk Defragmenter service runs as localSystem in its own process. It does not share the executable file with other services. If the Disk Defragmenter fails to load or initialize, the error is recorded into the Event Log. Windows 7 startup should proceed, but a message box is displayed informing you that the defragsvc service has failed to start.

Dependencies

Disk Defragmenter will not start, if the Remote Procedure Call (RPC) service is stopped or disabled.

Restore Default Startup Type of Disk Defragmenter

Automated Restore

1. Select your Windows 7 edition and Service Pack, and then click on the Download button below.

2. Save the RestoreDiskDefragmenterWindows7.bat file to any folder on your hard drive.

3. Right-click the downloaded batch file and select Run as administrator.

4. Restart the computer to save changes.

Note. Make sure that the defragsvc.dll file exists in the %WinDir%\System32 folder. If this file is missing you can try to restore it from your Windows 7 installation media.

Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.