Giter Club home page Giter Club logo

Comments (13)

ShadowWhisperer avatar ShadowWhisperer commented on May 18, 2024

Does running this, remove them for you?

PowerShell.exe -Command "Get-AppxPackage -allusers *MicrosoftEdge* | Remove-AppxPackage"

from remove-ms-edge.

WayneSherman avatar WayneSherman commented on May 18, 2024

Does running this, remove them for you?
PowerShell.exe -Command "Get-AppxPackage -allusers *MicrosoftEdge* | Remove-AppxPackage"

That doesn't work. But this technique will work:
https://forums.mydigitallife.net/threads/how-to-remove-take-a-test.73177/#post-1318833

from remove-ms-edge.

ShadowWhisperer avatar ShadowWhisperer commented on May 18, 2024

Try this: https://github.com/ShadowWhisperer/Internal/blob/main/App_EndOfLife.py
Verbose to show what is is finding for results.

from remove-ms-edge.

WayneSherman avatar WayneSherman commented on May 18, 2024

This line does not return anything:
Get-StartApps | Where-Object {$_.Name -like "*microsoftedge*"} | Select-Object PackageFullName
from https://github.com/ShadowWhisperer/Internal/blob/94f5746cea26976233200f34fb920c3c71f953cc/App_EndOfLife.py#L18

Why Get-StartApps and not Get-AppxPackage?
command = 'Get-AppxPackage -allusers | Where-Object {$_.Name -like "*microsoftedge*"} | Select-Object PackageFullName'

from remove-ms-edge.

ionuttbara avatar ionuttbara commented on May 18, 2024

nope. The Edge UWP (which is installed in Windows 10 1507 - 19H2 & 2xHy) it cannot be uninstalled like that.
So the edge UWP its a System Package and can be uninstalled by accessing the CBS Name of that..
The Package Name of the EdgeUWP (CBS) is
Microsoft-Windows-InternetBrowser-Package~~10.0.buildnumber.cumulativenumber.
Uninstalling this package will be remove the Edge UWP from the system including the package, and makes updating unworkable (example old version of Windows 10, Windows 10 >20H1, and Windows 11 are fine).

from remove-ms-edge.

ionuttbara avatar ionuttbara commented on May 18, 2024

After applying that , you must reboot the PC.

from remove-ms-edge.

ionuttbara avatar ionuttbara commented on May 18, 2024

i put the .bat code, to understand what i saying:
// this

for /f "tokens=8 delims=\" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" ^| findstr "Microsoft-Windows-Internet-Browser-Package" ^| findstr "~~"') do (set "edge_legacy_package_version=%%i")
if defined edge_legacy_package_version (
		echo Removing %edge_legacy_package_version%...
		reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%edge_legacy_package_version%" /v Visibility /t REG_DWORD /d 1 /f
		reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%edge_legacy_package_version%\Owners" /va /f
		dism /online /Remove-Package /PackageName:%edge_legacy_package_version%
	) else (
		echo Microsoft Edge [Legacy/UWP] not found, skipping.
	)

and the EdgeDevTools Package

for /f "tokens=8 delims=\" %%i in ('reg query "
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" ^| findstr "Microsoft-Windows-MicrosoftEdgeDevToolsClient-Package" ^| findstr "~~"') do (set "melody_package_name=%%i")
if defined melody_package_name (
		echo Removing %melody_package_name%...
		reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%melody_package_name%" /v Visibility /t REG_DWORD /d 1 /f
		reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%melody_package_name%\Owners" /va /f
		dism /online /Remove-Package /PackageName:%melody_package_name% /NoRestart
	) else (
		echo Edge DevTools UWP Not Found.
)

Again, first command it works of all versions of Windows including winodws 10, and windows 11 (to be sure, you must uninstall edge chromium).

Second command , depends the version of Windows which you ran.

from remove-ms-edge.

ionuttbara avatar ionuttbara commented on May 18, 2024

so for version 2.6 of my app i will put the c# version of commands.. to search in CBS Database of System Packages and if found to be removed.. but sometimes its not working

from remove-ms-edge.

WayneSherman avatar WayneSherman commented on May 18, 2024

No need for C#. Here is an example that uses "Remove-AppxPackage" along with some "dism" commands:
https://github.com/AveYo/fox/blob/9d5a83142fb6a2dfd77e8e7d0ac07e8a0216942f/Edge_Removal.bat#L41
(This is a cmd/powershell hybrid. When launched via cmd it executes powershell and runs itself as a powershell script.)

In my testing, the Edge UWP packages can be removed using "Remove-AppxProvisionedPackage" and "Remove-AppxPackage" (without using "dism") if the EndOfLife registry values are set for current user SID and LocalSystem SID.

from remove-ms-edge.

ShadowWhisperer avatar ShadowWhisperer commented on May 18, 2024

EndOfLife registry key has been finished and merged in with the Source and the executable.

from remove-ms-edge.

WayneSherman avatar WayneSherman commented on May 18, 2024

Tested latest EXE. Not all of the UWP apps are removed. Try something like this (powershell):

$UserSID = [string](Get-LocalUser -Name $env:USERNAME).SID.Value
$LocalSystemSID = "S-1-5-18"
$AppxEndOfLifeKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\EndOfLife"

Write-Host "Remove Edge Appx Provisioned Packages"  #Do provisioned first (fewer errors)
$EdgeApps = (Get-AppxProvisionedPackage -online) | Where-Object {$_.DisplayName -like "*microsoftedge*"}
ForEach ($App in $EdgeApps) {
  "Removing provisioned:  $($App.DisplayName)"
  New-Item "$AppxEndOfLifeKey\$UserSID\$($App.PackageName)" -Force -ErrorAction SilentlyContinue > $Null
  New-Item "$AppxEndOfLifeKey\$LocalSystemSID\$($App.PackageName)" -Force -ErrorAction SilentlyContinue > $Null
  Remove-AppxProvisionedPackage -Online -PackageName $App.PackageName
}

Write-Host "Remove Edge Appx Packages"
$EdgeApps = (Get-AppxPackage -AllUsers).PackageFullName | Where-Object {$_ -like "*microsoftedge*"}
ForEach ($App in $EdgeApps) {
  "Removing:  $App"
  New-Item "$AppxEndOfLifeKey\$UserSID\$App" -Force -ErrorAction SilentlyContinue > $Null
  New-Item "$AppxEndOfLifeKey\$LocalSystemSID\$App" -Force -ErrorAction SilentlyContinue > $Null
  Remove-AppxPackage -Package $App
  Remove-AppxPackage -Package $App -AllUsers
}

from remove-ms-edge.

 avatar commented on May 18, 2024

Tested latest EXE. Not all of the UWP apps are removed. Try something like this (powershell):

$UserSID = [string](Get-LocalUser -Name $env:USERNAME).SID.Value
$LocalSystemSID = "S-1-5-18"
$AppxEndOfLifeKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\EndOfLife"

Write-Host "Remove Edge Appx Provisioned Packages"  #Do provisioned first (fewer errors)
$EdgeApps = (Get-AppxProvisionedPackage -online) | Where-Object {$_.DisplayName -like "*microsoftedge*"}
ForEach ($App in $EdgeApps) {
  "Removing provisioned:  $($App.DisplayName)"
  New-Item "$AppxEndOfLifeKey\$UserSID\$($App.PackageName)" -Force -ErrorAction SilentlyContinue > $Null
  New-Item "$AppxEndOfLifeKey\$LocalSystemSID\$($App.PackageName)" -Force -ErrorAction SilentlyContinue > $Null
  Remove-AppxProvisionedPackage -Online -PackageName $App.PackageName
}

Write-Host "Remove Edge Appx Packages"
$EdgeApps = (Get-AppxPackage -AllUsers).PackageFullName | Where-Object {$_ -like "*microsoftedge*"}
ForEach ($App in $EdgeApps) {
  "Removing:  $App"
  New-Item "$AppxEndOfLifeKey\$UserSID\$App" -Force -ErrorAction SilentlyContinue > $Null
  New-Item "$AppxEndOfLifeKey\$LocalSystemSID\$App" -Force -ErrorAction SilentlyContinue > $Null
  Remove-AppxPackage -Package $App
  Remove-AppxPackage -Package $App -AllUsers
}

Thank you, this worked for removing Edge completely from Start Menu after running the regular script. Do you think you could implement this to also run on the script?

from remove-ms-edge.

ShadowWhisperer avatar ShadowWhisperer commented on May 18, 2024

Appx Packages support, added

from remove-ms-edge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.