Edge Removal Fix

This commit is contained in:
Chris Titus 2024-08-06 15:50:36 -05:00
parent 04c84dce45
commit f38f534850
20 changed files with 67 additions and 67 deletions

View File

@ -14,7 +14,7 @@ jobs:
- name: Check if PR was merged - name: Check if PR was merged
if: github.event.pull_request.merged == true if: github.event.pull_request.merged == true
run: echo "PR was merged" run: echo "PR was merged"
- name: Extract Discussion Number & Close If any Were Found - name: Extract Discussion Number & Close If any Were Found
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -23,7 +23,7 @@ jobs:
run: | run: |
pr_body="${{ github.event.pull_request.body }}" pr_body="${{ github.event.pull_request.body }}"
discussion_ids=$(echo "$pr_body" | grep -oP '(?i)(resolve|fix|close)[s|d]? #\K[0-9]+') discussion_ids=$(echo "$pr_body" | grep -oP '(?i)(resolve|fix|close)[s|d]? #\K[0-9]+')
if [ -z "$discussion_ids" ]; then if [ -z "$discussion_ids" ]; then
echo "No discussion IDs found." echo "No discussion IDs found."
exit 0 exit 0
@ -34,7 +34,7 @@ jobs:
response=$(curl -s -o /dev/null -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \ response=$(curl -s -o /dev/null -w "%{http_code}" -X PATCH -H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "closed"}' \ -d '{"state": "closed"}' \
"https://api.github.com/repos/${{ github.repository }}/discussions/$discussion_id") "https://api.github.com/repos/${{ github.repository }}/discussions/$discussion_id")
if [ "$response" -ne 200 ]; then if [ "$response" -ne 200 ]; then
echo "Failed to close discussion #$discussion_id. HTTP status code: $response" echo "Failed to close discussion #$discussion_id. HTTP status code: $response"
exit 1 exit 1

View File

@ -45,4 +45,4 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v5 - uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: Compile Winutil commit_message: Compile Winutil
if: success() if: success()

View File

@ -114,4 +114,4 @@ jobs:
git config --global user.name 'github-actions[bot]' git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com' git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/changelog.md git add docs/changelog.md
git diff --quiet && git diff --staged --quiet || (git commit -m "Update changelog.md with all releases" && git push) git diff --quiet && git diff --staged --quiet || (git commit -m "Update changelog.md with all releases" && git push)

View File

@ -2,7 +2,7 @@ name: GitHub Pages Deploy
on: on:
release: release:
types: [published, prereleased] types: [published, prereleased]
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: write contents: write
jobs: jobs:

View File

@ -53,4 +53,4 @@ jobs:
prerelease: true prerelease: true
generate_release_notes: true generate_release_notes: true
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -2549,7 +2549,7 @@
"UndoScript": [ "UndoScript": [
" "
Write-Host \"Install Microsoft Edge\" Write-Host \"Install Microsoft Edge\"
Start-Process -FilePath winget -ArgumentList \"install -e --accept-source-agreements --accept-package-agreements --silent Microsoft.Edge \" -NoNewWindow -Wait Start-Process -FilePath winget -ArgumentList \"install --force -e --accept-source-agreements --accept-package-agreements --silent Microsoft.Edge \" -NoNewWindow -Wait
" "
] ]
}, },

View File

@ -8,7 +8,7 @@
```ps1 ```ps1
irm christitus.com/windev | iex irm christitus.com/windev | iex
``` ```
   
!!! bug "Keep in mind" !!! bug "Keep in mind"
This is a pre-release and should be treated as such. It exists for developers to test the utility and report or fix bugs before they get added to the stable release. Don't use it in production! This is a pre-release and should be treated as such. It exists for developers to test the utility and report or fix bugs before they get added to the stable release. Don't use it in production!

View File

@ -23,7 +23,7 @@ function Uninstall-Process {
# Set Nation to 84 (France) temporarily # Set Nation to 84 (France) temporarily
[microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', 68, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null [microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', 68, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null
# credits to he3als for the Acl commands # credits to he3als for the Acl commands
$fileName = "IntegratedServicesRegionPolicySet.json" $fileName = "IntegratedServicesRegionPolicySet.json"
$pathISRPS = [Environment]::SystemDirectory + "\" + $fileName $pathISRPS = [Environment]::SystemDirectory + "\" + $fileName
@ -33,19 +33,19 @@ function Uninstall-Process {
if (Test-Path -Path $pathISRPS) { if (Test-Path -Path $pathISRPS) {
try { try {
$admin = [System.Security.Principal.NTAccount]$(New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value $admin = [System.Security.Principal.NTAccount]$(New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value
$aclISRPS.SetOwner($admin) $aclISRPS.SetOwner($admin)
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admin, 'FullControl', 'Allow') $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admin, 'FullControl', 'Allow')
$aclISRPS.AddAccessRule($rule) $aclISRPS.AddAccessRule($rule)
Set-Acl -Path $pathISRPS -AclObject $aclISRPS Set-Acl -Path $pathISRPS -AclObject $aclISRPS
Rename-Item -Path $pathISRPS -NewName ($fileName + '.bak') -Force Rename-Item -Path $pathISRPS -NewName ($fileName + '.bak') -Force
} }
catch { catch {
Write-Error "[$Mode] Failed to set owner for $pathISRPS" Write-Error "[$Mode] Failed to set owner for $pathISRPS"
} }
} }
$baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate' $baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate'
$registryPath = $baseKey + '\ClientState\' + $Key $registryPath = $baseKey + '\ClientState\' + $Key
@ -84,16 +84,16 @@ function Uninstall-Process {
if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) { if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) {
Write-Host "[$Mode] Edge Stable has been successfully uninstalled" Write-Host "[$Mode] Edge Stable has been successfully uninstalled"
} }
} }
function Uninstall-Edge { function Uninstall-Edge {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
[microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null
Uninstall-Process -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}' Uninstall-Process -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}'
@( "$env:ProgramData\Microsoft\Windows\Start Menu\Programs", @( "$env:ProgramData\Microsoft\Windows\Start Menu\Programs",
"$env:PUBLIC\Desktop", "$env:PUBLIC\Desktop",
"$env:USERPROFILE\Desktop" ) | ForEach-Object { "$env:USERPROFILE\Desktop" ) | ForEach-Object {
@ -108,7 +108,7 @@ function Uninstall-Edge {
function Uninstall-WebView { function Uninstall-WebView {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
# Force to use system-wide WebView2 # Force to use system-wide WebView2
# [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", "*", "%%SystemRoot%%\System32\Microsoft-Edge-WebView") # [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", "*", "%%SystemRoot%%\System32\Microsoft-Edge-WebView")
Uninstall-Process -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' Uninstall-Process -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}'
@ -135,4 +135,4 @@ function Uninstall-EdgeUpdate {
Uninstall-Edge Uninstall-Edge
# "WebView" { Uninstall-WebView } # "WebView" { Uninstall-WebView }
# "EdgeUpdate" { Uninstall-EdgeUpdate } # "EdgeUpdate" { Uninstall-EdgeUpdate }

View File

@ -4,7 +4,7 @@ Function Invoke-WinUtilDetailedBSoD {
.SYNOPSIS .SYNOPSIS
Enables/Disables Detailed BSoD Enables/Disables Detailed BSoD
(Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'DisplayParameters').DisplayParameters (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'DisplayParameters').DisplayParameters
#> #>
Param($Enabled) Param($Enabled)

View File

@ -16,7 +16,7 @@ Function Invoke-WinUtilWingetProgram {
param( param(
[Parameter(Mandatory, Position=0)]$Programs, [Parameter(Mandatory, Position=0)]$Programs,
[Parameter(Mandatory, Position=1)] [Parameter(Mandatory, Position=1)]
[ValidateSet("Install", "Uninstall")] [ValidateSet("Install", "Uninstall")]
[String]$Action [String]$Action
@ -35,7 +35,7 @@ Function Invoke-WinUtilWingetProgram {
.PARAMETER credential .PARAMETER credential
The PSCredential Object of the user that should be used to run winget The PSCredential Object of the user that should be used to run winget
.NOTES .NOTES
Invoke Winget uses the public variable $Action defined outside the function to determine if a Program should be installed or removed Invoke Winget uses the public variable $Action defined outside the function to determine if a Program should be installed or removed
#> #>
@ -47,7 +47,7 @@ Function Invoke-WinUtilWingetProgram {
$commonArguments = "--id $wingetId --silent" $commonArguments = "--id $wingetId --silent"
$arguments = if ($Action -eq "Install") { $arguments = if ($Action -eq "Install") {
"install $commonArguments --accept-source-agreements --accept-package-agreements $(if ($scope) {" --scope $scope"})" "install $commonArguments --accept-source-agreements --accept-package-agreements $(if ($scope) {" --scope $scope"})"
} else { } else {
"uninstall $commonArguments" "uninstall $commonArguments"
} }
@ -63,15 +63,15 @@ Function Invoke-WinUtilWingetProgram {
if ($credential) { if ($credential) {
$processParams.credential = $credential $processParams.credential = $credential
} }
return (Start-Process @processParams).ExitCode return (Start-Process @processParams).ExitCode
} }
Function Invoke-Install { Function Invoke-Install {
<# <#
.SYNOPSIS .SYNOPSIS
Contains the Install Logic and return code handling from winget Contains the Install Logic and return code handling from winget
.PARAMETER Program .PARAMETER Program
The Winget ID of the Program that should be installed The Winget ID of the Program that should be installed
#> #>
@ -117,14 +117,14 @@ Function Invoke-WinUtilWingetProgram {
<# <#
.SYNOPSIS .SYNOPSIS
Contains the Uninstall Logic and return code handling from winget Contains the Uninstall Logic and return code handling from winget
.PARAMETER Program .PARAMETER Program
The Winget ID of the Program that should be uninstalled The Winget ID of the Program that should be uninstalled
#> #>
param ( param (
[psobject]$Program [psobject]$Program
) )
try { try {
$status = Invoke-Winget -wingetId $Program $status = Invoke-Winget -wingetId $Program
if ($status -eq 0) { if ($status -eq 0) {
@ -142,21 +142,21 @@ Function Invoke-WinUtilWingetProgram {
$count = $Programs.Count $count = $Programs.Count
$failedPackages = @() $failedPackages = @()
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Configuring winget packages ---" Write-Host "-- Configuring winget packages ---"
Write-Host "===========================================" Write-Host "==========================================="
for ($i = 0; $i -lt $count; $i++) { for ($i = 0; $i -lt $count; $i++) {
$Program = $Programs[$i] $Program = $Programs[$i]
$result = $false $result = $false
Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($i / $count * 100) Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($i / $count * 100)
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i / $count)}) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i / $count)})
$result = switch ($Action) { $result = switch ($Action) {
"Install" {Invoke-Install -Program $Program} "Install" {Invoke-Install -Program $Program}
"Uninstall" {Invoke-Uninstall -Program $Program} "Uninstall" {Invoke-Uninstall -Program $Program}
default {throw "[Install-WinUtilProgramWinget] Invalid action: $Action"} default {throw "[Install-WinUtilProgramWinget] Invalid action: $Action"}
} }
if (-not $result) { if (-not $result) {

View File

@ -1,12 +1,12 @@
function Set-WinUtilProgressbar{ function Set-WinUtilProgressbar{
<# <#
.SYNOPSIS .SYNOPSIS
This function is used to Update the Progress Bar displayed in the winutil GUI. This function is used to Update the Progress Bar displayed in the winutil GUI.
It will be automatically hidden if the user clicks something and no process is running It will be automatically hidden if the user clicks something and no process is running
.PARAMETER Label .PARAMETER Label
The Text to be overlayed onto the Progress Bar The Text to be overlayed onto the Progress Bar
.PARAMETER PERCENT .PARAMETER PERCENT
The percentage of the Progress Bar that should be filled (0-100) The percentage of the Progress Bar that should be filled (0-100)
.PARAMETER Hide .PARAMETER Hide
If provided, the Progress Bar and the label will be hidden If provided, the Progress Bar and the label will be hidden
#> #>
@ -17,14 +17,14 @@ function Set-WinUtilProgressbar{
$Hide $Hide
) )
if ($hide) { if ($hide) {
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Collapsed"}) $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Collapsed"})
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Collapsed"}) $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Collapsed"})
} else { } else {
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Visible"}) $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Visible"})
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Visible"}) $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Visible"})
} }
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.Text = $label}) $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.Text = $label})
$sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.ToolTip = $label}) $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.ToolTip = $label})
$sync.form.Dispatcher.Invoke([action]{ $sync.ProgressBar.Value = $percent}) $sync.form.Dispatcher.Invoke([action]{ $sync.ProgressBar.Value = $percent})
} }

View File

@ -221,7 +221,7 @@ $cttLogoPath = @"
$hyperlink.Inlines.Add($match.Groups[2].Value) $hyperlink.Inlines.Add($match.Groups[2].Value)
$hyperlink.TextDecorations = [Windows.TextDecorations]::None # Remove underline $hyperlink.TextDecorations = [Windows.TextDecorations]::None # Remove underline
$hyperlink.Foreground = $sync.configs.themes.$ctttheme.LinkForegroundColor $hyperlink.Foreground = $sync.configs.themes.$ctttheme.LinkForegroundColor
$hyperlink.Add_Click({ $hyperlink.Add_Click({
param($sender, $args) param($sender, $args)
Start-Process $sender.NavigateUri.AbsoluteUri Start-Process $sender.NavigateUri.AbsoluteUri

View File

@ -32,7 +32,7 @@ function Uninstall-Process {
# Set Nation to 84 (France) temporarily # Set Nation to 84 (France) temporarily
[microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', 68, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null [microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', 68, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null
# credits to he3als for the Acl commands # credits to he3als for the Acl commands
$fileName = "IntegratedServicesRegionPolicySet.json" $fileName = "IntegratedServicesRegionPolicySet.json"
$pathISRPS = [Environment]::SystemDirectory + "\" + $fileName $pathISRPS = [Environment]::SystemDirectory + "\" + $fileName
@ -42,19 +42,19 @@ function Uninstall-Process {
if (Test-Path -Path $pathISRPS) { if (Test-Path -Path $pathISRPS) {
try { try {
$admin = [System.Security.Principal.NTAccount]$(New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value $admin = [System.Security.Principal.NTAccount]$(New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value
$aclISRPS.SetOwner($admin) $aclISRPS.SetOwner($admin)
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admin, 'FullControl', 'Allow') $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admin, 'FullControl', 'Allow')
$aclISRPS.AddAccessRule($rule) $aclISRPS.AddAccessRule($rule)
Set-Acl -Path $pathISRPS -AclObject $aclISRPS Set-Acl -Path $pathISRPS -AclObject $aclISRPS
Rename-Item -Path $pathISRPS -NewName ($fileName + '.bak') -Force Rename-Item -Path $pathISRPS -NewName ($fileName + '.bak') -Force
} }
catch { catch {
Write-Error "[$Mode] Failed to set owner for $pathISRPS" Write-Error "[$Mode] Failed to set owner for $pathISRPS"
} }
} }
$baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate' $baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate'
$registryPath = $baseKey + '\ClientState\' + $Key $registryPath = $baseKey + '\ClientState\' + $Key
@ -93,16 +93,16 @@ function Uninstall-Process {
if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) { if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) {
Write-Host "[$Mode] Edge Stable has been successfully uninstalled" Write-Host "[$Mode] Edge Stable has been successfully uninstalled"
} }
} }
function Uninstall-Edge { function Uninstall-Edge {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
[microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null
Uninstall-Process -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}' Uninstall-Process -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}'
@( "$env:ProgramData\Microsoft\Windows\Start Menu\Programs", @( "$env:ProgramData\Microsoft\Windows\Start Menu\Programs",
"$env:PUBLIC\Desktop", "$env:PUBLIC\Desktop",
"$env:USERPROFILE\Desktop" ) | ForEach-Object { "$env:USERPROFILE\Desktop" ) | ForEach-Object {
@ -117,7 +117,7 @@ function Uninstall-Edge {
function Uninstall-WebView { function Uninstall-WebView {
Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null
# Force to use system-wide WebView2 # Force to use system-wide WebView2
# [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", "*", "%%SystemRoot%%\System32\Microsoft-Edge-WebView") # [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", "*", "%%SystemRoot%%\System32\Microsoft-Edge-WebView")
Uninstall-Process -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' Uninstall-Process -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}'
@ -149,4 +149,4 @@ Uninstall-Edge
} }

View File

@ -17,9 +17,9 @@ function Invoke-WPFButton {
if (-not $sync.ProcessRunning) { if (-not $sync.ProcessRunning) {
Set-WinUtilProgressBar -label "" -percent 0 -hide $true Set-WinUtilProgressBar -label "" -percent 0 -hide $true
} }
Switch -Wildcard ($Button) { Switch -Wildcard ($Button) {
"WPFTab?BT" {Invoke-WPFTab $Button} "WPFTab?BT" {Invoke-WPFTab $Button}
"WPFinstall" {Invoke-WPFInstall} "WPFinstall" {Invoke-WPFInstall}
"WPFuninstall" {Invoke-WPFUnInstall} "WPFuninstall" {Invoke-WPFUnInstall}

View File

@ -48,7 +48,7 @@ function Invoke-WPFInstall {
$errorPackages = @() $errorPackages = @()
if($packagesWinget.Count -gt 0) { if($packagesWinget.Count -gt 0) {
Install-WinUtilWinget Install-WinUtilWinget
$errorPackages += Invoke-WinUtilWingetProgram -Action Install -Programs $packagesWinget $errorPackages += Invoke-WinUtilWingetProgram -Action Install -Programs $packagesWinget
$errorPackages| ForEach-Object {if($_.choco -ne "na") {$packagesChoco += $_}} $errorPackages| ForEach-Object {if($_.choco -ne "na") {$packagesChoco += $_}}
} }
if($packagesChoco.Count -gt 0) { if($packagesChoco.Count -gt 0) {

View File

@ -416,11 +416,11 @@ public class PowerManagement {
} }
Write-Host "[INFO] Using oscdimg.exe from: $oscdimgPath" Write-Host "[INFO] Using oscdimg.exe from: $oscdimgPath"
$oscdimgProc = Start-Process -FilePath "$oscdimgPath" -ArgumentList "-m -o -u2 -udfver102 -bootdata:2#p0,e,b$mountDir\boot\etfsboot.com#pEF,e,b$mountDir\efi\microsoft\boot\efisys.bin `"$mountDir`" `"$($SaveDialog.FileName)`"" -Wait -PassThru -NoNewWindow $oscdimgProc = Start-Process -FilePath "$oscdimgPath" -ArgumentList "-m -o -u2 -udfver102 -bootdata:2#p0,e,b$mountDir\boot\etfsboot.com#pEF,e,b$mountDir\efi\microsoft\boot\efisys.bin `"$mountDir`" `"$($SaveDialog.FileName)`"" -Wait -PassThru -NoNewWindow
$LASTEXITCODE = $oscdimgProc.ExitCode $LASTEXITCODE = $oscdimgProc.ExitCode
Write-Host "OSCDIMG Error Level : $($oscdimgProc.ExitCode)" Write-Host "OSCDIMG Error Level : $($oscdimgProc.ExitCode)"
if ($copyToUSB) { if ($copyToUSB) {

View File

@ -36,7 +36,7 @@ function Invoke-WPFtweaksbutton {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
} }
# Execute other selected tweaks # Execute other selected tweaks
for ($i = 0; $i -lt $Tweaks.Count; $i++) { for ($i = 0; $i -lt $Tweaks.Count; $i++) {
Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($i / $Tweaks.Count * 100) Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($i / $Tweaks.Count * 100)
Invoke-WinUtilTweaks $tweaks[$i]$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$Tweaks.Count) }) Invoke-WinUtilTweaks $tweaks[$i]$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$Tweaks.Count) })

View File

@ -29,7 +29,7 @@ function Invoke-WPFundoall {
} else { } else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
} }
for ($i = 0; $i -lt $tweaks.Count; $i++) { for ($i = 0; $i -lt $tweaks.Count; $i++) {
Set-WinUtilProgressBar -Label "Undoing $($tweaks[$i])" -Percent ($i / $tweaks.Count * 100) Set-WinUtilProgressBar -Label "Undoing $($tweaks[$i])" -Percent ($i / $tweaks.Count * 100)
@ -39,7 +39,7 @@ function Invoke-WPFundoall {
Set-WinUtilProgressBar -Label "Undo Tweaks Finished" -Percent 100 Set-WinUtilProgressBar -Label "Undo Tweaks Finished" -Percent 100
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
Write-Host "==================================" Write-Host "=================================="
Write-Host "--- Undo Tweaks are Finished ---" Write-Host "--- Undo Tweaks are Finished ---"
Write-Host "==================================" Write-Host "=================================="

View File

@ -34,7 +34,7 @@ theme:
# Palette toggle for light mode # Palette toggle for light mode
- media: "(prefers-color-scheme: light)" - media: "(prefers-color-scheme: light)"
scheme: default scheme: default
toggle: toggle:

View File

@ -683,7 +683,7 @@
Maximum="100" Maximum="100"
Width="250" Width="250"
Height="{SearchBarHeight}" Height="{SearchBarHeight}"
Foreground="{ProgressBarForegroundColor}" Background="{ProgressBarBackgroundColor}" BorderBrush="{ProgressBarForegroundColor}" Foreground="{ProgressBarForegroundColor}" Background="{ProgressBarBackgroundColor}" BorderBrush="{ProgressBarForegroundColor}"
Visibility="Collapsed" Visibility="Collapsed"
VerticalAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="2,0,0,0" BorderThickness="1" Padding="6,2,2,2" Margin="2,0,0,0" BorderThickness="1" Padding="6,2,2,2"
@ -699,13 +699,13 @@
Visibility="Collapsed" Visibility="Collapsed"
Margin="2,0,0,0" BorderThickness="0" Padding="6,2,2,2" Margin="2,0,0,0" BorderThickness="0" Padding="6,2,2,2"
Name="ProgressBarLabel"> Name="ProgressBarLabel">
<TextBlock <TextBlock
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
Background="Transparent" Background="Transparent"
Foreground="{ProgressBarTextColor}"> Foreground="{ProgressBarTextColor}">
</TextBlock> </TextBlock>
</Label> </Label>
<Button Name="SettingsButton" <Button Name="SettingsButton"
Style="{StaticResource HoverButtonStyle}" Style="{StaticResource HoverButtonStyle}"
Grid.Column="2" BorderBrush="Transparent" Grid.Column="2" BorderBrush="Transparent"