Skip to content

Commit 8cf8318

Browse files
committed
Update removemsapp.bat
- change way of removing Windows Terminal - winget minimum version 1.9
1 parent 74cb991 commit 8cf8318

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

removemsapp.bat

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
:: V1.23
2+
:: V1.24
33

44
:: Release under the GNU GPL V3
55

@@ -15,17 +15,18 @@ Set param2=%2
1515
Set Temp2=0
1616
Set Temp1=0
1717

18-
IF /I [%param1%] EQU [noreboot] Set "Temp2=1"
19-
IF /I [%param2%] EQU [noreboot] Set "Temp2=1"
18+
IF /I [%param1%] == [noreboot] Set "Temp2=1"
19+
IF /I [%param2%] == [noreboot] Set "Temp2=1"
20+
IF /I [%param1%] == [restarted] Set "Temp1=1"
21+
IF /I [%param2%] == [restarted] Set "Temp1=1"
2022

21-
IF /I [%param1%] EQU [restarted] Set "Temp1=1"
22-
IF /I [%param2%] EQU [restarted] Set "Temp1=1"
2323

2424
cd "%~dp0"
25-
IF %Temp1% NEQ 1 (
26-
echo uninstall Terminal
27-
powershell -command "Get-AppxPackage -AllUsers -Name Microsoft.WindowsTerminal | Remove-AppxPackage -AllUsers ; Get-AppxProvisionedPackage -online | where-object PackageName -like Microsoft.WindowsTerminal | Remove-AppxProvisionedPackage -online" 2> nul
28-
IF %Temp2% EQU 1 (
25+
IF %Temp1% == 0 (
26+
echo Setup Windows Console
27+
REG add HKEY_CURRENT_USER\Console\%%%%Startup /v "DelegationConsole" /t REG_SZ /d {B23D10C0-E52E-411E-9D5B-C09FDF709C7D} /f 2> nul
28+
REG add HKEY_CURRENT_USER\Console\%%%%Startup /v "DelegationTerminal" /t REG_SZ /d {B23D10C0-E52E-411E-9D5B-C09FDF709C7D} /f 2> nul
29+
IF %Temp2% == 1 (
2930
start %~nx0 restarted noreboot
3031
exit
3132
) ELSE (
@@ -95,7 +96,7 @@ rem check if Winget is already installed
9596
FOR /F %%g IN ('winget -v') do (SET version=%%g)
9697
echo %version%
9798
SET "result=%version:~1%"
98-
SET minwingetversion=1.7
99+
SET minwingetversion=1.9
99100
if %result% LEQ %minwingetversion% (
100101
call :InstallWinget
101102
)
@@ -119,7 +120,7 @@ echo OneDrive
119120
TASKKILL /f /im OneDrive.exe 2>nul
120121
%systemroot%\System32\OneDriveSetup.exe /uninstall 2> nul
121122
%systemroot%\SysWOW64\OneDriveSetup.exe /uninstall 2> nul
122-
powershell -command "(\"Microsoft.549981C3F5F10\", \"MSTeams\", \"Microsoft.MicrosoftEdge.Stable\", \"Clipchamp.Clipchamp\", \"Microsoft.MicrosoftSolitaireCollection\", \"Microsoft.BingNews\", \"Microsoft.BingWeather\", \"Microsoft.GamingApp\", \"Microsoft.GetHelp\", \"Microsoft.Getstarted\", \"Microsoft.MicrosoftOfficeHub\", \"Microsoft.People\", \"Microsoft.PowerAutomateDesktop\", \"Microsoft.Todos\", \"Microsoft.WindowsAlarms\", \"Microsoft.WindowsCamera\", \"Microsoft.windowscommunicationsapps\", \"Microsoft.WindowsFeedbackHub\", \"Microsoft.WindowsMaps\", \"Microsoft.WindowsSoundRecorder\", \"Microsoft.Xbox.TCUI\", \"Microsoft.XboxGameOverlay\", \"Microsoft.XboxGamingOverlay\", \"Microsoft.XboxIdentityProvider\", \"Microsoft.XboxSpeechToTextOverlay\", \"Microsoft.YourPhone\", \"Microsoft.ZuneMusic\", \"Microsoft.ZuneVideo\", \"MicrosoftCorporationII.QuickAssist\", \"MicrosoftWindows.Client.WebExperience\", \"MicrosoftTeams\", \"Microsoft.LanguageExperiencePackfr-FR\", \"MicrosoftCorporationII.MicrosoftFamily\", \"Microsoft.MicrosoftStickyNotes\").ForEach{write-host $_ ; Get-AppxPackage -AllUsers -Name $_ | Remove-AppxPackage -AllUsers ; Get-AppxProvisionedPackage -online | where-object PackageName -like $_ | Remove-AppxProvisionedPackage -online}" 2> nul
123+
powershell -command "(\"Microsoft.549981C3F5F10\", \"MSTeams\", \"Microsoft.MicrosoftEdge.Stable\", \"Clipchamp.Clipchamp\", \"Microsoft.MicrosoftSolitaireCollection\", \"Microsoft.BingNews\", \"Microsoft.BingWeather\", \"Microsoft.GamingApp\", \"Microsoft.GetHelp\", \"Microsoft.Getstarted\", \"Microsoft.MicrosoftOfficeHub\", \"Microsoft.People\", \"Microsoft.PowerAutomateDesktop\", \"Microsoft.WindowsTerminal\", \"Microsoft.Todos\", \"Microsoft.WindowsAlarms\", \"Microsoft.WindowsCamera\", \"Microsoft.windowscommunicationsapps\", \"Microsoft.WindowsFeedbackHub\", \"Microsoft.WindowsMaps\", \"Microsoft.WindowsSoundRecorder\", \"Microsoft.Xbox.TCUI\", \"Microsoft.XboxGameOverlay\", \"Microsoft.XboxGamingOverlay\", \"Microsoft.XboxIdentityProvider\", \"Microsoft.XboxSpeechToTextOverlay\", \"Microsoft.YourPhone\", \"Microsoft.ZuneMusic\", \"Microsoft.ZuneVideo\", \"MicrosoftCorporationII.QuickAssist\", \"MicrosoftWindows.Client.WebExperience\", \"MicrosoftTeams\", \"Microsoft.LanguageExperiencePackfr-FR\", \"MicrosoftCorporationII.MicrosoftFamily\", \"Microsoft.MicrosoftStickyNotes\").ForEach{write-host $_ ; Get-AppxPackage -AllUsers -Name $_ | Remove-AppxPackage -AllUsers ; Get-AppxProvisionedPackage -online | where-object PackageName -like $_ | Remove-AppxProvisionedPackage -online}" 2> nul
123124

124125
:: Remove Outlook For Windows by https://github.com/matej137/OutlookRemover
125126
Echo Removing New Outlook For Windows

0 commit comments

Comments
 (0)