@@ -328,6 +328,24 @@ Function isNightly(strng)
328328 Exit Function
329329End Function
330330
331+ ' Major version 1 and Minor version greater than 7 doesn't support x86
332+ Function doesNotSupportX86(strng)
333+ Dim regEx, matches, major, minor
334+ Set regEx = New RegExp
335+ regEx.Global = true
336+ regEx.Pattern = "^([0-9]+)\.([0-9]+)"
337+ Set matches = regEx.Execute(strng)
338+ doesNotSupportX86 = False
339+ If matches.count > 0 Then
340+ major = matches( 0 ).SubMatches( 0 )
341+ minor = matches( 0 ).SubMatches( 1 )
342+ If major = 1 And minor > 7 Then
343+ doesNotSupportX86 = True
344+ End If
345+ End If
346+ Exit Function
347+ End Function
348+
331349Function IsInstallationNeeded(strSetupVersion, strSetupArchitecture, strSystemArchitecture)
332350 Dim strCurrentSetupVersion
333351 ' Compare the current version, whether it exists, with strSetupVersion
@@ -577,6 +595,14 @@ If (strSystemArchitecture = "x86") And (SetupArchitecture = "x64") Then
577595 WScript.Quit 3
578596End If
579597
598+ ' Check if we are trying to installed version not supporting x86
599+ If (SetupArchitecture = "x86" ) And doesNotSupportX86(SetupVersion) Then
600+ ' Support of 32-bit operative system has since discontinued since 1.8
601+ ShowMessage( "GLPI-Agent v" & SetupVersion & " doesn't support installation on a 32-bit operative system." )
602+ ShowMessage( "Deployment aborted!" )
603+ WScript.Quit 4
604+ End If
605+
580606bInstall = False
581607strInstallOrRepair = "/i"
582608
0 commit comments