Programme automatisch installieren nach Installation

Probleme mit der Installation von Windows 11?
Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 12.10.2023, 13:59

Hatte ihn mit tiny11 immer entfernt gehabt aber da durch deine settings keine apps mehr kommen verwende ich Tiny11 nicht mehr. Ob der Edge nun komplett weg ist oder nicht ist eigentlich egal. Denn der kommt auch irgendwann wieder von selbst wie die Outlook App.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Tante Google

Re: Programme automatisch installieren nach Installation

Beitrag von Tante Google » 12.10.2023, 13:59


Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 12.10.2023, 17:33

das mit dem Edge Icon in der Taskleiste habe ich jetzt auch mal "geklärt":
es bedarf einer Reg-Datei:

Code: Alles auswählen

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]
"Favorites"=hex:00,a4,01,00,00,3a,00,1f,80,c8,27,34,1f,10,5c,10,42,aa,03,2e,e4,\
  52,87,d6,68,26,00,01,00,26,00,ef,be,12,00,00,00,c0,6e,af,a0,90,fa,d9,01,e2,\
  29,d4,32,91,fa,d9,01,c7,3c,e7,32,91,fa,d9,01,14,00,56,00,31,00,00,00,00,00,\
  49,57,fa,49,11,00,54,61,73,6b,42,61,72,00,40,00,09,00,04,00,ef,be,49,57,fa,\
  49,49,57,fa,49,2e,00,00,00,06,cb,01,00,00,00,01,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,39,d7,46,00,54,00,61,00,73,00,6b,00,42,00,61,00,72,00,00,\
  00,16,00,12,01,32,00,97,01,00,00,a7,54,66,2a,20,00,46,49,4c,45,45,58,7e,31,\
  2e,4c,4e,4b,00,00,7c,00,09,00,04,00,ef,be,49,57,fa,49,49,57,fa,49,2e,00,00,\
  00,ce,c9,01,00,00,00,02,00,00,00,00,00,00,00,00,00,52,00,00,00,00,00,a4,13,\
  a2,00,46,00,69,00,6c,00,65,00,20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,\
  00,72,00,2e,00,6c,00,6e,00,6b,00,00,00,40,00,73,00,68,00,65,00,6c,00,6c,00,\
  33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,32,00,32,00,30,00,36,00,37,\
  00,00,00,1c,00,12,00,00,00,2b,00,ef,be,17,9f,e9,32,91,fa,d9,01,1c,00,42,00,\
  00,00,1d,00,ef,be,02,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,\
  00,2e,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,2e,00,45,00,78,00,70,00,\
  6c,00,6f,00,72,00,65,00,72,00,00,00,1c,00,26,00,00,00,1e,00,ef,be,02,00,53,\
  00,79,00,73,00,74,00,65,00,6d,00,50,00,69,00,6e,00,6e,00,65,00,64,00,00,00,\
  1c,00,00,00,ff

"FavoritesResolve"=hex:00,00,00,00
und dann noch diesen Zeilen in der Firstlogon.cmd:

Code: Alles auswählen

Echo Removing Edge Icon from Taskbar
if exist C:\windows\setup\scripts\Taskbar.reg reg import C:\windows\setup\scripts\Taskbar.reg  > NUL 2>&1
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /F > NUL 2>&1
taskkill /f /im explorer.exe > NUL 2>&1
taskkill /f /im shellexperiencehost.exe > NUL 2>&1
del %localappdata%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState* /q > NUL 2>&1
start explorer.exe
rem taskkill /F /IM explorer.exe & start explorer > NUL 2>&1
man könnte die REG-Zeilen natürlich auch in der von Scoty verwendeten "Win11_Registry-Tricks.reg"-Datei mit unterbringen.
Dann entfällt die Zeile

Code: Alles auswählen

if exist C:\windows\setup\scripts\Taskbar.reg reg import C:\windows\setup\scripts\Taskbar.reg  > NUL 2>&1
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 13.10.2023, 09:44

Was mir bei der neuen Beta auffiel. Ich bekomme keine Benachrichtigung mehr, wenn ich einen USB-Stick anschließe. Hast du das auch @Holgi? Auch beim Snipping Tool kommt, wenn ich einen Screenshot mache, keine Information mehr darüber. Weiß jetzt nicht, ob es an der Beta liegt oder an einer Einstellung durch einen deiner Tweaks.

Edit: Ja liegt daran:

reg add "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoToastApplicationNotification" /t REG_DWORD /d "1" /f > NUL 2>&1

Da muss der Wert auf 0 sein und nicht 1.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 13.10.2023, 10:37

könnte sein, dass jetzt wieder etwas anderes "aufploppt". Hatte das glaube ich wegen dem Thunderbird drin.
Hast du schon mal wieder eine neue Installation gewagt? Klappt das bei dir mit dem Edge Icon (Taskleiste)?
Ich könnte den Edge auch ganz raus-operieren (während Setup).
Was immer noch nervt:
die entfernten Store Apps erscheinen teilweise immer wieder nach einigen Neustarts.
Besonders hartnäckig:
new Outlook und jetzt auch wieder Teams mit der neuen 22631.2428
Habe jetzt noch diese Zeile mit aufgenommen:

Code: Alles auswählen

reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v "AutoDownload" /t REG_DWORD /d "2" /f > NUL 2>&1
Danach ist es etwas besser geworden.
Aber es muss noch eine andere Lösung geben.
Zuletzt geändert von Holgi am 14.10.2023, 11:52, insgesamt 1-mal geändert.
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 13.10.2023, 10:40

Ja Teams und Outlook sind extrem, alle anderen bleiben wegen aber gerade die beiden kommen immer wieder. Müssen sehr spezielle Apps sein, das MS die so pusht. Nein habe noch keine neue Installation gemacht da eh erst gestern wieder alles neu gemacht. Eventuell nächste Woche wieder oder beim nächsten Windows Update.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 20.10.2023, 09:08

Habe mir mal den VMPLayer installiert und mit neuer Beta getestet und bleibt bei AV1 sehr lange hängen, geht dann aber weiter und macht alles so weit. Edge Symbol wird am Schluss auch entfernt von der Taskleiste.

Diesen Teil habe ich vor den add Reg hinzugefügt da du nicht schriebst wo das genau hin soll aber hat ja funktioniert:

Code: Alles auswählen

Echo Removing Edge Icon from Taskbar
if exist C:\windows\setup\scripts\Taskbar.reg reg import C:\windows\setup\scripts\Taskbar.reg  > NUL 2>&1
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /F > NUL 2>&1
taskkill /f /im explorer.exe > NUL 2>&1
taskkill /f /im shellexperiencehost.exe > NUL 2>&1
del %localappdata%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState* /q > NUL 2>&1
start explorer.exe
rem taskkill /F /IM explorer.exe & start explorer > NUL 2>&1
firstlogon.cmd.txt
Screenshot 2023-10-20 090155.png
Screenshot 2023-10-20 090511.png
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 20.10.2023, 09:56

Hi @Scoty!
Das sieht ja richtig gut aus.
Prima, dass du dich endlich an das Thema virtuelle Maschine getraut hast.
War ja hier:
https://www.deskmodder.de/blog/2023/10/ ... icherheit/
heute auch schon Thema.
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 21.10.2023, 18:06

Hi @Scoty:
vlt. magst du mal meine neueste Kreation testen? Diese löscht den Edge Chromium 100% aus Windows.
Dafür habe ich ein etwas abgeändertes Script von Aveyo mit eingebaut.
Die Firstlogon braucht einen Eintrag:

Code: Alles auswählen

PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""C:\Windows\Setup\Scripts\remove_edge.ps1""' -Verb RunAs}"
siehe unten Firstlogon.cmd (fast am Ende);
und im Ordner Scripts gehört eine Remove_Edge.ps1
Firstlogon.cmd

Code: Alles auswählen

:Admin
cls
chcp 1252 >nul 
:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params= %*
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"

    exit /B

:gotAdmin
@Echo off

cls
echo Teste Internetverbindung, bitte warten...
PING -n 1 www.google.com|find "Antwort von " >NUL
IF NOT ERRORLEVEL 1 goto :SUPER
IF ERRORLEVEL 1 goto :PECH

:Super
cls
echo Internet vorhanden. Es geht weiter ...
powershell -noprofile "Start-BitsTransfer -DisplayName Microsoft.VCLibs.x64 "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
powershell -noprofile "Start-BitsTransfer -DisplayName Microsoft.DesktopAppInstaller "https://github.com/microsoft/winget-cli/releases/download/v1.6.2721/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
powershell -noprofile "Start-BitsTransfer -DisplayName Microsoft.UI.Xaml "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.x64.appx"

powershell -noprofile Add-AppxPackage ".\Microsoft.VCLibs.x64.14.00.Desktop.appx"
powershell -noprofile Add-AppxPackage ".\Microsoft.UI.Xaml.2.8.x64.appx"
powershell -noprofile Add-AppxPackage ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"

powershell Add-AppPackage -Register "'C:\Program Files\WindowsApps\*Microsoft.DesktopAppInstaller*neutral_split.language-de_8wekyb3d8bbwe\AppxManifest.xml'" -DisableDevelopmentMode

powershell -noprofile Set-WinSystemLocale -SystemLocale de-De 
powershell -noprofile Set-WinUserLanguageList de-DE -force > NUL 2>&1
powershell -noprofile Set-WinUserLanguageList -LanguageList de-DE -Force > NUL 2>&1
powershell -noprofile Set-WinHomeLocation -GeoId 94 > NUL 2>&1
powershell -noprofile Set-TimeZone -Id 'W. Europe Standard Time' > NUL 2>&1
powershell -noprofile Set-Culture -CultureInfo de-DE > NUL 2>&1
timeout /t 10 >nul
sc triggerinfo w32time start/networkon stop/networkoff > NUL 2>&1
sc config W32Time start=Auto > NUL 2>&1
w32tm /config /manualpeerlist:de.pool.ntp.org /syncfromflags:manual /reliable:yes /update > NUL 2>&1
net stop w32time > NUL 2>&1
net start w32time > NUL 2>&1
timeout /t 5 >nul
w32tm /resync /nowait > NUL 2>&1

cls
@echo off 

reg add "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoToastApplicationNotification" /t REG_DWORD /d  "1" /f > NUL 2>&1 
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.PinConsent" /v "Enabled" /t REG_DWORD /d  "0" /f > NUL 2>&1 
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.StartupApp" /v "Enabled" /t REG_DWORD /d  "0" /f > NUL 2>&1 
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d  "0" /f > NUL 2>&1 

echo installiere Apps
echo.
echo --- VC_redist.x64
winget install --id "Microsoft.VCRedist.2015+.x64" -h --accept-package-agreements --accept-source-agreements >nul
echo --- windowsdesktop-runtime
winget install --id "Microsoft.DotNet.DesktopRuntime.7" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Firefox
winget install --id "Mozilla.Firefox" -h --override "INSTALL_MAINTENANCE_SERVICE=false /quiet" >nul
echo --- Thunderbird
winget install --id "Mozilla.Thunderbird" -h --override "INSTALL_MAINTENANCE_SERVICE=false /S" --accept-source-agreements >nul
echo --- Winrar
winget install --id "RARLab.WinRAR" -h --accept-package-agreements --accept-source-agreements >nul
echo --- OnionMedia
winget install --id "9N252NJJQB65" -h --accept-package-agreements --accept-source-agreements >nul 
echo --- Windows Scanner
timeout /t 10 >nul
winget install --id "9WZDNCRFJ3PV" -h --accept-package-agreements --accept-source-agreements >nul 
echo --- iTunes
winget install --id "9PB2MZ1ZMB1S" -h --accept-package-agreements --accept-source-agreements >nul
echo --- iCloud
winget install --id "9PKTQ5699M62" -h --accept-package-agreements --accept-source-agreements >nul 
echo --- AV1 Video Extension
winget install --id "9MVZQVXJBQ9V" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Lively Weather
winget install --id "9PP0MFQFVSC5" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Notepad++
winget install --id "Notepad++.Notepad++" -h --accept-package-agreements --accept-source-agreements >nul

cls
Echo.
Echo uninstalling Crap Apps
echo.
echo --- Bing Weather
winget uninstall --id "Microsoft.BingWeather_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Bing News
winget uninstall --id "Microsoft.BingNews_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Bing Search
winget uninstall --id "Microsoft.BingSearch_8wekyb3d8bbwe" -h --accept-source-agreements > NUL 2>&1
echo --- Clipchamp
winget uninstall --id "Clipchamp.Clipchamp_yxz26nhyzhsrt" -h --accept-source-agreements >nul
echo --- Gaming App
winget uninstall --id "Microsoft.GamingApp_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Help
winget uninstall --id "Microsoft.GetHelp_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- GetStarted
winget uninstall --id "Microsoft.Getstarted_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- OfficeHub
winget uninstall --id "Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Solitaire Collection
winget uninstall --id "Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- OneDrive
winget uninstall --id "Microsoft.OneDrive" -h --accept-source-agreements >nul
echo --- People
winget uninstall --id "Microsoft.People_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- PowerAutomate
winget uninstall --id "Microsoft.PowerAutomateDesktop_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Todo
winget uninstall --id "Microsoft.Todos_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- FeedbackHub
winget uninstall --id "Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Xbox_TCUI
winget uninstall --id "Microsoft.Xbox.TCUI_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Xbox Game Overlay
winget uninstall --id "Microsoft.XboxGameOverlay_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Xbox Gaming Overlay
winget uninstall --id "Microsoft.XboxGamingOverlay_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Xbox Identity Provider
winget uninstall --id "Microsoft.XboxIdentityProvider_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Xbox SpeechtoTextOverlay
winget uninstall --id "Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- YourPhone
winget uninstall --id "Microsoft.YourPhone_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Family
winget uninstall --id "MicrosoftCorporationII.MicrosoftFamily_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- QuickAssist
winget uninstall --id "MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Cortana
winget uninstall --id "Microsoft.549981C3F5F10_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Camera
winget uninstall --id "Microsoft.WindowsCamera_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Paint
winget uninstall --id "Microsoft.Paint_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- WebExperience
winget uninstall --id "MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy" -h --accept-source-agreements >nul
echo --- Alarms
winget uninstall --id "Microsoft.WindowsAlarms_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Maps
winget uninstall --id "Microsoft.WindowsMaps_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- StickyNotes
winget uninstall --id "Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Communication
winget uninstall --id "microsoft.windowscommunicationsapps_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Feedback
winget uninstall --id "Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- ZuneMusic
winget uninstall --id "Microsoft.ZuneMusic_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- ZuneVideo
winget uninstall --id "Microsoft.ZuneVideo_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Skype
winget uninstall --id "Microsoft.SkypeApp_kzf8qxf38zg5c" -h --accept-source-agreements >nul
echo --- Office_Excel
winget uninstall --id "Microsoft.Office.Excel_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Office_Powerpoint
winget uninstall --id "Microsoft.Office.PowerPoint_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Office_Word
winget uninstall --id "Microsoft.Office.Word_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- DevHome
winget uninstall --id "Microsoft.DevHome" -h --accept-source-agreements >nul
echo --- DevHomeGitHubExtension
winget uninstall --id "Microsoft.Windows.DevHomeGitHubExtension_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Outlook for Windows
winget uninstall --id "Microsoft.OutlookForWindows_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- Teams
taskkill /im msteams.exe /f 1>nul 2>nul
winget uninstall --id "Microsoft.Teams" -h --accept-source-agreements >nul
winget uninstall --id "XP8BT8DW290MPQ" -h --accept-source-agreements >nul
winget uninstall --id "MicrosoftTeams_8wekyb3d8bbwe" -h --accept-source-agreements >nul
echo --- MSN Wetter
winget uninstall --id "9WZDNCRFJ3Q2" -h --accept-source-agreements >nul
echo --- OneDrive
winget uninstall --id "Microsoft.OneDrive" -h --accept-source-agreements >nul
echo --- Notepad
winget uninstall --id "Microsoft.WindowsNotepad_8wekyb3d8bbwe" -h --accept-source-agreements >nul

cls

:Pech
cls
@Echo off
echo --- Winrar key kopieren
copy /Y /V "%WINDIR%\Setup\Files\rarreg.key" "C:\Program Files\WinRAR" >nul
echo --- Edge Icon entfernen
if exist "%homepath%\desktop\Microsoft Edge.lnk" del "%homepath%\desktop\Microsoft Edge.lnk" /f >nul
if exist "%public%\desktop\Microsoft Edge.lnk" del "%public%\desktop\Microsoft Edge.lnk" /f >nul


reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353694Enabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353696Enabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\PushToInstall" /v "DisablePushToInstall" /t REG_DWORD /d "1" /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d "1" /f > NUL 2>&1
reg add "HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" /v "AutoDownload" /t REG_DWORD /d "2" /f > NUL 2>&1
reg add "HKCU\Software\Classes\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\SOFTWARE\Classes\WOW6432Node\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /t REG_DWORD /d "1" /f > NUL 2>&1
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f > NUL 2>&1 
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d  "0" /f > NUL 2>&1
if exist C:\windows\setup\scripts\Win11_Registry-Tricks.reg reg import C:\windows\setup\scripts\Win11_Registry-Tricks.reg  > NUL 2>&1
Echo Removing Edge Icon from Taskbar
if exist C:\windows\setup\scripts\Taskbar.reg reg import C:\windows\setup\scripts\Taskbar.reg  > NUL 2>&1
REG DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop /F > NUL 2>&1
taskkill /f /im explorer.exe > NUL 2>&1
taskkill /f /im shellexperiencehost.exe > NUL 2>&1
del %localappdata%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState* /q > NUL 2>&1
start explorer.exe
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t "REG_DWORD" /d "1" /f > NUL 2>&1
echo Removing Mozilla Maintenance Service
"C:\Program Files (x86)\Mozilla Maintenance Service\uninstall.exe" /S
echo --- WinToys
winget install --id "9P8LTPGCBZXD" -h --accept-package-agreements --accept-source-agreements >nul
copy "%Windir%\Setup\Scripts\Notepad.lnk" "%AppData%\Microsoft\Windows\SendTo\"
taskkill /f msedge.exe /f > NUL 2>&1

cls
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo 			    soll der Browser Edge Chromium aus Windows entfernt werden, drücken sie "E"
echo.
echo 			          Windows inkl. Edge Chromium installieren, drücken Sie "I"
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@CHOICE /C EI /M "Drücken Sie E für entfernen, I für installieren "
if errorlevel 2 GOTO Exit
if errorlevel 1 GOTO Delete

:Delete
PowerShell.exe -NoProfile -Command "& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""C:\Windows\Setup\Scripts\remove_edge.ps1""' -Verb RunAs}"

goto End:

:Exit
cd /d "%~dp0"
rd /q /s "%WINDIR%\Setup\Files"
cd \
(goto) 2>nul&rd /s /q "%~dp0"

exit
:End
exit
Remove_Edge.ps1:

Code: Alles auswählen

## all credits go to AveYo
## https://github.com/AveYo/fox/blob/main/Edge_Removal.bat

@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit /b
#:: just copy-paste into powershell - it's a standalone hybrid script
sp 'HKCU:\Volatile Environment' 'Edge_Removal' @'

$also_remove_webview = 1
## 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
## 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
## why also remove xsocial? because it starts webview setup every boot - xbox gamebar will still work without the social crap

$host.ui.RawUI.WindowTitle = 'Edge Removal'

$remove_appx = @("MicrosoftEdge"); $remove_win32 = @("Microsoft Edge","Microsoft Edge Update"); $skip = @() # @("DevTools")
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"}

$global:WEBV = $also_remove_webview -eq 1
$global:IS64 = [Environment]::Is64BitOperatingSystem
$global:IFEO = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
$global:EDGE_UID = '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}'
$global:WEBV_UID = '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}'
$global:UPDT_UID = '{F3C4FE00-EFD5-403B-9569-398A20F1BA4A}'
$global:PROGRAMS = ($env:ProgramFiles, ${env:ProgramFiles(x86)})[$IS64]
$global:SOFTWARE = ('SOFTWARE', 'SOFTWARE\WOW6432Node')[$IS64]
$global:ALLHIVES = 'HKCU:\SOFTWARE','HKLM:\SOFTWARE','HKCU:\SOFTWARE\Policies','HKLM:\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=de'
  $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} }
function global:rp_test_path { if (test-path $args[0]) {Microsoft.PowerShell.Management\Remove-ItemProperty @args} }
function global:ni_test_path { if (-not (test-path $args[0])) {Microsoft.PowerShell.Management\New-Item @args} }
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))}
## -------------------------------------------------------------------------------------------------------------------------------

## 3 shut down edge & webview clone stuff
cd $env:systemdrive; taskkill /im explorer.exe /f 2>&1 >''
$shut = 'explorer','Widgets','widgetservice','msedgewebview2','MicrosoftEdge*','chredge','msedge','edge'
$shut,'msteams','msfamily','WebViewHost','Clipchamp' |foreach {kill -name $_ -force -ea 0}

## clear win32 uninstall block
foreach ($name in $remove_win32) { foreach ($sw in $ALLHIVES) {
  $key = "$sw\Microsoft\Windows\CurrentVersion\Uninstall\$name"; if (-not (test-path $key)) {continue}
  foreach ($val in 'NoRemove','NoModify','NoRepair') {rp $key $val -force -ea 0}
  foreach ($val in 'ForceRemove','Delete') {sp $key $val 1 -type Dword -force}
}}
PREPARE_EDGE

## find all Edge setup.exe and gather BHO paths for OpenWebSearch / MSEdgeRedirect usage
$edges = @(); $bho = @(); $edgeupdates = @(); 'LocalApplicationData','ProgramFilesX86','ProgramFiles' |foreach {
  $folder = [Environment]::GetFolderPath($_); $bho += dir "$folder\Microsoft\Edge*\ie_to_edge_stub.exe" -rec -ea 0
  if ($WEBV) {$edges += dir "$folder\Microsoft\Edge*\setup.exe" -rec -ea 0 |where {$_ -like '*EdgeWebView*'}}
  $edges += dir "$folder\Microsoft\Edge*\setup.exe" -rec -ea 0 |where {$_ -notlike '*EdgeWebView*'}
  $edgeupdates += dir "$folder\Microsoft\EdgeUpdate\*.*.*.*\MicrosoftEdgeUpdate.exe" -rec -ea 0
}

## export OpenWebSearch innovative redirector - used by MSEdgeRedirect as well
$DIR = "$env:SystemDrive\Scripts"; mkdir $DIR -ea 0 >''
foreach ($b in $bho) { if (test-path $b) { try {copy $b "$DIR\ie_to_edge_stub.exe" -force -ea 0} catch{} } }
## -------------------------------------------------------------------------------------------------------------------------------

## 4 remove found *Edge* appx packages with unblock tricks
$provisioned = get-appxprovisionedpackage -online; $appxpackage = get-appxpackage -allusers; $eol = @()
$store = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore'
$users = @('S-1-5-18'); if (test-path $store) {$users += $((dir $store -ea 0 |where {$_ -like '*S-1-5-21*'}).PSChildName)}
foreach ($choice in $remove_appx) { if ('' -eq $choice.Trim()) {continue}
  foreach ($appx in $($provisioned |where {$_.PackageName -like "*$choice*"})) {
    $next = !1; foreach ($no in $skip) {if ($appx.PackageName -like "*$no*") {$next = !0}} ; if ($next) {continue}
    $PackageName = $appx.PackageName; $PackageFamilyName = ($appxpackage |where {$_.Name -eq $appx.DisplayName}).PackageFamilyName 
    ni "$store\Deprovisioned\$PackageFamilyName" -force >''; $PackageFamilyName  
    foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageName" -force >''} ; $eol += $PackageName
    dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
    remove-appxprovisionedpackage -packagename $PackageName -online -allusers >''
  }
  foreach ($appx in $($appxpackage |where {$_.PackageFullName -like "*$choice*"})) {
    $next = !1; foreach ($no in $skip) {if ($appx.PackageFullName -like "*$no*") {$next = !0}} ; if ($next) {continue}
    $PackageFullName = $appx.PackageFullName; 
    ni "$store\Deprovisioned\$appx.PackageFamilyName" -force >''; $PackageFullName
    foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageFullName" -force >''} ; $eol += $PackageFullName
    dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
    remove-appxpackage -package $PackageFullName -allusers >''
  }
}
## -------------------------------------------------------------------------------------------------------------------------------

## 5 run found *Edge* setup.exe with uninstall args and wait in-between
foreach ($setup in $edges) { if (-not (test-path $setup)) {continue}
  if ($setup -like '*EdgeWebView*') {$target = "--msedgewebview"} else {$target = "--msedge"}
  $sulevel = ('--system-level','--user-level')[$setup -like '*\AppData\Local\*']
  $removal = "--uninstall $target $sulevel --verbose-logging --force-uninstall"
  try {write-host $setup $removal; start -wait $setup -args $removal} catch {}
  do {sleep 3} while ((get-process -name 'setup','MicrosoftEdge*' -ea 0).Path -like '*\Microsoft\Edge*')
}
## -------------------------------------------------------------------------------------------------------------------------------

## msi installers cleanup
gp 'HKLM:\SOFTWARE\Classes\Installer\Products\*' 'ProductName' |where {$_.ProductName -like '*Microsoft Edge*'} |foreach { 
  $prod = ($_.PSChildName -split '(.{8})(.{4})(.{4})(.{4})' -join '-').trim('-')
  $sort = 7,6,5,4,3,2,1,0,8,12,11,10,9,13,17,16,15,14,18,20,19,22,21,23,25,24,27,26,29,28,31,30,33,32,35,34
  $code = '{' + -join ($sort |foreach {$prod[$_]}) + '}'; start -wait msiexec.exe -args "/X$code /qn" 2>''
  ri $_.PSPath -recurse -force
  foreach ($sw in $ALLHIVES) {ri "$sw\Microsoft\Windows\CurrentVersion\Uninstall\$code" -recurse -force}  
} 

## 6 edgeupdate graceful cleanup
if ($WEBV) {
  foreach ($sw in $ALLHIVES) {ri "$sw\Microsoft\EdgeUpdate" -recurse -force}  
  foreach ($UPDT in $edgeupdates) { 
    if (test-path $UPDT) {write-host "$UPDT /unregsvc";  start -wait $UPDT -args '/unregsvc'}
    do {sleep 3} while ((get-process -name 'setup','MicrosoftEdge*' -ea 0).Path -like '*\Microsoft\Edge*')
    if (test-path $UPDT) {write-host "$UPDT /uninstall"; start -wait $UPDT -args '/uninstall'}
    do {sleep 3} while ((get-process -name 'setup','MicrosoftEdge*' -ea 0).Path -like '*\Microsoft\Edge*')
  }
  Unregister-ScheduledTask -TaskName MicrosoftEdgeUpdate* -Confirm:$false -ea 0; ri "$PROGRAMS\Microsoft\Temp" -recurse -force
} 
$appdata = $([Environment]::GetFolderPath('ApplicationData'))
ri "$appdata\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Tombstones\Microsoft Edge.lnk" -force
ri "$appdata\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk" -force

## undo eol unblock trick to prevent latest cumulative update (LCU) failing 
foreach ($sid in $users) { foreach ($PackageName in $eol) {ri "$store\EndOfLife\$sid\$PackageName" -force >''} }

## .i. "Update policies are configured but will be ignored because this device isn't domain joined" .i.
$uids = @($EDGE_UID); $cdps = @('msedge'); if ($WEBV) {$uids += $WEBV_UID; $cdps += 'msedgewebview'} 
foreach ($sw in $ALLHIVES) {
  sp "$sw\Microsoft\EdgeUpdate" 'DoNotUpdateToEdgeWithChromium' 1 -type Dword -force
  sp "$sw\Microsoft\EdgeUpdate" 'UpdaterExperimentationAndConfigurationServiceControl' 0 -type Dword -force
  sp "$sw\Microsoft\EdgeUpdate" 'InstallDefault' 0 -type Dword -force
  foreach ($uid in $uids) {  
    sp "$sw\Microsoft\EdgeUpdate" "Install${uid}" 0 -type Dword -force
    sp "$sw\Microsoft\EdgeUpdate" "EdgePreview${uid}" 0 -type Dword -force
    sp "$sw\Microsoft\EdgeUpdate" "Update${uid}" 2 -type Dword -force
    foreach ($trigger in 'on-os-upgrade','on-logon','on-logon-autolaunch','on-logon-startup-boost') {
      sp "$sw\Microsoft\EdgeUpdate\Clients\${uid}\Commands\$trigger" 'AutoRunOnLogon' 0 -type Dword -force
      sp "$sw\Microsoft\EdgeUpdate\Clients\${uid}\Commands\$trigger" 'AutoRunOnOSUpgrade' 0 -type Dword -force
      sp "$sw\Microsoft\EdgeUpdate\Clients\${uid}\Commands\$trigger" 'Enabled' 0 -type Dword -force
    }
  }
  sp "$sw\Microsoft\MicrosoftEdge\Main" 'AllowPrelaunch' 0 -type Dword -force
  sp "$sw\Microsoft\MicrosoftEdge\TabPreloader" 'AllowTabPreloading' 0 -type Dword -force
  ## microsoft has no shame, so we are gonna insist opting-out of unsolicited reinstalls with windows updates
  foreach ($cdp in $cdps) { foreach ($arch in 'x64','x86') { foreach ($zdp in '','-zdp') {
    sp "$sw\Microsoft\EdgeUpdateDev\CdpNames" "$cdp-stable-win-$arch$zdp" "$cdp-stable-win-arm64$zdp" -force
  }}}
}
## -------------------------------------------------------------------------------------------------------------------------------

## 7 add bundled OpenWebSearch script to redirect microsoft-edge: anti-competitive links to the default browser
$MSEP = ($env:ProgramFiles,${env:ProgramFiles(x86)})[[Environment]::Is64BitOperatingSystem] + '\Microsoft\Edge\Application'
$IFEO = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
$MIN = ('--headless','--width 1 --height 1')[([environment]::OSVersion.Version.Build) -gt 25179]
$CMD = "$env:systemroot\system32\conhost.exe $MIN" # AveYo: minimize prompt - see Terminal issue #13914
ni "HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command" -force >''
sp "HKLM:\SOFTWARE\Classes\microsoft-edge" '(Default)' 'URL:microsoft-edge' -force
sp "HKLM:\SOFTWARE\Classes\microsoft-edge" 'URL Protocol' '' -force
sp "HKLM:\SOFTWARE\Classes\microsoft-edge" 'NoOpenWith' '' -force
sp "HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command" '(Default)' "`"$DIR\ie_to_edge_stub.exe`" %1" -force
ni "HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command" -force >''
sp "HKLM:\SOFTWARE\Classes\MSEdgeHTM" 'NoOpenWith' '' -force
sp "HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command" '(Default)' "`"$DIR\ie_to_edge_stub.exe`" %1" -force
ni "$IFEO\ie_to_edge_stub.exe\0" -force >''
sp "$IFEO\ie_to_edge_stub.exe" 'UseFilter' 1 -type Dword -force
sp "$IFEO\ie_to_edge_stub.exe\0" 'FilterFullPath' "$DIR\ie_to_edge_stub.exe" -force
sp "$IFEO\ie_to_edge_stub.exe\0" 'Debugger' "$CMD $DIR\OpenWebSearch.cmd" -force
ni "$IFEO\msedge.exe\0" -force >''
sp "$IFEO\msedge.exe" 'UseFilter' 1 -type Dword -force
sp "$IFEO\msedge.exe\0" 'FilterFullPath' "$MSEP\msedge.exe" -force
sp "$IFEO\msedge.exe\0" 'Debugger' "$CMD $DIR\OpenWebSearch.cmd" -force
## new: automatically re-create the needed hardlink if edge is reinstalled
$ta = New-ScheduledTaskAction -Execute '%Temp%\OpenWebSearchRepair.cmd'
$tt = New-ScheduledTaskTrigger -Once -At 00:00; $ts = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries
Register-ScheduledTask -TaskName 'OpenWebSearchRepair' -Action $ta -Trigger $tt -Settings $ts -RunLevel Highest -Force >''

$OpenWebSearch = @$
@title OpenWebSearch Redux & echo off & set ?= open start menu web search, widgets links or help in your chosen browser - by AveYo
for /f %%E in ('"prompt $E$S& for %%e in (1) do rem"') do echo;%%E[2t 2>nul & rem AveYo: minimize prompt
call :reg_var "HKCU\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice" ProgID ProgID
if /i "%ProgID%" equ "MSEdgeHTM" echo;Default browser is set to Edge! Change it or remove OpenWebSearch script. & pause & exit /b
call :reg_var "HKCR\%ProgID%\shell\open\command" "" Browser
set Choice=& for %%. in (%Browser%) do if not defined Choice set "Choice=%%~."
call :reg_var "HKCR\MSEdgeMHT\shell\open\command" "" FallBack
set "Edge=" & for %%. in (%FallBack%) do if not defined Edge set "Edge=%%~."
set "URI=" & set "URL=" & set "NOOP=" & set "PassTrough=%Edge:msedge=edge%"
set "CLI=%CMDCMDLINE:"=``% "
if defined CLI set "CLI=%CLI:*ie_to_edge_stub.exe`` =%"
if defined CLI set "CLI=%CLI:*ie_to_edge_stub.exe =%"
if defined CLI set "CLI=%CLI:*msedge.exe`` =%"
if defined CLI set "CLI=%CLI:*msedge.exe =%"
set "FIX=%CLI:~-1%"
if defined CLI if "%FIX%"==" " set "CLI=%CLI:~0,-1%"
if defined CLI set "RED=%CLI:microsoft-edge=%"
if defined CLI set "URL=%CLI:http=%"
if defined CLI set "ARG=%CLI:``="%"
if "%CLI%" equ "%RED%" (set NOOP=1) else if "%CLI%" equ "%URL%" (set NOOP=1)
if defined NOOP if not exist "%PassTrough%" echo;@mklink /h "%PassTrough%" "%Edge%" >"%Temp%\OpenWebSearchRepair.cmd"
if defined NOOP if not exist "%PassTrough%" schtasks /run /tn OpenWebSearchRepair 2>nul >nul
if defined NOOP if not exist "%PassTrough%" timeout /t 3 >nul
if defined NOOP if exist "%PassTrough%" start "" "%PassTrough%" %ARG%
if defined NOOP exit /b
set "URL=%CLI:*microsoft-edge=%"
set "URL=http%URL:*http=%"
set "FIX=%URL:~-2%"
if defined URL if "%FIX%"=="``" set "URL=%URL:~0,-2%"
call :dec_url
start "" "%Choice%" "%URL%"


:reg_var [USAGE] call :reg_var "HKCU\Volatile Environment" value-or-"" variable [extra options]
set {var}=& set {reg}=reg query "%~1" /v %2 /z /se "," /f /e& if %2=="" set {reg}=reg query "%~1" /ve /z /se "," /f /e
for /f "skip=2 tokens=* delims=" %%V in ('%{reg}% %4 %5 %6 %7 %8 %9 2^>nul') do if not defined {var} set "{var}=%%V"
if not defined {var} (set {reg}=& set "%~3="& exit /b) else if %2=="" set "{var}=%{var}:*)    =%"& rem AveYo: v3
if not defined {var} (set {reg}=& set "%~3="& exit /b) else set {reg}=& set "%~3=%{var}:*)    =%"& set {var}=& exit /b

:dec_url brute url percent decoding by AveYo
set ".=%URL:!=}%"&setlocal enabledelayedexpansion& rem brute url percent decoding
set ".=!.:%%={!" &set ".=!.:{3A=:!" &set ".=!.:{2F=/!" &set ".=!.:{3F=?!" &set ".=!.:{23=#!" &set ".=!.:{5B=[!" &set ".=!.:{5D=]!"
set ".=!.:{40=@!"&set ".=!.:{21=}!" &set ".=!.:{24=$!" &set ".=!.:{26=&!" &set ".=!.:{27='!" &set ".=!.:{28=(!" &set ".=!.:{29=)!"
set ".=!.:{2A=*!"&set ".=!.:{2B=+!" &set ".=!.:{2C=,!" &set ".=!.:{3B=;!" &set ".=!.:{3D==!" &set ".=!.:{25=%%!"&set ".=!.:{20= !"
set ".=!.:{=%%!" &rem set ",=!.:%%=!" & if "!,!" neq "!.!" endlocal& set "URL=%.:}=!%" & call :dec_url
endlocal& set "URL=%.:}=!%" & exit /b
rem done

$@
[io.file]::WriteAllText("$DIR\OpenWebSearch.cmd", $OpenWebSearch)
## -------------------------------------------------------------------------------------------------------------------------------

## 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}
cd $env:SystemRoot\Setup
Remove-item -Path "$env:SystemRoot\Setup\Scripts" -exclude Remove_Edge.ps1 -force -Confirm:$false -Recurse
Remove-item -Path "$env:SystemRoot\Setup\Files" -force -Confirm:$false -Recurse
Remove-item -Path "$env:SystemDrive\Scripts" -force -Confirm:$false -Recurse
Write-Output -InputObject 'This script will self-destruct in 5 seconds.'
 
5..1 | ForEach-Object {
    If ($_ -gt 1) {
        "$_ seconds"
    } Else {
        "$_ second"
    } # End If.
    Start-Sleep -Seconds 1
} # End ForEach-Object.
 
Write-Output -InputObject 'Self destruction.'
Remove-Item -Path $MyInvocation.MyCommand.Source -Force -Confirm:$false
exit


## -------------------------------------------------------------------------------------------------------------------------------

## 0 ask to run script as admin
'@.replace("$@","'@").replace("@$","@'") -force -ea 0; $code='gp ''Registry::HKEY_Users\S-1-5-21*\Volatile*'' Edge_Removal -ea 0'
start powershell -args "-nop -noe -c & {iex(($code)[0].Edge_Removal)}" -verb runas
$_Press_Enter
#::
bei der Firstlogon.cmd könnte man die Abfrage, ob der Edge gelöscht werden soll, natürlich auch rauslassen, wenn man das möchte.
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 21.10.2023, 18:13

Wenn ich die nächste ISO baue teste ich das gerne.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 23.10.2023, 10:05

So teste gerade die neuen Veränderungen. Werde berichten, ob es ging. Habe im VM Player jetzt statt 2 CPU auf 4 CPU und statt 4GB auf 8GB erhöht. Mal schauen ob es damit schneller geht.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 23.10.2023, 10:22

darf ich mal fragen, warum du dich für den VMWare Player und gegen Hyper-V entschieden hast?
Weil du eine Core (Home) Version von Windows einsetzt?
Würde mich mal interessieren.
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 23.10.2023, 10:24

Nein habe Windows Pro aber VM Player erschien mir einfacher. Hyper V null Plan. Im VM Player erstelle ich eine Virtuell Disk und installiere einfach.

So fertig. Beim Entfernen vom Edge gab es einen Ferhler im Script. Edge scheint dennoch weg zu sein. In der Taskleiste wird der Datei Explorer auch gelöscht, denn hätte ich aber gerne drin. Lan war auf Deutschland statt Österreich. Welcher dieser de-DE muss ich auf at-AT ändern:

powershell -noprofile Set-WinSystemLocale -SystemLocale de-De
powershell -noprofile Set-WinUserLanguageList de-DE -force > NUL 2>&1
powershell -noprofile Set-WinUserLanguageList -LanguageList de-DE -Force > NUL 2>&1
powershell -noprofile Set-WinHomeLocation -GeoId 94 > NUL 2>&1
powershell -noprofile Set-TimeZone -Id 'W. Europe Standard Time' > NUL 2>&1
powershell -noprofile Set-Culture -CultureInfo de-DE > NUL 2>&1
Screenshot 2023-10-23 102923.png
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 23.10.2023, 10:43

Österreich hat GEOID 14.
Wegen Explorer muss ich noch mal schauen.
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Benutzeravatar
Scoty
Senior
Senior
Beiträge: 480
Registriert: 26.10.2009, 15:41
Hat sich bedankt: 112 Mal
Danke erhalten: 11 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Scoty » 23.10.2023, 11:01

Wegen Explorer müsste das es wohl sein?

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /t REG_DWORD /d "1" /f > NUL 2>&1

oder
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f > NUL 2>&1

Das habe ich auch nicht bzw brauche ich nicht da ich eine solche reg nicht habe:

if exist C:\windows\setup\scripts\Taskbar.reg reg import C:\windows\setup\scripts\Taskbar.reg > NUL 2>&1
Gaming-PC: AMD 7800X3D | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G.Skill Trident Z5 RGB 32G, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Internet: Magenta | Fritz!Box 6660 Cable | 1028 Mbit/s / 53 Mbit/s |

Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2217
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 231 Mal
Danke erhalten: 309 Mal
Gender:

Re: Programme automatisch installieren nach Installation

Beitrag von Holgi » 23.10.2023, 11:47

Scoty hat geschrieben: 23.10.2023, 11:01

Code: Alles auswählen

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /t REG_DWORD /d "1" /f > NUL 2>&1
löscht den neuen Katalog aus dem Datei Explorer. Siehe hier:
https://www.deskmodder.de/wiki/index.ph ... ausblenden

oder

Code: Alles auswählen

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d  "0" /f > NUL 2>&1
entfernt Chat aus der Taskbar
Das habe ich auch nicht bzw brauche ich nicht da ich eine solche reg nicht habe:

Code: Alles auswählen

if exist C:\windows\setup\scripts\Taskbar.reg reg import C:\windows\setup\scripts\Taskbar.reg  > NUL 2>&1
stimmt! habe ich nur bei mir. Kann aber auch nicht sein, da die Reg ja nur importiert wird, wenn sie vorhanden ist (if exist ..)
Die Fehlermeldung beim Entfernen des Edge habe ich nicht. Möglicherweise liegt es an der Ausgangsbasis (Windows Version) / bearbeitete Install.wim? Ist aber auch keine "schlimme" Fehlermeldung, da sie nur besagt, dass sie eine Datei nicht entfernen kann, da sie (bereits) nicht mehr vorhanden ist.
Schön wäre es natürlich, wenn solche Fehlermeldungen gar nicht erst auftauchen. Muss mal schauen, wie man so etwas in Powershell unterdrückt.
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Antworten