Re: Programme automatisch installieren nach Installation
Verfasst: 02.10.2023, 10:34
Der User Martin ist aber da, da durch die autounattend.xml ja erstellt wurde. Genauer gibt es 2x Martin, einmal als Admin und als normaler User.
https://www.deskmodder.de/phpBB3/
Hier bitte mit den 3 wieder hinzugefügt.Jens1976 hat geschrieben: 02.10.2023, 10:50 Häng das Script mit den 3 fehlerhaften Einträgen mal bitte hier an.
Code: Alles auswählen
powershell -noprofile Add-AppxPackage c:\users\Benutzername\Paketname.appx
Code: Alles auswählen
%systemdrive%\users\Benutzername\Paketname.appx
Code: Alles auswählen
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f
Code: Alles auswählen
reg add "HKLM\Software\Policies\Microsoft\PushToInstall" /v "DisablePushToInstall" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d "1" /f
reg add "HKCU\Software\Classes\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
reg add "HKCU\SOFTWARE\Classes\WOW6432Node\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "TaskbarMn" /t REG_DWORD /d "0" /f
reg import C:\windows\setup\scripts\Win11_Registry-Tricks.reg
Code: Alles auswählen
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
Code: Alles auswählen
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"
ren Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle Microsoft.DesktopAppInstaller.msixbundle
ren Microsoft.UI.Xaml.2.8.x64.appx Microsoft.UI.Xaml.x64.appx
Code: Alles auswählen
:Admin
cls
:: 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
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
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 c:\users\MARTIN\Microsoft.VCLibs.x64.14.00.Desktop.appx
powershell -noprofile Add-AppxPackage c:\users\MARTIN\Microsoft.UI.Xaml.2.8.x64.appx
powershell -noprofile Add-AppxPackage c:\users\MARTIN\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.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
echo --- OnionMedia
winget install --id "9N252NJJQB65" -h --accept-package-agreements --accept-source-agreements >nul
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 --- iTunes
winget install --id "Apple.iTunes" -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
cls
:Pech
echo --- Winrar key kopieren
copy /Y /V "%WINDIR%\Setup\Files\rarreg.key" "C:\Program Files\WinRAR"
echo --- Edge Icon entfernen
del "%homepath%\desktop\Microsoft Edge.lnk" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353694Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353696Enabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d "0" /f
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "1" /f
Reg add "HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start" /v "ConfigureStartPins" /t REG_SZ /d "{\"pinnedList\": [{}]}" /f
reg add "HKLM\Software\Policies\Microsoft\PushToInstall" /v "DisablePushToInstall" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v "DontOfferThroughWUAU" /t REG_DWORD /d "1" /f
reg import C:\windows\setup\scripts\Win11_Registry-Tricks.reg
reg add "HKCU\Software\Classes\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
reg add "HKCU\SOFTWARE\Classes\WOW6432Node\CLSID\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /t REG_DWORD /d "1" /f
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f
taskkill /F /IM explorer.exe & start explorer
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t "REG_DWORD" /d "1" /f
timeout /t 5
cd /d "%~dp0"
rd /q /s "%WINDIR%\Setup\Files"
cd \
(goto) 2>nul&rd /s /q "%~dp0"
shutdown /r /t 5
exit
Code: Alles auswählen
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f
Code: Alles auswählen
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"
Code: Alles auswählen
$repo = "microsoft/microsoft-ui-xaml"
$file = "Microsoft.UI.Xaml.2.8.x64.appx"
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
$download = "https://github.com/$repo/releases/download/$tag/$file"
$name = $file.Split(".")[0]
$appx = "Microsoft.UI.Xaml.2.8.x64.appx"
$dir = "$name-$tag"
Write-Host Dowloading latest release
Invoke-WebRequest $download -Out $appx
$repo = "microsoft/winget-cli"
$file = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$tag = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].tag_name
$download = "https://github.com/$repo/releases/download/$tag/$file"
$name = $file.Split(".")[0]
$msixbundle = "Microsoft.DesktopAppInstaller.msixbundle"
$dir = "$name-$tag"
Write-Host Dowloading latest release
Invoke-WebRequest $download -Out $msixbundle
Sorry, da unten hab ich nix korrigiert, mir gings erstmal dadrum, das obere Problem zu lösen. Nein, das läuft so nicht, die Pfade müssen angepasst werden...Holgi hat geschrieben: 02.10.2023, 13:03 @Jens1976
da sind sie wieder:Dat löppt so nicht, oder?Code: Alles auswählen
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f