[Script] Win 10 Toggle Tweaker (V4.0) -Official thread-

Discussion in 'Windows 10' started by Yasser Da Silva, Aug 12, 2015.

Tags:
?

How helpful is this Windows 10 Tweaker for you !

  1. 10/10 / Very handy (Must have tweaker)

    74.6%
  2. 5/10 / It's good.

    20.7%
  3. 0/10 :( / Not helpful at all

    4.7%
  1. TONSCHUH

    TONSCHUH MDL Addicted

    Jun 11, 2012
    816
    287
    30
  2. vOzer

    vOzer MDL Novice

    Jul 26, 2015
    43
    8
    0
    Enable / disable "Start Windows 10 in Safe mode", Is this feasible? please guide me in the simplest way as the option of Toggle Tweaker, ooptional table appears at startup , I wish I could turn on / off it just with one click, a reg file or something ?!, thank you very much. Sorry for bothering you. :) (sorry I couldn't post this photo)

    i.imgur. com/3NpmQk8.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mrbbq

    mrbbq MDL Addicted

    Jul 18, 2015
    506
    272
    30
    Just want to add some thanks for this. Finding it very useful for quickly getting a basic `despy` done on new installs. Seems to work on Server/Essentials too. Kudos.
     
  4. johnye_pt

    johnye_pt MDL Addicted

    Aug 26, 2010
    741
    376
    30
    #66 johnye_pt, Aug 17, 2015
    Last edited by a moderator: Apr 20, 2017
    Just found some spare time to play with cmd line, here's an example for 3D Builder:
    Code:
    for /f "tokens=*" %a in ('reg query "HKLM\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages" /k /f "*3dbuilder*x64" ^| find "x64"') do set PackageFullName=%a
    PackageFullName=%PackageFullName:~129%
    
    The first line queries the registry for a key that includes "3DBuilder" and "x64", then saves it to PackageFullName (full key name). Note that in my Windows 10 x64, some packages are x64 and others are x86, so I'm guessing in x86 they are all x86, and in x64 they are mixed so you must first search for the x64, and if in error (not coded above), search for x86.
    The second line just cuts the "HKLM\SOFTWARE\...\Packages" and leaves only the package's full name, in my case "Microsoft.3DBuilder_10.1.9.0_x64__8wekyb3d8bbwe".
    Both commands were ran from cmd, for batch files it might require %%a instead of %a.

    Still don't know how to tell if a certain app is installed or not so you can "toggle" it from the batch.
     
  5. Yasser Da Silva

    Yasser Da Silva MDL Senior Member

    Mar 15, 2015
    499
    2,567
    30
    #68 Yasser Da Silva, Aug 17, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
  6. Yasser Da Silva

    Yasser Da Silva MDL Senior Member

    Mar 15, 2015
    499
    2,567
    30
    Waiting for you results ...
     
  7. johnye_pt

    johnye_pt MDL Addicted

    Aug 26, 2010
    741
    376
    30
    #70 johnye_pt, Aug 17, 2015
    Last edited by a moderator: Apr 20, 2017
  8. Yasser Da Silva

    Yasser Da Silva MDL Senior Member

    Mar 15, 2015
    499
    2,567
    30
    #71 Yasser Da Silva, Aug 17, 2015
    Last edited by a moderator: Apr 20, 2017
    (OP)
    can explain to me how Errorlevel work in Batch
    Or Write the Batch code for that

    =========================

    A working code to find if the app is x86 or x64

    you should change the red sections with the app information

    Examples :

    3DBuilder app (x64)

    Code:
    @Echo off
    for  /f "tokens=*" %%a in ('reg query "HKLM\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages"  /k /f "*3DBuilder*x64" ^| find "x64"') do set PackageFullName=%%a
    Set PackageFullName=%PackageFullName:~129%
    
    
    IF "%PackageFullName%"=="Microsoft.3DBuilder_10.1.9.0_x64__8wekyb3d8bbwe" (
    
    Echo x64 )
    
    
    if Not "%PackageFullName%"=="Microsoft.3DBuilder_10.1.9.0_x64__8wekyb3d8bbwe" (
    
    for  /f "tokens=*" %%a in ('reg query "HKLM\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages"  /k /f "*3DBuilder*x86" ^| find "x86"') do set PackageFullName=%%a
    Set PackageFullName=%PackageFullName:~129% 
    
    Echo x86 )
    
    pause
    



    Bing Sports app (x86)

    Code:
    @Echo off
    for /f "tokens=*" %%a in ('reg  query "HKLM\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages"  /k /f "*BingSports*x64" ^| find "x64"') do set PackageFullName=%%a
    Set PackageFullName=%PackageFullName:~129%
    
    
    IF "%PackageFullName%"=="Microsoft.BingSports_4.4.200.0_x86__8wekyb3d8bbwe" (
    
    Echo x64 )
    
    
    if Not "%PackageFullName%"=="Microsoft.BingSports_4.4.200.0_x86__8wekyb3d8bbwe" (
    
    for  /f "tokens=*" %%a in ('reg query "HKLM\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages"  /k /f "*BingSports*x86" ^| find "x86"') do set PackageFullName=%%a
    Set PackageFullName=%PackageFullName:~129% 
    
    Echo x86 )
    
    pause
    

    Note : there is only one space here : "Local Settings"
     
  9. MrTweakFreak

    MrTweakFreak MDL Junior Member

    Jul 31, 2009
    91
    13
    0
    ^^^^^^^^^^^^^

    Is there a reason why you look for both the architecture and the full package names?
    You could look for one of these instead, i.e. only architecture or only the full package name?
     
  10. Yasser Da Silva

    Yasser Da Silva MDL Senior Member

    Mar 15, 2015
    499
    2,567
    30
    in x64 : some apps are x64 and some are x86
    in x86 : all apps are x86

    what i want to do is take the app package name so i can install them or uninstall them
    BUT one app can be in x86 and x64 in different OS
    so i can't just put one line to uninstall the app because when the architecture changes thee package name may change (it depends)
    So i have to get the package name whether it is x64 or x86 and then apply the uninstall command
     
  11. johnye_pt

    johnye_pt MDL Addicted

    Aug 26, 2010
    741
    376
    30
    #74 johnye_pt, Aug 17, 2015
    Last edited: Aug 17, 2015
    Basically if a command returns ERRORLEVEL 0, it completed successfully. If it doesn't return ERRORLEVEL 0, it failed.

    For instance, if you do "DIR ABCDE" and then "ECHO %ERRORLEVEL%", it will output 1 (failed, DIR command didn't find a file named ABCDE). but if you do "DIR *.*" and then "ECHO %ERRORLEVEL%", the result is 0 (DIR command found several files). ERRORLEVEL exists both as a variable ( IF [NOT] [%ERRORLEVEL%]==[0] ) and as an internal state ( IF [NOT] ERRORLEVEL 0 ). I usually use [] on IF commands to safeguard against empty variables, for example IF [%VARIABLE%]==[STRING].

    If you want I can try to make a batch to read all removable apps and check if they're installed or uninstalled, I can test it on 2 different windows 10: x64 Pro en-us and x86 Home pt-pt. That way I'll make sure it works on x86/x64 and on different languages :D
     
  12. Yasser Da Silva

    Yasser Da Silva MDL Senior Member

    Mar 15, 2015
    499
    2,567
    30
    Thanks for the explanation....

    That would be great ........ I home you do it as fast as possible
     
  13. UnderXP

    UnderXP MDL Junior Member

    Feb 28, 2013
    55
    15
    0
    #76 UnderXP, Aug 17, 2015
    Last edited by a moderator: Apr 20, 2017
    I have disabled the next services in my home machine. Until now, I don't have any problems, only comestic notification about "Security Center Service is disabled" (I discard it).
    WARNING: playing with Windows Services is for advanced user only!!! (all users in this forum are advanced right ? :p ).
    My home setup is:
    - 2 PC only, with Windows 10 Pro x64.
    - I don't sharing any folders between PC.
    - I don't use: Superfetch, Windows geolocalization/maps services, Windows Media Player, Encrypted File System, Windows Security Center, Scanner/Cameras (aka Windows Image Adquisition, WIA), Windows Remote Management, BitLocker, Windows Search
    - I'm using Windows Update in notify mode. If you disable Windows Update, then you can disable BITS service.
    - I'm using Wifi connections. But if you don't have wifi cards, then you can disable (2) services: Wcmsvc + WlanSvc
    - I don't use Windows Firewall, but this service can't be disabled. Anyone can help here ? :g:

    45 Windows Services that can disabled:
    Code:
    rem AMD External Events Utility (only for AMD ATI cards/APU owners)
    sc config "AMD External Events Utility" start= disabled > NUL 2>&1
     
    rem AMD FUEL Service  (only for AMD ATI cards/APU owners)
    sc config "AMD FUEL Service" start= disabled > NUL 2>&1
     
    rem Application Layer Gateway Service
    sc config ALG start= disabled > NUL 2>&1
     
    rem BitLocker Drive Encryption Service
    sc config BDESVC start= disabled > NUL 2>&1
     
    rem CNG Key Isolation
    sc config KeyIso start= disabled > NUL 2>&1
     
    rem Diagnostics Tracking Service
    sc config DiagTrack start= disabled > NUL 2>&1
     
    rem Distributed Transaction Coordinator
    sc config MSDTC start= disabled > NUL 2>&1
     
    rem Encrypting File System (EFS)
    sc config EFS start= disabled > NUL 2>&1
     
    rem IKE and AuthIP IPsec Keying Modules
    sc config IKEEXT start= disabled > NUL 2>&1
     
    rem IPsec Policy Agent
    sc config PolicyAgent start= disabled > NUL 2>&1
     
    rem Offline Files
    sc config CscService start= disabled > NUL 2>&1
    
    rem Secure Socket Tunneling Protocol Service
    sc config SstpSvc start= disabled > NUL 2>&1
     
    rem Security Center
    sc config wscsvc start= disabled > NUL 2>&1
     
    rem LAN Server WARNING: Needed for Network Shared Folders !!!!!
    sc config LanmanServer start= disabled > NUL 2>&1
    
    rem LAN Browser WARNING: This service need LanManServer, disable both or none !!!!!!
    sc config Browser start= disabled > NUL 2>&1
    
    rem SSDP Discovery
    sc config SSDPSRV start= disabled > NUL 2>&1
    
    rem Superfetch
    sc config SysMain start= disabled > NUL 2>&1
    
    rem WebClient
    sc config WebClient start= disabled > NUL 2>&1
     
    rem WMPNetworkSVC helps Windows Media Player to share its library with network
    sc config WMPNetworkSvc start= disabled > NUL 2>&1
     
    rem Windows Remote Management (WS-Management)
    sc config WinRM start= disabled > NUL 2>&1
    
    rem Wise Boot Assistant
    sc config WiseBootAssistant start= disabled > NUL 2>&1
    
    rem stisvc WARNING: Needed for camera download photos and for scanners !!!!!
    sc config stisvc start= disabled > NUL 2>&1
    
    rem Windows Error Reporting
    sc config WerSvc start= disabled > NUL 2>&1
    
    rem Geolocalization and Offline Maps services
    sc config MapsBroker start= disabled > NUL 2>&1
    sc config lfsvc start= disabled > NUL 2>&1
    
    rem Windows Delivery Optimization service
    sc config DoSvc start= disabled > NUL 2>&1
    
    rem Windows Biometric service
    sc config WbioSrvc start= disabled > NUL 2>&1
    
    rem Windows Search service
    sc config WSearch start= disabled > NUL 2>&1
    
    
    rem Windows BITS WARNING: Disable ONLY  if you disable Windows Update !!!!!!
    sc config BITS start= disabled > NUL 2>&1
    
    rem Windows Wifi Services WARNING: Disable ONLY  if you don't have Wifi Cards !!!!!!
    sc config WlanSvc start= disabled > NUL 2>&1
    
    sc config Wcmsvc start= disabled > NUL 2>&1
    
    rem Windows Cryptographics Services WARNING: Don't disable this service, only on -demand star-up !!!!!!
    sc config CryptSvc start= demand> NUL 2>&1
    
    rem another services that can be disabled
    sc config dmwappushsvc start= disabled > NUL 2>&1
    sc config diagnosticshub.standardcollector.service start= disabled > NUL 2>&1
    sc config dmwappushservice start= disabled > NUL 2>&1
    sc config TrkWks start= disabled > NUL 2>&1
    sc config CertPropSvc start= disabled > NUL 2>&1
    sc config DPS start= disabled > NUL 2>&1
    sc config iphlpsvc start= disabled > NUL 2>&1
    sc config PcaSvc start= disabled > NUL 2>&1
    sc config RemoteRegistry start= disabled > NUL 2>&1
    sc config WinHttpAutoProxySvc start= disabled > NUL 2>&1
    sc config WPDBusEnum start= disabled > NUL 2>&1
    sc config AJRouter start= disabled > NUL 2>&1
    sc config XboxNetApiSvc start= disabled > NUL 2>&1
    You can add multiple perfiles for disable services. And you MUST add a section to your Windows Toggle Tweaker for re-enable services, changing "start= disabled" with "start= auto"
     
  14. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,585
    5,362
    210
    #77 lobo11, Aug 17, 2015
    Last edited by a moderator: Apr 20, 2017
    This must go down in HISTORY, do you have Win 10, Why no I have Win non 10:eek:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. UnderXP

    UnderXP MDL Junior Member

    Feb 28, 2013
    55
    15
    0
    #78 UnderXP, Aug 17, 2015
    Last edited: Aug 17, 2015
    I don't understand your post ?
     
  16. johnye_pt

    johnye_pt MDL Addicted

    Aug 26, 2010
    741
    376
    30
    #80 johnye_pt, Aug 18, 2015
    Last edited: Aug 18, 2015