diff --git a/sample/All/CLIENT_DATA/setup32.opsiscript b/sample/All/CLIENT_DATA/setup32.opsiscript index 5345c16..e840890 100644 --- a/sample/All/CLIENT_DATA/setup32.opsiscript +++ b/sample/All/CLIENT_DATA/setup32.opsiscript @@ -27,6 +27,7 @@ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ DefVar $Reboot$ +DefVar $CheckOsVersion$ DefStringList $languageInfo$ set $languageInfo$ = getLocaleInfoMap @@ -45,6 +46,15 @@ Set $LogDir$ = "%opsiLogDir%" ; @@BUILDER_VARIABLES@@ +; ----------------------------------------------------- +; Minimal Supported OS (comment all other entries) +set $CheckOsVersion$ = "5.1" ; Windows XP +; set $CheckOsVersion$ = "5.2" ; Windows XP 64 +; set $CheckOsVersion$ = "6.0" ; Windows Vista +; set $CheckOsVersion$ = "6.1" ; Windows 7 +; set $CheckOsVersion$ = "6.2" ; Windows 8 +; set $CheckOsVersion$ = "6.3" ; Windows 8.1 +; set $CheckOsVersion$ = "10.0" ; Windows 10 ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- @@ -60,6 +70,12 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" +; Check Minimalen OS Version +if not(CompareDotSeparatedNumbers(GetMsVersionInfo, ">=", $CheckOsVersion$)) + LogError "This Operating System (" + GetNtVersion + " " + GetSystemType + ") is not supported by this Product (" + $ProductId$ + ")!" + isFatalError +endif + if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ isFatalError "No Space" diff --git a/sample/All/CLIENT_DATA/setup3264.opsiscript b/sample/All/CLIENT_DATA/setup3264.opsiscript index a08dfbc..9329a06 100644 --- a/sample/All/CLIENT_DATA/setup3264.opsiscript +++ b/sample/All/CLIENT_DATA/setup3264.opsiscript @@ -34,6 +34,7 @@ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ DefVar $Reboot$ +DefVar $CheckOsVersion$ Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -55,6 +56,15 @@ Set $LogDir$ = "%opsiLogDir%" ; @@BUILDER_VARIABLES@@ +; ----------------------------------------------------- +; Minimal Supported OS (comment all other entries) +set $CheckOsVersion$ = "5.1" ; Windows XP +; set $CheckOsVersion$ = "5.2" ; Windows XP 64 +; set $CheckOsVersion$ = "6.0" ; Windows Vista +; set $CheckOsVersion$ = "6.1" ; Windows 7 +; set $CheckOsVersion$ = "6.2" ; Windows 8 +; set $CheckOsVersion$ = "6.3" ; Windows 8.1 +; set $CheckOsVersion$ = "10.0" ; Windows 10 ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- @@ -71,6 +81,12 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" +; Check Minimalen OS Version +if not(CompareDotSeparatedNumbers(GetMsVersionInfo, ">=", $CheckOsVersion$)) + LogError "This Operating System (" + GetNtVersion + " " + GetSystemType + ") is not supported by this Product (" + $ProductId$ + ")!" + isFatalError +endif + if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ isFatalError diff --git a/sample/All/CLIENT_DATA/setup64.opsiscript b/sample/All/CLIENT_DATA/setup64.opsiscript index 0128823..5aadb3c 100644 --- a/sample/All/CLIENT_DATA/setup64.opsiscript +++ b/sample/All/CLIENT_DATA/setup64.opsiscript @@ -27,6 +27,7 @@ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ DefVar $Reboot$ +DefVar $CheckOsVersion$ DefStringList $languageInfo$ set $languageInfo$ = getLocaleInfoMap @@ -45,6 +46,15 @@ Set $LogDir$ = "%opsiLogDir%" ; @@BUILDER_VARIABLES@@ +; ----------------------------------------------------- +; Minimal Supported OS (comment all other entries) +set $CheckOsVersion$ = "5.1" ; Windows XP +; set $CheckOsVersion$ = "5.2" ; Windows XP 64 +; set $CheckOsVersion$ = "6.0" ; Windows Vista +; set $CheckOsVersion$ = "6.1" ; Windows 7 +; set $CheckOsVersion$ = "6.2" ; Windows 8 +; set $CheckOsVersion$ = "6.3" ; Windows 8.1 +; set $CheckOsVersion$ = "10.0" ; Windows 10 ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- @@ -60,6 +70,12 @@ Set $LicensePool$ = "p_" + $ProductId$ Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" +; Check Minimalen OS Version +if not(CompareDotSeparatedNumbers(GetMsVersionInfo, ">=", $CheckOsVersion$) AND GetSystemType = "64 bit System") + LogError "This Operating System (" + GetNtVersion + " " + GetSystemType + ") is not supported by this Product (" + $ProductId$ + ")!" + isFatalError +endif + if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ isFatalError