Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
rayenghanmi committed May 2, 2024
2 parents 4322cfe + fd2b9b6 commit 4e130f2
Show file tree
Hide file tree
Showing 40 changed files with 4,170 additions and 1,302 deletions.
2 changes: 0 additions & 2 deletions Activation/AppNotificationActivationHandler.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.Windows.AppLifecycle;
using Microsoft.Windows.AppNotifications;

using RyTuneX.Contracts.Services;
using RyTuneX.Helpers;
using RyTuneX.ViewModels;

namespace RyTuneX.Activation;

Expand Down
5 changes: 4 additions & 1 deletion App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ public static T GetService<T>()

public static WindowEx MainWindow { get; } = new MainWindow();

public static UIElement? AppTitlebar { get; set; }
public static UIElement? AppTitlebar
{
get; set;
}

public App()
{
Expand Down
Binary file added Assets/ExplorerBlurMica.dll
Binary file not shown.
68 changes: 62 additions & 6 deletions Assets/RemoveEdge.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$also_remove_webview = 1
$also_remove_webview = 0
## why also remove webview? because it is 2 copies of edge, not a slimmed down CEF, and is driving bloated web apps
$also_remove_widgets = 1
$also_remove_widgets = 0
## why also remove widgets? because it is a webview glorified ad portal on msn and bing news cathering to stupid people
$also_remove_xsocial = 1
$also_remove_xsocial = 0
## why also remove xsocial? because it starts webview setup every boot - xbox gamebar will still work without the social crap

write-host "Run the script again whenever you need to reinstall and update edge or webview..`n"
$remove_appx = @("MicrosoftEdge"); $remove_win32 = @("Microsoft Edge","Microsoft Edge Update"); $skip = @() # @("DevTools")
$host.ui.RawUI.WindowTitle = 'Edge Removal - RyTuneX'
$remove_appx = @("MicrosoftEdge"); $remove_win32 = @("Microsoft Edge","Microsoft Edge Update"); $skip = @("DevTools", "MicrosoftEdge")
if ($also_remove_webview -eq 1) {$remove_appx += "Win32WebViewHost"; $remove_win32 += "Microsoft EdgeWebView"}
if ($also_remove_widgets -eq 1) {$remove_appx += "WebExperience"}
if ($also_remove_xsocial -eq 1) {$remove_appx += "GamingServices"}
Expand All @@ -23,6 +23,24 @@ $global:ALLHIVES = 'HKCU:\SOFTWARE','HKLM:\SOFTWARE','HKCU:\SOFTWARE\Policies','
if ($IS64) { $global:ALLHIVES += "HKCU:\$SOFTWARE","HKLM:\$SOFTWARE","HKCU:\$SOFTWARE\Policies","HKLM:\$SOFTWARE\Policies"}
## -------------------------------------------------------------------------------------------------------------------------------

## 1 bonus! enter into powershell console: firefox / edge / webview to install a browser / reinstall edge / webview after removal
function global:firefox { $url = 'https://download.mozilla.org/?product=firefox-stub'
$setup = "$((new-object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path)\Firefox Installer.exe"
write-host $url; Invoke-WebRequest $url -OutFile $setup; start $setup
}
function global:edge { $url = 'https://go.microsoft.com/fwlink/?linkid=2108834&Channel=Stable&language=en'
$setup = "$((new-object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path)\MicrosoftEdgeSetup.exe"
write-host $url; Invoke-WebRequest $url -OutFile $setup; PREPARE_EDGE; start $setup
}
function global:webview { $url = 'https://go.microsoft.com/fwlink/p/?LinkId=2124703'
$setup = "$((new-object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path)\MicrosoftEdgeWebview2Setup.exe"
write-host $url; Invoke-WebRequest $url -OutFile $setup; PREPARE_WEBVIEW; start $setup
}
function global:xsocial { $url = 'https://dlassets-ssl.xboxlive.com/public/content/XboxInstaller/XboxInstaller.exe'
$setup = "$((new-object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path)\XboxInstaller.exe"
write-host $url; Invoke-WebRequest $url -OutFile $setup; PREPARE_WEBVIEW; start $setup
}

## helper for set-itemproperty remove-itemproperty new-item remove-item with auto test-path
function global:sp_test_path { if (test-path $args[0]) {Microsoft.PowerShell.Management\Set-ItemProperty @args} else {
Microsoft.PowerShell.Management\New-Item $args[0] -force -ea 0 >''; Microsoft.PowerShell.Management\Set-ItemProperty @args} }
Expand All @@ -31,6 +49,44 @@ function global:ni_test_path { if (-not (test-path $args[0])) {Microsoft.PowerSh
function global:ri_test_path { if (test-path $args[0]) {Microsoft.PowerShell.Management\Remove-Item @args} }
foreach ($f in 'sp','rp','ni','ri') {set-alias -Name $f -Value "${f}_test_path" -Scope Local -Option AllScope -force -ea 0}

## helper for edgeupdate reinstall
function global:PREPARE_UPDT($cdp='msedgeupdate', $uid=$UPDT_UID) {
foreach ($f in 'sp','rp','ni','ri') {set-alias -Name $f -Value "${f}_test_path" -Scope Local -Option AllScope -force -ea 0}
foreach ($sw in $ALLHIVES) {
rp "$sw\Microsoft\EdgeUpdate" 'DoNotUpdateToEdgeWithChromium' -force -ea 0
rp "$sw\Microsoft\EdgeUpdate" 'UpdaterExperimentationAndConfigurationServiceControl' -force -ea 0
rp "$sw\Microsoft\EdgeUpdate" "InstallDefault" -force -ea 0
rp "$sw\Microsoft\EdgeUpdate" "Install${uid}" -force -ea 0
rp "$sw\Microsoft\EdgeUpdate" "EdgePreview${uid}" -force -ea 0
rp "$sw\Microsoft\EdgeUpdate" "Update${uid}" -force -ea 0
rp "$sw\Microsoft\EdgeUpdate\ClientState\*" 'experiment_control_labels' -force -ea 0
ri "$sw\Microsoft\EdgeUpdate\Clients\${uid}\Commands" -recurse -force -ea 0
rp "$sw\Microsoft\EdgeUpdateDev\CdpNames" "$cdp-*" -force -ea 0
sp "$sw\Microsoft\EdgeUpdateDev" 'CanContinueWithMissingUpdate' 1 -type Dword -force
sp "$sw\Microsoft\EdgeUpdateDev" 'AllowUninstall' 1 -type Dword -force
}
}
## helper for edge reinstall - remove bundled OpenWebSearch redirector and edgeupdate policies
function global:PREPARE_EDGE {
foreach ($f in 'sp','rp','ni','ri') {set-alias -Name $f -Value "${f}_test_path" -Scope Local -Option AllScope -force -ea 0}
PREPARE_UPDT 'msedge' $EDGE_UID; PREPARE_UPDT 'msedgeupdate' $UPDT_UID
$MSEDGE = "$PROGRAMS\Microsoft\Edge\Application\msedge.exe"
ri "$IFEO\msedge.exe" -recurse -force; ri "$IFEO\ie_to_edge_stub.exe" -recurse -force
ri 'Registry::HKEY_Users\S-1-5-21*\Software\Classes\microsoft-edge' -recurse -force
sp 'HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command' '(Default)' "`"$MSEDGE`" --single-argument %%1" -force
ri 'Registry::HKEY_Users\S-1-5-21*\Software\Classes\MSEdgeHTM' -recurse -force
sp 'HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command' '(Default)' "`"$MSEDGE`" --single-argument %%1" -force
}
## helper for webview reinstall - restore webexperience (widgets) if available
function global:PREPARE_WEBVIEW {
PREPARE_UPDT 'msedgewebview' $WEBV_UID; PREPARE_UPDT 'msedgeupdate' $UPDT_UID
$cfg = @{Register=$true; ForceApplicationShutdown=$true; ForceUpdateFromAnyVersion=$true; DisableDevelopmentMode=$true}
dir "$env:SystemRoot\SystemApps\Microsoft.Win32WebViewHost*\AppxManifest.xml" -rec -ea 0 | Add-AppxPackage @cfg
dir "$env:ProgramFiles\WindowsApps\MicrosoftWindows.Client.WebExperience*\AppxManifest.xml" -rec -ea 0 | Add-AppxPackage @cfg
kill -name explorer -ea 0; if ((get-process -name 'explorer' -ea 0) -eq $null) {start explorer}
}
## -------------------------------------------------------------------------------------------------------------------------------

## 2 enable admin privileges
$D1=[uri].module.gettype('System.Diagnostics.Process')."GetM`ethods"(42) |where {$_.Name -eq 'SetPrivilege'} #`:no-ev-warn
'SeSecurityPrivilege','SeTakeOwnershipPrivilege','SeBackupPrivilege','SeRestorePrivilege'|foreach {$D1.Invoke($null, @("$_",2))}
Expand Down Expand Up @@ -229,4 +285,4 @@ rem done

## 8 done
$done = gp 'Registry::HKEY_Users\S-1-5-21*\Volatile*' Edge_Removal -ea 0; if ($done) {rp $done.PSPath Edge_Removal -force -ea 0}
if ((get-process -name 'explorer' -ea 0) -eq $null) {start explorer}
## -------------------------------------------------------------------------------------------------------------------------------
4 changes: 2 additions & 2 deletions Behaviors/NavigationViewHeaderBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ private void UpdateHeader()

if (headerMode == NavigationViewHeaderMode.Always)
{
AssociatedObject.AlwaysShowHeader = true;
}
AssociatedObject.AlwaysShowHeader = true;
}
else
{
AssociatedObject.AlwaysShowHeader = false;
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

All notable changes to this branch will be documented in this file.

## 0.8.2 - Unreleased

## Changes

- Enhanced translation consistency across Arabic, French, and Simplified Chinese.
- Updated Simplified Chinese translation thanks to @wcxu21.

## Added

- Implemented German language translation.
- Introduced new Networking section with the bility to change DNS server.
- Ability to enable Endtask option in Windows 11.
- Ability to uninstall `Microsoft Edge` (Tested on Windows 11 22H2).

## Fixes

- Fixed minor `Debloat` problems.

> [!NOTE]
> Interested in contributing to RyTuneX translations? [Learn more here](https://github.com/rayenghanmi/RyTuneX?tab=readme-ov-file#-translation).
## 0.8.1 - Released

> This is a hotfix for version 0.8.0
Expand Down
2 changes: 1 addition & 1 deletion Helpers/LogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static async Task ShowErrorMessageAndLog(Exception ex, XamlRoot xamlRoot)
{
var errorMessage = $"Caught Error: {ex.Message}";

await Log($"Error: { errorMessage}");
await Log($"Error: {errorMessage}");

await InitializeErrorMessage(errorMessage, xamlRoot);
}
Expand Down
1 change: 0 additions & 1 deletion Helpers/NavigationHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;

namespace RyTuneX.Helpers;

Expand Down
Loading

0 comments on commit 4e130f2

Please sign in to comment.