Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 7 additions & 55 deletions config/tweaks.json
Original file line number Diff line number Diff line change
Expand Up @@ -1588,67 +1588,19 @@
],
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/tele"
},
"WPFTweaksDisableEdge": {
"Content": "Disable Edge",
"Description": "Prevent msedge.exe from running with explorer policies.",
"WPFTweaksRemoveEdge": {
"Content": "Remove Microsoft Edge",
"Description": "Unblocks Microsoft Edge uninstaller restrictions than uses that uninstaller to remove Microsoft Edge",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a023_",
"registry": [
{
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\DisallowRun",
"Name": "DisableEdge",
"Type": "String",
"Value": "msedge.exe",
"OriginalValue": "<RemoveEntry>"
},
{
"Path": "HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",
"Name": "DisallowRun",
"Type": "DWord",
"Value": "1",
"OriginalValue": "<RemoveEntry>"
}
],
"link": ""
},
"WPFTweaksMakeEdgeUninstallable": {
"Content": "Make Edge Uninstallable via settings",
"Description": "Makes it so you can uninstall edge via settings > installed apps",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a026_",
"registry": [
{
"Path": "HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Microsoft Edge",
"Name": "NoRemove",
"Type": "Dword",
"Value": "0",
"OriginalValue": "1"
}
],
"Order": "a028_",
"InvokeScript": [
"
$File = \"C:\\Windows\\System32\\IntegratedServicesRegionPolicySet.json\"

takeown /f $File
icacls $File /grant \"Administrators:(F)\"

$FileContent = Get-Content $File
$FileContent[7] = $FileContent[7] -replace \"disabled\", \"enabled\"
Set-Content $File $FileContent
"
"Invoke-WinUtilRemoveEdge"
],
"UndoScript": [
"
$File = \"C:\\Windows\\System32\\IntegratedServicesRegionPolicySet.json\"

takeown /f $File
icacls $File /grant \"Administrators:(F)\"

$FileContent = Get-Content $File
$FileContent[7] = $FileContent[7] -replace \"enabled\", \"disabled\"
Set-Content $File $FileContent
Write-Host 'Installing Microsoft Edge...'
winget install Microsoft.Edge --source winget
"
],
"link": ""
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Remove Microsoft Edge

# Json File
```json
"WPFTweaksRemoveEdge": {
"Content": "Remove Microsoft Edge",
"Description": "Unblocks Microsoft Edge uninstaller restrictions than uses that uninstaller to remove Microsoft Edge",
"category": "z__Advanced Tweaks - CAUTION",
"panel": "1",
"Order": "a028_",
"InvokeScript": [
"Invoke-WinUtilRemoveEdge"
],
"UndoScript": [
"
Write-Host 'Installing Microsoft Edge...'
winget install Microsoft.Edge --source winget
"
],
```
# Function
```json
function Invoke-WinUtilRemoveEdge {

$Version = (Get-AppxPackage Microsoft.MicrosoftEdge.Stable).Version
$Path = "C:\Program Files (x86)\Microsoft\Edge\Application\$Version\Installer\setup.exe"

Write-Host "Unlocking The Offical Edge Uninstaller..."

New-Item "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
Start-Process $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile'

Write-Host "Edge should now be uninstalled"
}
```
12 changes: 12 additions & 0 deletions functions/public/Invoke-WinUtilRemoveEdge.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function Invoke-WinUtilRemoveEdge {

$Version = (Get-AppxPackage Microsoft.MicrosoftEdge.Stable).Version
$Path = "C:\Program Files (x86)\Microsoft\Edge\Application\$Version\Installer\setup.exe"

Write-Host "Unlocking The Offical Edge Uninstaller..."

New-Item "C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force
Start-Process $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile'

Write-Host "Edge should now be uninstalled"
}