Re: Programme automatisch installieren nach Installation
Verfasst: 09.09.2024, 13:41
Das hatte ich weiter oben gefragt. Wusste halt nicht wo da es 3 Abschnitte gibt mit jeweils unterschiedlichen Optionen.
https://www.deskmodder.de/phpBB3/
Wenn ich das hinzufüge, startet das Windows Setup nicht mehr.Holgi hat geschrieben: 09.09.2024, 13:35 Warum dann aber packst du den Teil der normalerweise in der firstlogon.cmd steht nicht auch in die autounattend.xml von Schneegans. Wird ja auf der Seite (wo du auch die REG integriert hast) angeboten > run > as a cmd file
Würde dann z.B. so aussehen (letzter Abschnitt der autounattend.xml):Code: Alles auswählen
<File path="C:\Windows\Setup\Scripts\unattend-02.cmd"> 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.8.1791/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" ren Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle Microsoft.DesktopAppInstaller.msixbundle ren Microsoft.UI.Xaml.2.8.x64.appx Microsoft.UI.Xaml.x64.appx powershell -noprofile Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx powershell -noprofile Add-AppxPackage Microsoft.UI.Xaml.x64.appx powershell -noprofile Add-AppxPackage Microsoft.DesktopAppInstaller.msixbundle powershell Add-AppPackage -Register "'C:\Program Files\WindowsApps\*Microsoft.DesktopAppInstaller*neutral_split.language-de_8wekyb3d8bbwe\AppxManifest.xml'" -DisableDevelopmentMode 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" -e -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 exit </File> </Extensions> </unattend>
Das hat wunderbar funktioniert. Hat auch nicht länger gedauert wie vorher mit der firstlogon. So bin ich erst mal super Happy. Brauche so mit keinen OEM Ordner mehr eigentlich. Wird ja alles mit der auto jetzt gemacht.Holgi hat geschrieben: 09.09.2024, 10:26 das mit dem Winget sollte jetzt funktionieren mit der autounattend.
Nach demgeht es dann weiter mit dem Installieren der Apps über Winget. Z.B. so:Code: Alles auswählen
<SynchronousCommand wcm:action="add"> <Order>3</Order> <Description>Winget</Description> <CommandLine>cmd.exe /c powershell -command "$ProgressPreference = 'SilentlyContinue' ; write-host "Downloade und installiere Abhängigkeiten" ; Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile .\Microsoft.VCLibs.x64.14.00.Desktop.appx ; Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.8.6 -OutFile .\microsoft.ui.xaml.2.8.6.nupkg.zip ; Expand-Archive -Path .\microsoft.ui.xaml.2.8.6.nupkg.zip -Force ; Add-AppXPackage -Path .\microsoft.ui.xaml.2.8.6.nupkg\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.8.appx; Add-AppXPackage -Path .\Microsoft.VCLibs.x64.14.00.Desktop.appx ; write-host "Installiere Winget" ; Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.8.1911/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle ; Add-AppXPackage -Path .\MicrosoftDesktopAppInstaller_8wekyb3d8bbwe.msixbundle"</CommandLine> </SynchronousCommand>
usw. Hier dann deine Apps einsetzen.Code: Alles auswählen
<SynchronousCommand wcm:action="add"> <Order>4</Order> <Description>chrome</Description> <CommandLine>cmd /c winget install Google.Chrome --accept-package-agreements --accept-source-agreements</CommandLine> </SynchronousCommand>
Code: Alles auswählen
cmd /c copy /Y /V "%WINDIR%\Setup\Files\rarreg.key" "C:\Program Files\WinRAR"
Code: Alles auswählen
SET NEWLINE=^& echo.
@Echo off
ECHO %NEWLINE%^{>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "$schema": "https://aka.ms/winget-settings.schema.json",>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ // For documentation on these settings, see: https://aka.ms/winget-settings>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "source": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "autoUpdateIntervalInMinutes": 5 >>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ },>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "visual": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "progressBar": "rainbow">>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^},>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "experimentalFeatures": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "uninstall": true,>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "upgrade": true,>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "list": true,>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "experimentalMSStore": true>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ },>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "telemetry": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "disable": true>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^},>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "installBehavior": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "preferences": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "locale": [ "de-DE", "en-US" ]>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ }>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^},>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "installBehavior": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "preferences": {>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ "scope": "user">>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^ }>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^}>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
ECHO %NEWLINE%^}>>%localAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Mein Motto: geht nicht > gibt´s nicht!
Code: Alles auswählen
<SynchronousCommand wcm:action="add">
<Order>13</Order>
<CommandLine>cmd.exe /c "C:\Windows\Setup\Scripts\unattend-02.cmd >>"C:\Windows\Setup\Scripts\unattend-02.log" 2>&1"</CommandLine>
</SynchronousCommand>
Code: Alles auswählen
<File path="C:\Windows\Setup\Scripts\unattend-02.cmd">
del "%programfiles%\Winrar\rarreg.key" /f
@Echo off
(
ECHO RAR registration data
ECHO RarLab
ECHO Deskmodder
ECHO UID=12345678909876543212
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
ECHO a1b2c3d4e5f6g7h8i9j1k2l3m4n5o6slksuwe36gdhdhewzdhw68ee
) > "%programfiles%\Winrar\rarreg.key"
</File>
Code: Alles auswählen
) > "%programfiles%\Winrar\rarreg.key"
Code: Alles auswählen
;Entferne Verknüpfungs Pfeile
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
"29"="%Windir%\\Blank.ico"
Das ist so nicht korrekt. Das mit dem $OEM$ Ordner war ein anderer Ansatz, der hier Anfangs bis zum Exzess durchexerziert wurde. Klappte alles wunderbar.g-force hat geschrieben: 13.09.2024, 02:01 Umso weniger verstehe ich, warum $OEM$ hier so gemieden wird -
Code: Alles auswählen
;Verknüpfungspfeil entfernen
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons]
"29"="%windir%\\System32\\shell32.dll,-50"
Code: Alles auswählen
@echo off
taskkill /f /im explorer.exe
cd /d %userprofile%\AppData\Local
del IconCache.db /a
start "" "C:\Windows\explorer.exe"
Ich hab eine AiO mit Windows 10&11Holgi hat geschrieben: 26.09.2024, 17:44 vlt. liegt es nur am Namen? Die Datei heißt korrekt autounattend.xml nicht autounatend.xml.
Weiß nicht, ob @Scoty mit der WIN 24H2 26100.1876 unterwegs ist. Aber für meinen Teil kann ich sagen, dass meine mittlerweile sehr umfangreiche autounattend.xml (aufbauend auf der Schneegans) auch unter 24H2 26100.1876 sehr gut funktioniert.
Vlt. solltest du einfach mal deine autounattend.xml hier posten. Von wegen Schneekugel ...