Which is the most significant change I can make to Windows 10
(Windows 11) to speed up the restart?
– My own answer (for now) is that blocking/disabling the DiagTrack
service is the most significant change I can make to to speed up
the restart (on an HDD).
Sections 1-3 below show three different ways to do this.
Section 4 is strictly speaking not an answer to the question, but
rather some extras that I think my future self will be interested in.
The DiagTrack service (in version 21H2 known as Connected User
Experiences and Telemetry) is a Windows service that transmits
diagnostic and usage information to Microsoft.
In other words, for me as a user, this service is useless.
As it turns out, it makes my computer so sluggish that I can hardly
use it.
So it's actually much worse than useless.
1. Disable the DiagTrack service in Windows Services
Hit WinKey+r, type (or paste) services.msc
and press Enter.
Sort by name and look for Connected User Experiences and Telemetry.
Double-click that service.
At Service status: Running, click Stop.
At Startup type: Automatic, change to Disabled.
Click OK and F5.

^ click to enlarge
Make a software restart of the computer – press
WinKey+x followed
by u and r.
– With this single change it now takes less than 8 minutes for
Windows to start up – including the time it takes to log in.
You may have to do this every time
Windows Update installs a new build version.
2. Disable the DiagTrack service from the command line
Alternatively, the DiagTrack service can be disabled from the command
line as follows.
Open the command line as administrator –
hit WinKey+r, type cmd, hold down
Ctrl+Shift and press Enter.
Then run :
1
net stop DiagTrack & sc config DiagTrack start= disabled
Expect a response like :
The Connected User Experiences and Telemetry service was stopped successfully.
or :
The Connected User Experiences and Telemetry service is not started.
and :
[SC] ChangeServiceConfig SUCCESS
3. Block the DiagTrack service permanently in the registry
A third alternative to prevent the DiagTrack service from running
again is to block it by renaming its corresponding registry key.
Press WinKey+r, type regedit and hit
Enter.
In the navigation bar, paste
HKLM\SYSTEM\CurrentControlSet\Services\DiagTrack,
Enter.
Right-click DiagTrack and choose Rename.
Paste/type for example DiagTrack-BLOCKED!! and press
Enter.
Restart for it to take effect.
As long as you don't restore the original name, the DiagTrack service
is now permanently blocked and will never run again (well, not
until Windows Update installs a new build version).
How to restore the DiagTrack service
If you later want to run the DiagTrack service again, just remove the
suffix -BLOCKED!! so that the original name DiagTrack is restored.
Then enable and restart the service :
sc config DiagTrack start= auto & net start DiagTrack
Restart the computer.
4. More suggestions to make Windows more responsive (optional)
What I describe in this section is highly dependent on my personal
preferences – so just disregard whatever you disagree with.
Disclaimer
If you try out any of the suggestions below, I rather strongly
recommend doing one and only one change at a time, and making a
software restart after each change.
Otherwise you might not know what to revert if a change turns out to
have undesirable results.
4a. Disable Windows Update
To disable Windows Update, in the registry add the suffix -BLOCKED!!
to the following two keys :
HKLM\SYSTEM\CurrentControlSet\Services\wuauserv
HKLM\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc
If you want more details, see this
answer on how to permanently disable Windows Update.
4b. Disable Microsoft Edge
There are quite a few suggestions on
how to disable Microsoft Edge.
4c. More services that I block
My perception of Windows Defender is that it acts more like a virus
malware than an anti-virus goodware.
In short, I don't want it in my computer.
To get rid of it, I use the same technique again – I rename the key
HKLM\SYSTEM\CurrentControlSet\Services\WinDefend
to WinDefend-BLOCKED!!.
This case is bit more tricky though, as I need to restart in
Safe mode to rename the key.
For more details, see this answer on how to disable Windows Defender.
There are two more registry keys to which I add the suffix
-BLOCKED!! :
HKLM\SYSTEM\CurrentControlSet\Services\TermService
HKLM\SYSTEM\CurrentControlSet\Services\SysMain
The TermService key corresponds to the Remote Desktop Services.
By disabling it, I get one less security vulnerability
to worry about.
The SysMain key corresponds to the SysMain service which was
named PreFetch or SuperFetch in earlier versions of Windows.
A malfunction can make the SysMain service cause high CPU usage.
4d. Services that I disable
As I normally don't use the Internet Information Services (IIS)
Server,
I might as well disable its service
Application Host - tasks for IIS :
net stop AppHostSvc & sc config AppHostSvc start= disabled
The Connected Devices Platform Service makes no sense to me :
net stop CDPSvc & sc config CDPSvc start= disabled
I don't use the Downloaded Maps Manager :
net stop MapsBroker & sc config MapsBroker start= disabled
The Diagnostic Policy Service is [...] notorious for hogging up the
system resources :
net stop DPS & sc config DPS start= disabled
How to restore any of the disabled services
sc config <service-name> start= demand
For example :
sc config AppHostSvc start= demand
4e. Executables that I prevent from running
Here are some .exe files that I don't want to run on my computer.
To stop them, I simply replace them with empty files
which have the exact same names.
But before I do that, I first save the original file in a zip file and
leave it in the same directory as the original file.
I might need to take full control of the file before I can replace it.
2
C:\Windows\System32\CompatTelRunner.exe
C:\Windows\System32\WerFault.exe
C:\Windows\System32\WerFaultSecure.exe
C:\Windows\SysWOW64\OneDriveSetup.exe
In a command line opened as administrator, I run :
cd C:\Windows\System32 && takeown /f CompatTelRunner.exe /a
&& icacls CompatTelRunner.exe /grant Administrators:f
and
cd C:\Windows\System32 && takeown /f WerFault.exe /a
&& icacls WerFault.exe /grant Administrators:f
and
cd C:\Windows\System32 && takeown /f WerFaultSecure.exe /a
&& icacls WerFaultSecure.exe /grant Administrators:f
and
cd C:\Windows\SysWOW64 && takeown /f OneDriveSetup.exe /a
&& icacls OneDriveSetup.exe /grant Administrators:f
4f. Adjusting for performance
Press WinKey+r, type sysdm.cpl (and hit
Enter).
Click the Advanced tab, and then Performance > Settings....
In the Visual Effects tab, I choose Custom and check the
following three settings :
- Animate controls and elements inside windows
- Show window contents while dragging
- Smooth edges of screen fonts
4g. Maybe turn off background apps?
Press WinKey+i and click Privacy.
In the left pane scroll down and click Background apps.
At the top of the right pane – where it says
Let apps run in the background – turn it Off.
5. Final remarks
After spending three weeks full time on unbricking my laptop – bricked
by a Windows Update – I finally feel that it starts up within
(almost) reasonable time, and that it's now mostly acceptably
responsive.
My laptop now restarts in less than 6 minutes – including the time
it takes to log in and start some of my basic files and
applications.
I still wish it would restart faster, but 6 minutes instead of 45
minutes on every restart – that's clearly a considerable improvement.
Actually, I can restart my laptop in less than 3 minutes if –
instead of making software restart – I shut it down
(WinKey+x followed by u and
U) and then restart it by pressing the physical power
button.
(I believe such a restart will not install any updates that may have
been downloaded by Windows Update.)
References
1
Never, ever run sc delete!
2
Since for each file, I save a zip file containing the original
.exe file, I can easily restore them if needed.