Skip to content

Instantly share code, notes, and snippets.

@2510
Last active May 7, 2024 09:41
Show Gist options
  • Save 2510/addc4d62b681b7ee3bf2 to your computer and use it in GitHub Desktop.
Save 2510/addc4d62b681b7ee3bf2 to your computer and use it in GitHub Desktop.
Disable unused services (for me) on Windows 10
REM Windows Search
sc config WSearch start=disabled
REM SSDP Discovery
sc config SSDPSRV start=disabled
REM Geolocation Service
sc config lfsvc start=disabled
REM ActiveX Installer
sc config AXInstSV start=disabled
REM AllJoyn Router Service
sc config AJRouter start=disabled
REM App Readiness
sc config AppReadiness start=disabled
REM HomeGroup Listener
sc config HomeGroupListener start=disabled
REM HomeGroup Provider
sc config HomeGroupProvider start=disabled
REM Internet Connetion Sharing
sc config SharedAccess start=disabled
REM Link-Layer Topology Discovery Mapper
sc config lltdsvc start=disabled
REM Microsoft(R) 診断ハブ標準コレクターサービス
sc config diagnosticshub.standardcollector.service start=disabled
REM Microsoft Account Sign-in Assistant
sc config wlidsvc start=disabled
REM Microsoft Windows SMS ルーター サービス。
sc config SmsRouter start=disabled
REM Network Connected Devicees Auto-Setup
sc config NcdAutoSetup start=disabled
REM Peer Name Resolution Protocol
sc config PNRPsvc start=disabled
REM Peer Networking Group
sc config p2psvc start=disabled
REM Peer Networking Identity Manager
sc config p2pimsvc start=disabled
REM PNRP Machine Name Publication Service
sc config PNRPAutoReg start=disabled
REM WalletService
sc config WalletService start=disabled
REM Windows Media Player Network Sharing Service
sc config WMPNetworkSvc start=disabled
REM Windows モバイル ホットスポット
sc config icssvc start=disabled
REM Xbox Live Auth Manager
sc config XblAuthManager start=disabled
REM Xbox Live セーブデータ
sc config XblGameSave start=disabled
REM Xbox Live ネットワーキング サービス
sc config XboxNetApiSvc start=disabled
REM デバイス管理登録サービス
sc config DmEnrollmentSvc start=disabled
REM 市販デモ サービス
sc config RetailDemo start=disabled
@fragtion
Copy link

fragtion commented Sep 15, 2017

Thank you for sharing this list. It seems one of the above services being disabled is preventing Windows 10 from updating successfully (in my case, from build 1703 15063.504, to 1703 15063.608)
Error transcript (Event Log): "Installation Failure: Windows failed to install the following update with error 0x800F0922: Security Update for Windows (KB4038788)".
After restoring default service configuration (http://www.winhelponline.com/blog/windows-10-default-services-configuration/), I was then able to complete the update successfully.

Edit: the service which should not be disabled in this case was:

REM App Readiness
sc config AppReadiness start=disabled

@DJ-Scihacker
Copy link

Then, i passed hours reading each service explanation in "services.msc", and choosing disabling it. Now i ran this script and i freed some weight of a computer in about 0.4 seconds, thanks to Mr. 2510. Maybe i will fork it to add some services to disable. I learned how to automate a basic serviceman task with your script. Thanks for sharing!!!!

@4zone
Copy link

4zone commented Mar 2, 2024

Then, i passed hours reading each service explanation in "services.msc", and choosing disabling it. Now i ran this script and i freed some weight of a computer in about 0.4 seconds, thanks to Mr. 2510. Maybe i will fork it to add some services to disable. I learned how to automate a basic serviceman task with your script. Thanks for sharing!!!!

What's your final script? Could you share it?

@DJ-Scihacker
Copy link

DJ-Scihacker commented Mar 3, 2024 via email

@patrickSchliengerCampestrini

works fine for me . tested on multiple versions of W10 /W11 and 2012/2016.

btw : always executed as admin

@DJ-Scihacker
Copy link

Yeah. Registry changes, services, msconfig and so, always need to run as admin; thas makes changes system wide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment