Lean And Mean snippets for power users RunAsTI / reg_own / ToggleDefender / Edge removal / redirect

Discussion in 'Scripting' started by AveYo, May 7, 2021.

  1. user469

    user469 MDL Member

    Oct 23, 2015
    124
    14
    10
    #161 user469, Jun 24, 2023
    Last edited: Jun 24, 2023
    Great !!!!!!!!!! Solved my need , explorer as TrustedInstaller.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. kdchan

    kdchan MDL Novice

    Mar 17, 2020
    28
    1
    0
    Hello, the script to remove edge ghost icon is working perfecly, thank you.

    My question is, there is a script to remove system apps from the start menù too without unistalling them?

    For example, the calculator app, i want to remove the icon showing in the start menù, because to recall it i always use the "calc" command via run but i can0t do it, there is only the "unistall" option.

    So, is possible to customize the start menù to show only what i need without removing the core components? Thank you, any help is appreciated.
     
  3. Jamsmiter

    Jamsmiter MDL Novice

    Dec 16, 2022
    3
    3
    0
    Thanks AveYo :)
    Edge_Removal.bat runs well
    It can easily remove the bundled edge browser in newer windows system ,especially to the annoying remains(like Start menu icon ; Open with list ;Program management list and so on ) which were left and not easy to remove after uninstalled Edge .
    EVEN perform a windows update ,those annoying remains were not bring back !
    It's very very very useful !!!:)
     
  4. skorpion68

    skorpion68 MDL Novice

    Mar 21, 2015
    36
    76
    0
    Update for post #1

    RunAsTI.reg context menu for folders, exe, msc, bat, cmd, reg - updated 2023.07.06
    - fix arguments with quotes (issue #6)

    RunAsTI.bat with Send to right-click menu entry to launch files and folders as TI - updated 2023.07.06
    - fix arguments with quotes (issue #6)


    RunAsTI.ps1 or copy-paste function code in powershell console - updated 2023.07.06
    - fix arguments with quotes (issue #6)
     
  5. migascalp

    migascalp MDL Senior Member

    Sep 18, 2009
    367
    596
    10
    Same for ToggleDefender.bat / ToggleDefender.ps1 (post #3)
    Code:
     2023.09.05 ToggleDefender update
    
    - reworked handling of Tamper Protection will wait on a 20s loop, and open defender settings (optional, turn off at the top of the script)
    - re-added smartscreen toggling (optional, turn on at the top of the script)
    - low-level reg functions behind RegSetDwords
    - removed unnecessary ` sprinkles
     
  6. fLOW.

    fLOW. MDL Senior Member

    Jul 28, 2009
    478
    579
    10
    #166 fLOW., Sep 5, 2023
    Last edited: Sep 5, 2023
    @AveYo if you are reading this... we all miss you
     
  7. skorpion68

    skorpion68 MDL Novice

    Mar 21, 2015
    36
    76
    0
    Update for post #5

    Edge_Removal.bat
    The harder it gets pushed, the less incentive to see it. Now with OpenWebSearch innovative redirect
    Code:
    2023.08.28 Edge_Removal redux!
    - $also_remove_webview = 1 removes Widgets as well (WebExperience)
    - after removal: can enter edge or webview to reinstall them
    - after removal: firefox command uses the faster web installer
    - all registry operations via native powershell
    - run setup first, then appx removal
    - various script improvements
    
     
  8. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,370
    2,339
    60
    Update for post #5

    Edge_Removal.bat
    Code:
    2023.09.09 Edge_Removal ++
    $also_remove_webview = 1 (set to 0 to not also remove EdgeWebView2 and Widgets)
    after removal can enter into console: firefox to quickly install it, or edge and webview to reinstall them
    hybrid script, can just copy-paste into powershell
    already includes OpenWebSearch
    
    Changes from 2303.08.28
     
  9. skorpion68

    skorpion68 MDL Novice

    Mar 21, 2015
    36
    76
    0
    #169 skorpion68, Sep 14, 2023
    Last edited: Sep 14, 2023
  10. skorpion68

    skorpion68 MDL Novice

    Mar 21, 2015
    36
    76
    0
    #170 skorpion68, Sep 14, 2023
    Last edited: Sep 14, 2023
    Update for post #5

    Edge_Removal.bat
    The harder it gets pushed, the less incentive to see it. Now with OpenWebSearch innovative redirect

    OpenWebSearch 2023 improvements
    Code:
    - if edge was removed,  but then it gets installed by windows again, script will restore the needed hard-link so it can still be opened
    
    Edge_Removal: includes above, and many fixes and workarounds
    - reliable cleanup of EdgeUpdate via launch options
    - msi installers cleanup
    - insist opting-out of unsolicited reinstalls with windows updates
    - optional xsocial command to restore XboxApp Social feature (triggers webview every boot)
    Edge_Removal 2023.09.14
    Code:
    - reliable cleanup of EdgeUpdate via launch options
    - msi installers cleanup
    - optional xsocial command to restore XboxApp Social feature (triggers webview every boot)
    - insist opting-out of unsolicited reinstalls with windows updates, part II
    use arm64 trick instead of non-existing cdp_name, and skip msedgeupdate
    must use edge command after running the script if you need to reinstall it
    
     
  11. catosis

    catosis MDL Junior Member

    Apr 24, 2022
    82
    20
    0
    What's the difference in using bat, ps1 or reg on Windows 11 22H2 x64?
    I've always used .bat files, never really considered if it's superior or inferior to others.
    Same as above. Considering fresh clean install of Windows 11 22H2 x64.

    And just out of curiosity - UserChrome.js stand-alone snippet loader - what does it do, what for would it be usually used?
     
  12. skorpion68

    skorpion68 MDL Novice

    Mar 21, 2015
    36
    76
    0
    #172 skorpion68, Sep 23, 2023
    Last edited: Sep 24, 2023
    Out of pure habit I also always use the BAT files. You only need the RunAsTI.reg file if you want to use the context menu entries.

    The script UserChrome.js loads the following snippets:
     
  13. Super Spartan

    Super Spartan MDL Expert

    May 30, 2014
    1,715
    990
    60
    I am getting this error on both Windows 10 and 11 when I run the Edge Removal.BAT file:

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. OpenSourceGhost

    OpenSourceGhost MDL Member

    Feb 14, 2022
    170
    23
    10
    #174 OpenSourceGhost, Dec 4, 2023
    Last edited: Dec 4, 2023
    RunAsTI.bat doesn't always dismount correctly. Sometimes the related powershell.exe and conhost.exe processes continue to run for hours, even when RunAsTI.bat explorer windows are closed.

    In Win11 23H2, explorer.exe running as TI is broken a bit. RunAsTI.bat doesn't launch explorer.exe with Win11 23H2 new explorer tab extensions. It launches explorer without tabs. In that mode, explorer.exe back button doesn't always work and forces users to type directories manually or relaunch explorer.exe as TI again to navigate to desired directories. This doesn't happen all the time. I don't know how to reproduce it.
     
  15. verndog

    verndog MDL Member

    May 3, 2010
    214
    94
    10
    I don't get any of those messages. I have three different copies of Edge Removal dated at various times. Each run without any error message.

    Here's my info:
    Device name DESKTOP-7JG14FK
    Processor Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz 2.81 GHz
    Installed RAM 8.00 GB (7.88 GB usable)
    Device ID 56843F94-16F1-42B3-84FC-9FC86FFC3E53
    Product ID 00330-80000-00000-AA226
    System type 64-bit operating system, x64-based processor
    Pen and touch No pen or touch input is available for this display

    Edition Windows 11 Pro
    Version 23H2
    Installed on ‎9/‎23/‎2022
    OS build 22631.2715
    Experience Windows Feature Experience Pack 1000.22677.1000.0
     
  16. Vineet Garg

    Vineet Garg MDL Novice

    Aug 4, 2016
    42
    7
    0
    OS : Windows 10 22h2 Pro ( 19045.3803 )
    Issue : Want Microsoft Edge Browser & Microsoft Edge Webview2 Runtime functioning back for running Windows Subsystem For Android ( Custom ) on Windows 10.
    Originally : I Ran Edge_Removal.bat when I installed OS & now updated windows to latest to get back the two Edge functionalities. They came back with updates but not functioning. Dism Scan health , Sfc / scannow shows all well. Probably the script!
    Please help!
     
  17. Vineet Garg

    Vineet Garg MDL Novice

    Aug 4, 2016
    42
    7
    0
    And the two Edge functionalities don't work even after Repair Install!
     
  18. LittlePro

    LittlePro MDL Senior Member

    Jan 19, 2017
    388
    137
    10
    #178 LittlePro, Jan 13, 2024
    Last edited: Jan 13, 2024
    Have a look there : https://github.com/ChrisTitusTech/winutil/issues/340

    1. Simply run the NEW Edge_Removal.bat . Let it complete the removal process (it was with some errors as obvious).
    On the prompt, type the component you want to return / Install i.e. webview / edge / xsocial / firefox & press enter.
    If you want to return more than one component, Type one component at a time, press enter & other component(s) at successive prompts.

    2. Alternatively, the github link suggests a Registry change. ( Not Tried )

    ( I believe that the 1st option is more comprehensive. )

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Jamsmiter

    Jamsmiter MDL Novice

    Dec 16, 2022
    3
    3
    0
    EdgeRemoval Script runs well on living system.:)

    Is there any way to use that on a offline system ?
    I mean,how to remove Edge from a mounted Install.wim as well as like in a living system,so we can debloat the wim-file of morden-windows which has contained Edge. (such as LTSC 2021)

    Is that possible ??? :confused::confused:
     
  20. geepnozeex

    geepnozeex MDL Junior Member

    Oct 21, 2014
    77
    76
    0
    #180 geepnozeex, Jan 25, 2024
    Last edited: Apr 29, 2024
    for W11 offline image
    Code:
    Dism /Mount-Wim /WimFile:C:\WORK\install.wim /index:1 /MountDir:C:\WORK\Mount
    Dism /Image:C:\WORK\Mount /Remove-Edge
    Reg load HKLM\SSOFTWARE C:\WORK\Mount\Windows\System32\Config\SOFTWARE
    SU64 /w /s Powershell "LS HKLM:\SSOFTWARE -Rec -ea 0|?{$_.Name -Match 'edge' -and $_.Name -NotMatch 'EdgeGesture'}|RI -Rec"
    Reg unload HKLM\SSOFTWARE
    Dism /Unmount-Wim /MountDir:C:\WORK\Mount /commit
    
    SU64 = superUser64.exe