check minimal OS Version
This commit is contained in:
parent
19f6c88c32
commit
4833d0e930
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user