Code: Alles auswählen
[Actions]
requiredWinstVersion >= "4.11.5.16"
DefVar $bitmap$
DefVar $headline$
DefVar $ExitCode$
DefVar $CurrentWindowsBuild$
DefVar $CurrentWindowsPatchlevel$
include_append "%WinstDir%\lib\section_sub_check_exitcode.opsiinc"
Set $headline$ = getValue("name", getProductMap)
Set $bitmap$ = "_logo.png"
ShowBitmap "%ScriptPath%\" + $bitmap$ $headline$
Message "installiere " + $headline$ + " %installingProdVersion%"
set $CurrentWindowsBuild$ = GetRegistryStringValueSysNative ("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion] CurrentBuild")
set $CurrentWindowsPatchlevel$ = GetRegistryStringValueSysNative ("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion] UBR")
if $CurrentWindowsBuild$ = "19041"
Comment "Windows 10 2004 found."
if $CurrentWindowsPatchlevel$ >= "388"
comment "Windows 10 2004 Cummulative Update KB4565503 or later found. 20H2 Upgrade can be applied."
DosInAnIcon_20H2Upgrade
ExitWindows /Reboot
else
LogError "Windows 10 2004 Cummulative Update KB4565503 not found. 20H2 Upgrade cannot be applied."
isFatalError
endif
else
LogError "Windows 10 2004 is needed for this upgrade."
isFatalError
endif
[DosInAnIcon_20H2Upgrade]
%Systemroot%\System32\dism.exe /online /Add-Package /PackagePath:%ScriptPath%\Setup\windows10.0-kb4562830-x64.cab /NoRestart /quiet