Programme automatisch installieren nach Installation

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smileys
:) ;) :smile: :lol: :hihi: :D :rofl: :muahah: :( :pff: :kopfstreichel: :ohno: :betruebt: :heulen: :kopfkratz: :duckundweg: :o :? :oops: :psst: :sauer: :-P :daumenrunter: :daumen: :dankeschoen: :thx: :dafür: :gähn:
Mehr Smileys anzeigen

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smileys sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Ansicht erweitern Die letzten Beiträge des Themas: Programme automatisch installieren nach Installation

Re: Programme automatisch installieren nach Installation

von Scoty » 24.05.2024, 09:42

Es liegt vermutlich an Ventoy. Teste es mit Rufus später denn in der VM klappt es ja.

Edit mit Rufus ging es.

Re: Programme automatisch installieren nach Installation

von Holgi » 24.05.2024, 09:28

Weiß jetzt nicht, ob es was bringt, wenn man die boot.wim aus dem vorherigen (funktionsfähigen) Installationmedium nutzt.
Ansonsten müssten wohl die fehlenden Treiber per autounattend.xml bzw. DISM integriert werden:
https://learn.microsoft.com/de-de/wind ... windows-11

Re: Programme automatisch installieren nach Installation

von Scoty » 24.05.2024, 07:13

So leider gibts ein Problem. Wollte gerade die neue Windows installieren was aber nicht funktioniert weil meine Datenträger nichtg gefunden werden. In der VM lief es aber.
Screenshot 2024-05-24 071307.png
Edit: An der ISO oder Scripten liegt es nicht. Habe eine ISO genommen aus dem Windows 11 ISO ohne TPM etc Thread und da das selbe. Eventuell ein Problem mit AMD Hardware oder M2 werden nicht erkannt. Mittels Shift+F10 und dann Diskpart werden die Datenträger aber erkannt und mit dem vorigen Windows 11 23H2 läuft es ja. Treiber laden geht aber nicht da man das erst dann kann wenn die Datenträger erscheinen.

Re: Programme automatisch installieren nach Installation

von Holgi » 23.05.2024, 15:49

Scoty hat geschrieben: 23.05.2024, 14:34 beim Update Script hat der PC nicht neu gestartet aber sonst sah es super aus. Vielleicht funktioniert der Befehl beim neuen WIndows 11 nicht mehr zum rebooten:
C:\Windows\System32\cscript.exe "C:\Windows\System32\WUA.vbs" /automate /RebootToComplete
Reboot erfolgt nur, wenn die Updates es erfordern (z.B. bei kumulativ Updates). Soll aber ja wohl auch in Zukunft wegfallen, wenn ich richtig informiert bin.
Wenn du einen Reboot erzwingen möchtest, dann wie gewohnt mit

Code: Alles auswählen

shutdown -r -f -t 0

Code: Alles auswählen

winget install --id "Mozilla.Firefox" -h --override "INSTALL_MAINTENANCE_SERVICE=false /S" --accept-source-agreements
funktioniert jetzt wie beim Thunderbird.

Re: Programme automatisch installieren nach Installation

von Holgi » 23.05.2024, 15:43

schade! vlt. mal die komplette (neue) REG einstellen?

Re: Programme automatisch installieren nach Installation

von Scoty » 23.05.2024, 15:11

Kann ich nicht mehr genau sagen. Hatte einiges raus genommen.

Re: Programme automatisch installieren nach Installation

von Holgi » 23.05.2024, 15:09

Scoty hat geschrieben: 23.04.2024, 09:19 Nein ich werde das die Tage testen welcher Eintrag dafür verantwortlich sein könnte. Da es doch recht viele Einträge sind, kann das allerdings dauern.
welcher REG Eintrag war es denn nun?

Re: Programme automatisch installieren nach Installation

von Scoty » 23.05.2024, 14:34

@Holgi habe gerade mal die neue 24H2 26100.712 auf die ich nun wechseln werde getestet mit unseren Scripten und funktioniert auch da wunderbar alles. Dachte schon wegen dem neuen Setup usw könnte es da Probleme geben aber lief gut zumindest in der VM. Reale Installation mache ich dann auch gleich. Einzig beim Firefox kam die Setup Meldung und beim Update Script hat der PC nicht neu gestartet aber sonst sah es super aus. Vielleicht funktioniert der Befehl beim neuen WIndows 11 nicht mehr zum rebooten:
C:\Windows\System32\cscript.exe "C:\Windows\System32\WUA.vbs" /automate /RebootToComplete

Firefox ist ja so eingebunden:
echo --- Firefox
winget install --id "Mozilla.Firefox" -h --override "INSTALL_MAINTENANCE_SERVICE=false /quiet" >nul

Eventuell so anpassen wie beim Thunderbird?:
echo --- Thunderbird
winget install --id "Mozilla.Thunderbird" -h --override "INSTALL_MAINTENANCE_SERVICE=false /S" --accept-source-agreements >nul
Screenshot 2024-05-23 143007.png

Re: Programme automatisch installieren nach Installation

von Scoty » 23.04.2024, 09:19

Nein ich werde das die Tage testen welcher Eintrag dafür verantwortlich sein könnte. Da es doch recht viele Einträge sind, kann das allerdings dauern.

Re: Programme automatisch installieren nach Installation

von Holgi » 23.04.2024, 09:12

Und jetzt sollen wir alle raten, welcher Eintrag in der Reg genau das gewesen ist?
Vlt. ist ja mal jemand dabei, der das gerne nachvollziehen möchte und den Fehler bei den Betas vermeiden möchte.

Re: Programme automatisch installieren nach Installation

von Scoty » 23.04.2024, 06:12

So das Problem das Verknüpfungen verschwinden hatte ich eben wieder nach dem ich dem PC eingeschaltet habe. Hatte also nichts zu tun mit der Reg bezüglich Silent Mode. Muss an was anderes liegen. Ich installiere Windows und alle Symbole da nach dem das firstlogon Script fertig ist. Schalte ich jetzt Windows ab und wieder ein sind alle wieder weg bis auf das Startmneü und Explorer. Muss also was am Script sein das diese gelöscht werden.

Edit: Fehler gefunden. Es liegt an meiner Reg, die Jahrelang immer super funktioniert hatte. Offensichtlich muss einer der Einträge dieses Verhalten nun in den aktuellen Windows 11 Betas dies auslösen. Habe Windows 11 in der VM installiert und in der firstlogon durch rem vor dem eintrag verhindert das die reg installiert wird. Nach der Installation Windows beendet dann neu gestartet und siehe da alle Icons noch da gewesen.

Re: Programme automatisch installieren nach Installation

von Scoty » 22.04.2024, 12:44

Ja keine Ahnung warum der Teil 2x drin ist. Habe mal denn unteren Teil der doppelt ist rausgenommen und teste nochmals. Eventuel durch copy&paste das ich mich vertan habe. Immerhin läuft es ja zumindest teilweiße.

Edit: Fehler ist weg und alles läuft. Nur Startmenü geht erst dann wenn ich denn Explorer einmal starte aber das ist mir egal. Bin zufrieden damit.

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.7.10861/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
powershell -noprofile "Start-BitsTransfer -DisplayName Microsoft.UI.Xaml "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/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
powershell -noprofile Set-WinUserLanguageList -LanguageList de-DE -Force
powershell -noprofile Set-WinHomeLocation -GeoId 14
powershell -noprofile Set-TimeZone -Id 'W. Europe Standard Time'
powershell -noprofile Set-Culture -CultureInfo de-DE
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\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 --- 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.8" -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 --- 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 --- Spotify
winget install --id "Spotify.Spotify" -h --accept-package-agreements --accept-source-agreements >nul

cls
Echo.
Echo uninstalling Crap Apps
echo.
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 --- 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 --- 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 --- WebExperience
winget uninstall --id "MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy" -h --accept-source-agreements >nul
echo --- Maps
winget uninstall --id "Microsoft.WindowsMaps_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 --- 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 --- Widgets
winget uninstall --id "9MSSGKG348SP" -h --accept-source-agreements >nul

: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

Echo Removing Edge Icon from Taskbar
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

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t "REG_DWORD" /d "1" /f > NUL 2>&1
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\WindowsStore" /v "AutoDownload" /t REG_DWORD /d "2" /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 "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

"C:\Program Files (x86)\Mozilla Maintenance Service\uninstall.exe" /S
echo --- WinToys
winget install --id "9P8LTPGCBZXD" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Windows Scanner
winget install --id "9WZDNCRFJ3PV" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Apple-Gereate
winget install --id "9NP83LWLPZ9K" -h --accept-package-agreements --accept-source-agreements >nul
echo --- iCloud
winget install --id "9PKTQ5699M62" -h --accept-package-agreements --accept-source-agreements >nul 

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

exit
:End
exit

Re: Programme automatisch installieren nach Installation

von Holgi » 22.04.2024, 12:41

bist du sicher, dass das so gewollt ist:

Code: Alles auswählen

taskkill /f /im shellexperiencehost.exe > NUL 2>&1
del %localappdata%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState* /q > NUL 2>&1
taucht da 2X auf

Re: Programme automatisch installieren nach Installation

von Scoty » 22.04.2024, 12:33

So habe in der alten firstlogon nun die beiden einträge auch noch ergänzt die ich vergessen hatte zu überschreiben und jetzt läuft alles wieder. Einzig ein PID Fehler kam recht am schluss das die explorer.exe nicht geschlossen werden konnte. HIer also jetzt das Script was zu 99,9% lauft bis eben auf diesen PID Fehler. Das Startmenü läßt sich aber nicht öffnen. Nach dem ich den Explorer neu gestartet habe lief das Startmenü wieder.

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.7.10861/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
powershell -noprofile "Start-BitsTransfer -DisplayName Microsoft.UI.Xaml "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/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
powershell -noprofile Set-WinUserLanguageList -LanguageList de-DE -Force
powershell -noprofile Set-WinHomeLocation -GeoId 14
powershell -noprofile Set-TimeZone -Id 'W. Europe Standard Time'
powershell -noprofile Set-Culture -CultureInfo de-DE
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\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 --- 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.8" -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 --- 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 --- Spotify
winget install --id "Spotify.Spotify" -h --accept-package-agreements --accept-source-agreements >nul

cls
Echo.
Echo uninstalling Crap Apps
echo.
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 --- 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 --- 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 --- WebExperience
winget uninstall --id "MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy" -h --accept-source-agreements >nul
echo --- Maps
winget uninstall --id "Microsoft.WindowsMaps_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 --- 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 --- Widgets
winget uninstall --id "9MSSGKG348SP" -h --accept-source-agreements >nul

: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

Echo Removing Edge Icon from Taskbar
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

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t "REG_DWORD" /d "1" /f > NUL 2>&1
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\WindowsStore" /v "AutoDownload" /t REG_DWORD /d "2" /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 "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

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
taskkill /F /IM explorer.exe & start explorer > NUL 2>&1

"C:\Program Files (x86)\Mozilla Maintenance Service\uninstall.exe" /S
echo --- WinToys
winget install --id "9P8LTPGCBZXD" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Windows Scanner
winget install --id "9WZDNCRFJ3PV" -h --accept-package-agreements --accept-source-agreements >nul
echo --- Apple-Gereate
winget install --id "9NP83LWLPZ9K" -h --accept-package-agreements --accept-source-agreements >nul
echo --- iCloud
winget install --id "9PKTQ5699M62" -h --accept-package-agreements --accept-source-agreements >nul 

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

exit
:End
exit
Bild

Re: Programme automatisch installieren nach Installation

von Holgi » 22.04.2024, 12:23

sieht soweit alles gut aus.

Code: Alles auswählen

taskkill /f msedge.exe /f > NUL 2>&1
Der ist aber nicht von mir, oder?
muss lauten

Code: Alles auswählen

taskkill /im msedge.exe /f

Nach oben