My (humble) contribution

Discussion in 'Windows 10' started by Thomas Dubreuil, Dec 24, 2018.

  1. Thomas Dubreuil

    Thomas Dubreuil MDL Member

    Aug 29, 2017
    134
    218
    10
    #1 Thomas Dubreuil, Dec 24, 2018
    Last edited: Jan 9, 2019
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. slomies

    slomies MDL Novice

    Jun 8, 2015
    8
    3
    0
    #2 slomies, Dec 26, 2018
    Last edited: Dec 26, 2018
    Thank you for this @Thomas Dubreuil! The LTSC optimized services batch file disables my usb wifi adapter. Any idea which service it is that I can remove from the batch file to alleviate that issue?

    Edit: It might be the Wlan service?
     
  3. yatopp

    yatopp MDL Novice

    Jul 17, 2011
    13
    5
    0
    Maybe different sections for different sets of services (and tasks etc). One section for telemetry/privacy, other for personal prefs, other for networking etc and each service has a description so the user can decide which to enable/disable.
     
  4. Thomas Dubreuil

    Thomas Dubreuil MDL Member

    Aug 29, 2017
    134
    218
    10
    #4 Thomas Dubreuil, Dec 26, 2018
    Last edited: Dec 26, 2018
    (OP)
    my bad...did without thinking that many people use wifi, might certainly be Wlan service! will check it.
    try this one

    Code:
    @echo off
    %windir%\system32\whoami.exe /USER | find /i "S-1-5-18" 1>NUL && (
    goto :OK
    ) || (
    nsudo -U:T -P:E "%~dpnx0"& exit /b >NUL 2>&1
    )
    
    :OK
    set "AUTO=AudioEndpointBuilder,Audiosrv,BFE,BrokerInfrastructure,CoreMessagingRegistrar,CryptSvc,DcomLaunch,ddpvssvc,Dhcp,Dnscache,DPS,DusmSvc,EventLog,EventSystem,FontCache,gpsvc,IKEEXT,LSM,mpssvc,NlaSvc,nsi,Power,ProfSvc,RpcEptMapper,RpcSs,SamSs,Schedule,SENS,ShellHWDetection,sppsvc,SysMain,SystemEventsBroker,Themes,TrkWks,UserManager,UsoSvc,Wcmsvc,wfcs,WinDefend,Winmgmt,WlanSvc,wscsvc,WSearch"
    set "DEMAND=AppIDSvc,Appinfo,AppReadiness,AppXSvc,AssignedAccessManagerSvc,AxInstSV,BDESVC,BITS,camsvc,ClipSVC,COMSysApp,ddpsvc,defragsvc,DeviceInstall,DevQueryBroker,diagsvc,DisplayEnhancementService,DmEnrollmentSvc,dot3svc,DsmSvc,DsSvc,Eaphost,EFS,embeddedmode,EntAppSvc,fdPHost,FontCache3.0.0.0,GraphicsPerfSvc,hidserv,InstallService,jhi_service,KeyIso,KtmRm,LicenseManager,lltdsvc,LMS,LxpSvc,MSDTC,msiserver,Netman,netprofm,NetSetupSvc,NgcCtnrSvc,NgcSvc,p2pimsvc,p2psvc,perceptionsimulation,PerfHost,pla,PlugPlay,PNRPAutoReg,PNRPsvc,PolicyAgent,QWAVE,seclogon,SecurityHealthService,Sense,SentinelKeysServer,SentinelProtectionServer,SentinelSecurityRuntime,smphost,spectrum,SstpSvc,StateRepository,StorSvc,svsvc,swprv,TieringEngineService,TimeBrokerSvc,TokenBroker,TrustedInstaller,VaultSvc,vds,VSS,WaaSMedicSvc,WalletService,WarpJITSvc,wbengine,WdiServiceHost,WdiSystemHost,WdNisSvc,Wecsvc,WEPHOSTSVC,wercplsupport,wlpasvc,WManSvc,wmiApSrv,WPDBusEnum,wuauserv,cbdhsvc,DevicesFlowUserSvc,WpnUserService"
    set "DISABLED=AJRouter,ALG,AppMgmt,AppVClient,BTAGService,BthAvctpSvc,bthserv,CDPSvc,CertPropSvc,CscService,DeviceAssociationService,diagnosticshub.standardcollector.service,DiagTrack,dmwappushservice,DoSvc,FDResPub,fhsvc,FrameServer,HvHost,IAStorDataMgrSvc,icssvc,iphlpsvc,IpxlatCfgSvc,irmon,LanmanServer,LanmanWorkstation,lfsvc,lmhosts,MapsBroker,MSiSCSI,NaturalAuthentication,NcaSvc,NcbService,NcdAutoSetup,Netlogon,NetTcpPortSharing,PcaSvc,PeerDistSvc,PhoneSvc,PrintNotify,PushToInstall,RasAuto,RasMan,RemoteAccess,RemoteRegistry,RetailDemo,RmSvc,RpcLocator,SCardSvr,ScDeviceEnum,SCPolicySvc,SDRSVC,SEMgrSvc,SensorDataService,SensorService,SensrSvc,SessionEnv,SgrmBroker,SharedAccess,SharedRealitySvc,shpamsvc,SmsRouter,SNMPTRAP,Spooler,SSDPSRV,ssh-agent,stisvc,TabletInputService,TapiSrv,TermService,tzautoupdate,UevAgentService,UmRdpService,upnphost,VacSvc,vmicguestinterface,vmicheartbeat,vmickvpexchange,vmicrdv,vmicshutdown,vmictimesync,vmicvmsession,vmicvss,W32Time,WbioSrvc,wcncsvc,WebClient,WerSvc,WFDSConMgrSvc,WiaRpc,WinHttpAutoProxySvc,WinRM,wisvc,wlidsvc,WpcMonSvc,WpnService,WwanSvc,XblAuthManager,XblGameSave,XboxGipSvc,XboxNetApiSvc,BcastDVRUserService,BluetoothUserService,CaptureService,CDPUserSvc,ConsentUxUserSvc,DevicePickerUserSvc,MessagingService,PimIndexMaintenanceSvc,PrintWorkflowUserSvc,UnistoreSvc,UserDataSvc"
    
    for %%G in (%AUTO%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 2 /f
    for %%G in (%DEMAND%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 3 /f
    for %%G in (%DISABLED%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 4 /f
    for %%G in (%AUTO%) do sc config %%G start= AUTO
    for %%G in (%DEMAND%) do sc config %%G start= DEMAND
    for %%G in (%DISABLED%) do sc config %%G start= DISABLED
    
    echo Press any key to exit...
    pause >NUL & exit /b
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. angelsanges

    angelsanges MDL Novice

    Sep 4, 2007
    37
    11
    0
    also file sharing is disabled.
     
  6. slomies

    slomies MDL Novice

    Jun 8, 2015
    8
    3
    0
    No luck. Used your code to make a batch file and ran it as admin and command prompt screen goes on for 1 second and then disappears. The WiFi still doesn't work after running it.
     
  7. angelsanges

    angelsanges MDL Novice

    Sep 4, 2007
    37
    11
    0
    go to services.msc and enable WLAN service
     
  8. Thomas Dubreuil

    Thomas Dubreuil MDL Member

    Aug 29, 2017
    134
    218
    10
    sorry thought it was obvious that script needs NSudo (for complete services optimization)...
    for your case simply enable wlan service, as @angelsanges said...or run script without Nsudo for "regular" optimization...like this:


    Code:
    @echo off
    set "AUTO=AudioEndpointBuilder,Audiosrv,BFE,BrokerInfrastructure,CoreMessagingRegistrar,CryptSvc,DcomLaunch,ddpvssvc,Dhcp,Dnscache,DPS,DusmSvc,EventLog,EventSystem,FontCache,gpsvc,IKEEXT,LSM,mpssvc,NlaSvc,nsi,Power,ProfSvc,RpcEptMapper,RpcSs,SamSs,Schedule,SENS,ShellHWDetection,sppsvc,SysMain,SystemEventsBroker,Themes,TrkWks,UserManager,UsoSvc,Wcmsvc,wfcs,WinDefend,Winmgmt,WlanSvc,wscsvc,WSearch"
    set "DEMAND=AppIDSvc,Appinfo,AppReadiness,AppXSvc,AssignedAccessManagerSvc,AxInstSV,BDESVC,BITS,camsvc,ClipSVC,COMSysApp,ddpsvc,defragsvc,DeviceInstall,DevQueryBroker,diagsvc,DisplayEnhancementService,DmEnrollmentSvc,dot3svc,DsmSvc,DsSvc,Eaphost,EFS,embeddedmode,EntAppSvc,fdPHost,FontCache3.0.0.0,GraphicsPerfSvc,hidserv,InstallService,jhi_service,KeyIso,KtmRm,LicenseManager,lltdsvc,LMS,LxpSvc,MSDTC,msiserver,Netman,netprofm,NetSetupSvc,NgcCtnrSvc,NgcSvc,p2pimsvc,p2psvc,perceptionsimulation,PerfHost,pla,PlugPlay,PNRPAutoReg,PNRPsvc,PolicyAgent,QWAVE,seclogon,SecurityHealthService,Sense,SentinelKeysServer,SentinelProtectionServer,SentinelSecurityRuntime,smphost,spectrum,SstpSvc,StateRepository,StorSvc,svsvc,swprv,TieringEngineService,TimeBrokerSvc,TokenBroker,TrustedInstaller,VaultSvc,vds,VSS,WaaSMedicSvc,WalletService,WarpJITSvc,wbengine,WdiServiceHost,WdiSystemHost,WdNisSvc,Wecsvc,WEPHOSTSVC,wercplsupport,wlpasvc,WManSvc,wmiApSrv,WPDBusEnum,wuauserv,cbdhsvc,DevicesFlowUserSvc,WpnUserService"
    set "DISABLED=AJRouter,ALG,AppMgmt,AppVClient,BTAGService,BthAvctpSvc,bthserv,CDPSvc,CertPropSvc,CscService,DeviceAssociationService,diagnosticshub.standardcollector.service,DiagTrack,dmwappushservice,DoSvc,FDResPub,fhsvc,FrameServer,HvHost,IAStorDataMgrSvc,icssvc,iphlpsvc,IpxlatCfgSvc,irmon,LanmanServer,LanmanWorkstation,lfsvc,lmhosts,MapsBroker,MSiSCSI,NaturalAuthentication,NcaSvc,NcbService,NcdAutoSetup,Netlogon,NetTcpPortSharing,PcaSvc,PeerDistSvc,PhoneSvc,PrintNotify,PushToInstall,RasAuto,RasMan,RemoteAccess,RemoteRegistry,RetailDemo,RmSvc,RpcLocator,SCardSvr,ScDeviceEnum,SCPolicySvc,SDRSVC,SEMgrSvc,SensorDataService,SensorService,SensrSvc,SessionEnv,SgrmBroker,SharedAccess,SharedRealitySvc,shpamsvc,SmsRouter,SNMPTRAP,Spooler,SSDPSRV,ssh-agent,stisvc,TabletInputService,TapiSrv,TermService,tzautoupdate,UevAgentService,UmRdpService,upnphost,VacSvc,vmicguestinterface,vmicheartbeat,vmickvpexchange,vmicrdv,vmicshutdown,vmictimesync,vmicvmsession,vmicvss,W32Time,WbioSrvc,wcncsvc,WebClient,WerSvc,WFDSConMgrSvc,WiaRpc,WinHttpAutoProxySvc,WinRM,wisvc,wlidsvc,WpcMonSvc,WpnService,WwanSvc,XblAuthManager,XblGameSave,XboxGipSvc,XboxNetApiSvc,BcastDVRUserService,BluetoothUserService,CaptureService,CDPUserSvc,ConsentUxUserSvc,DevicePickerUserSvc,MessagingService,PimIndexMaintenanceSvc,PrintWorkflowUserSvc,UnistoreSvc,UserDataSvc"
    
    for %%G in (%AUTO%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 2 /f
    for %%G in (%DEMAND%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 3 /f
    for %%G in (%DISABLED%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 4 /f
    for %%G in (%AUTO%) do sc config %%G start= AUTO
    for %%G in (%DEMAND%) do sc config %%G start= DEMAND
    for %%G in (%DISABLED%) do sc config %%G start= DISABLED
    
    echo Press any key to exit...
    pause >NUL & exit /b
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Thomas Dubreuil

    Thomas Dubreuil MDL Member

    Aug 29, 2017
    134
    218
    10
    #9 Thomas Dubreuil, Dec 27, 2018
    Last edited: Dec 27, 2018
    (OP)
    The optimization was intended for a single workstation (not for a computer in a network) connected in wlan...
    For file sharing you need lanman workstation on "automatic"
    ps: and maybe FDResPub (Function Discovery Resource Publication) on "manual" as well.(Function Discovery Resource Publication) fdPHost is already on "manual".

    so...to synthetize, if you need filesharing + wifi + total optimization for LTSC, download NSudo, put it next to the script and make script like this:

    Code:
    @echo off
    %windir%\system32\whoami.exe /USER | find /i "S-1-5-18" 1>nul && (
    goto :OK
    ) || (
    "%~dp0NSudo.exe" -U:T -P:E "%~dpnx0"&exit /b >NUL 2>&1
    )
    :OK
    set "AUTO=AudioEndpointBuilder,Audiosrv,BFE,BrokerInfrastructure,CoreMessagingRegistrar,CryptSvc,DcomLaunch,ddpvssvc,Dhcp,Dnscache,DPS,DusmSvc,EventLog,EventSystem,FontCache,gpsvc,IKEEXT,LSM,mpssvc,NlaSvc,nsi,Power,ProfSvc,RpcEptMapper,RpcSs,SamSs,Schedule,SENS,ShellHWDetection,sppsvc,SysMain,SystemEventsBroker,Themes,TrkWks,UserManager,UsoSvc,Wcmsvc,wfcs,WinDefend,Winmgmt,wscsvc,WSearch,WlanSvc,LanmanWorkstation"
    set "DEMAND=AppIDSvc,Appinfo,AppReadiness,AppXSvc,AssignedAccessManagerSvc,AxInstSV,BDESVC,BITS,camsvc,ClipSVC,COMSysApp,ddpsvc,defragsvc,DeviceInstall,DevQueryBroker,diagsvc,DisplayEnhancementService,DmEnrollmentSvc,dot3svc,DsmSvc,DsSvc,Eaphost,EFS,embeddedmode,EntAppSvc,fdPHost,FontCache3.0.0.0,GraphicsPerfSvc,hidserv,InstallService,jhi_service,KeyIso,KtmRm,LicenseManager,lltdsvc,LMS,LxpSvc,MSDTC,msiserver,Netman,netprofm,NetSetupSvc,NgcCtnrSvc,NgcSvc,p2pimsvc,p2psvc,perceptionsimulation,PerfHost,pla,PlugPlay,PNRPAutoReg,PNRPsvc,PolicyAgent,QWAVE,seclogon,SecurityHealthService,Sense,SentinelKeysServer,SentinelProtectionServer,SentinelSecurityRuntime,smphost,spectrum,SstpSvc,StateRepository,StorSvc,svsvc,swprv,TieringEngineService,TimeBrokerSvc,TokenBroker,TrustedInstaller,VaultSvc,vds,VSS,WaaSMedicSvc,WalletService,WarpJITSvc,wbengine,WdiServiceHost,WdiSystemHost,WdNisSvc,Wecsvc,WEPHOSTSVC,wercplsupport,wlpasvc,WManSvc,wmiApSrv,WPDBusEnum,wuauserv,cbdhsvc,DevicesFlowUserSvc,WpnUserService,FDResPub"
    set "DISABLED=AJRouter,ALG,AppMgmt,AppVClient,BTAGService,BthAvctpSvc,bthserv,CDPSvc,CertPropSvc,CscService,DeviceAssociationService,diagnosticshub.standardcollector.service,DiagTrack,dmwappushservice,DoSvc,fhsvc,FrameServer,HvHost,IAStorDataMgrSvc,icssvc,iphlpsvc,IpxlatCfgSvc,irmon,LanmanServer,lfsvc,lmhosts,MapsBroker,MSiSCSI,NaturalAuthentication,NcaSvc,NcbService,NcdAutoSetup,Netlogon,NetTcpPortSharing,PcaSvc,PeerDistSvc,PhoneSvc,PrintNotify,PushToInstall,RasAuto,RasMan,RemoteAccess,RemoteRegistry,RetailDemo,RmSvc,RpcLocator,SCardSvr,ScDeviceEnum,SCPolicySvc,SDRSVC,SEMgrSvc,SensorDataService,SensorService,SensrSvc,SessionEnv,SgrmBroker,SharedAccess,SharedRealitySvc,shpamsvc,SmsRouter,SNMPTRAP,Spooler,SSDPSRV,ssh-agent,stisvc,TabletInputService,TapiSrv,TermService,tzautoupdate,UevAgentService,UmRdpService,upnphost,VacSvc,vmicguestinterface,vmicheartbeat,vmickvpexchange,vmicrdv,vmicshutdown,vmictimesync,vmicvmsession,vmicvss,W32Time,WbioSrvc,wcncsvc,WebClient,WerSvc,WFDSConMgrSvc,WiaRpc,WinHttpAutoProxySvc,WinRM,wisvc,wlidsvc,WpcMonSvc,WpnService,WwanSvc,XblAuthManager,XblGameSave,XboxGipSvc,XboxNetApiSvc,BcastDVRUserService,BluetoothUserService,CaptureService,CDPUserSvc,ConsentUxUserSvc,DevicePickerUserSvc,MessagingService,PimIndexMaintenanceSvc,PrintWorkflowUserSvc,UnistoreSvc,UserDataSvc"
    
    for %%G in (%AUTO%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 2 /f
    for %%G in (%DEMAND%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 3 /f
    for %%G in (%DISABLED%) do reg query HKLM\SYSTEM\ControlSet001\Services\%%G /v Start 1>NUL 2>NUL && reg add HKLM\SYSTEM\ControlSet001\Services\%%G /v Start /t REG_DWORD /d 4 /f
    for %%G in (%AUTO%) do sc config %%G start= AUTO
    for %%G in (%DEMAND%) do sc config %%G start= DEMAND
    for %%G in (%DISABLED%) do sc config %%G start= DISABLED
    
    echo Press any key to exit...
    pause >NUL & exit /b
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. PsychedelicShaman

    PsychedelicShaman MDL Junior Member

    Dec 4, 2017
    86
    227
    0
    Nice work, i've been testing your scripts on clean-installed LTSC 2019 at old laptop, however i would like to report some minor issues and suggestions:
    1. Optimize_NextGen disables Background Apps in group policy, this is not good, because on 1809 disabling Background Apps breaks ALL notifications after system reboot.
    2. Similar as above, but with Microphone and Camera, since 1803 build disabling Microphone and Camera in "Privacy" settings also disables them in Win32 programs, so you won't be able to use your microphone in Team Speak, Discord and so on, better to leave them both Enabled for compatibility reasons.
    3. Option to integrate Firefox policies should be optional, for example i don't use Firefox browser so they are completely useless for me.
     
  11. l33tissw00t

    l33tissw00t MDL Addicted

    Dec 6, 2012
    748
    451
    30
    @Thomas Dubreuil link for DriversBackup is dead.

    OT: I've noticed a lot of drop.me links dying recently...
     
  12. Thomas Dubreuil

    Thomas Dubreuil MDL Member

    Aug 29, 2017
    134
    218
    10
    That's exactly the point...From the start Optimization project was intended for single workstations with heavy workload, like professional sound or 3D applications (=Machines intended for a single task type)
    That's why wlan, filesharing as well as any kind of notification are disabled. I should have first mentioned...
    I will take your recommandations though, and surely make another one for "regular users" with wlan and notification enabled.

    I already made a newer one with a "main menu" to apply things separately or reverse them if needed. I'm testing it now, I optimized services part which is way faster.
    But it's a long task, lots of hits and miss (also taking in consideration that's my first attempt to do a big script/project)

    About the "background apps", are you talking about the setting in "app privacy" as well ? because they are a lot of notifications settings, also in custom policies set for ex...
    I'd need to test anyway...Also I personally disable action center on my machine so not easy to test everything.


    all the drop.me links are dead it seems...New year present :) I will re-upload them...
    Do you guys have a favorite site for "small" uploads like this?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    8,496
    29,537
    270