Yes the $os is set from another script that called from this one... full script OS.....O- if found i also tried it with -1 to run if missing from the array.....

-----------------Call---------------------
 Code:
; ----- Call  System Wide Scripts for System Wide Changes - Begin ---------

Call @ldrive + $Path + "\System.kix"


; ----- Call System Wide Scripts for  System Wide Changes - End -----------



--------------------Full Script---------------------
 Code:
Break On
 
? "Adding Adobe JS Patch"
SHELL "C:\Windows\regedit.exe -s " + @ldrive + "\adobeJS.reg"

; ------- Determine if the user is in the LoginScript_QA group - Begin ------------------------
Global $Path
$QAMessage = "You are running the QA Login Script"

If @ScriptDir = @ldrive
	Goto QACheck
EndIf

If @ScriptDir = @ldrive + "qa\netlogon"
	Goto RunQA
EndIf
	
:QACheck
If InGroup ("LoginScript_QA")
	$Path = "qa\Netlogon"
	Call @ldrive + "qa\netlogon\login.kix"
	exit
Else
	$Path = ""
	Goto Production
Endif
Goto EndPTI

:RunQA
MessageBox($QAMessage, "Message from Your System Administrator......",64,5)
; ------- Determine if the user is in the LoginScript_QA group - End --------------------------

:Production

;   --------------- IDENTIFY SITE ------------------
;
;
; ----- Home Script  ------------------------------------------------------
; Created by:   10.10.2011
; 
; -----------------------------------------------------------------------------------
Global $ipbyte1, $ipbyte2, $ipbyte3, $site, $OS
$IPMessage = "Logon scripts are not currently supported on this system or in this location.  Script operation aborting.  Click OK to continue."
$sHome3 = "xxx"
$OS = @PRODUCTTYPE   ; Get OS for conditional scripting
 
; ------- Determine if the computer is a server - Begin --------------------------------------------------

$Computer_Name= LCase (LTrim (Substr(@WkSta , 1, 1)))
if $Computer_Name == "w" GOTO EXECUTE_SCRIPT
ELSE
if $Computer_Name == "n" GOTO EXECUTE_SCRIPT
ELSE
if $Computer_Name == "f" GOTO EXECUTE_SCRIPT
ELSE
if $Computer_Name == "s" GOTO Server
ELSE GOTO ScriptError

; ------- Determine if the computer is a server - End ----------------------------------------------------

:Server
; ------- Determine if the computer is a server - Begin --------------------------------------------------

if AScan ($Server, @WkSta) <> -1
	Call @ldrive + $Path + "\Server\Server.kix"
	GOTO EndPTI
ELSE
	GoTo ScriptError

; ------- Determine if the computer is a server - End -----------------------

:EXECUTE_SCRIPT
; ----- Determine site by Domain Controller name - Begin -------------------------------------------------

$site=LCase(LTrim (substr(@LServer , 6, 3)))
$sitecheck = "xxx"
If AScan ($Sitecheck,$Site) <> -1 GOTO SKIP_IP_CHECK
ELSE ; do nothing

; ----- Determine site by Domain Controller name - End ----------------------------------------------------

; ----- Generate ipbytes - Begin --------------------------------------------------

$ipbyte1 = Val (LTrim (SubStr( @IPADDRESS0 , 1 ,3)))
If $ipbyte1 <> xxx 
	$ipbyte1 = Val (LTrim (SubStr( @IPADDRESS1 ,1 ,3)))
	If $ipbyte1 <> xxx 
		$ipbyte1 = Val (LTrim (SubStr( @IPADDRESS2 ,1 ,3)))
		If $ipbyte1 <> xxx
			GoTo SkipIP		
		Else
			$ipbyte2 = Val (LTrim (SubStr( @IPADDRESS2 , 5 ,3)))
			$ipbyte3 = Val (LTrim (SubStr( @IPADDRESS2 , 9 ,3)))
		EndIf
	Else
		$ipbyte2 = Val (LTrim (SubStr( @IPADDRESS1 , 5 ,3)))
		$ipbyte3 = Val (LTrim (SubStr( @IPADDRESS1 , 9 ,3)))
	EndIf
Else	
	$ipbyte2 = Val (LTrim (SubStr( @IPADDRESS0 , 5 ,3)))
	$ipbyte3 = Val (LTrim (SubStr( @IPADDRESS0 , 9 ,3)))
EndIf

If $ipbyte2 <> xx
	GoTo ScriptError
Else
	GoTo SkipIP
	; Exit script if ipbyte2 <> xx
EndIf
; ----- Generate ipbytes - End ----------------------------------------------------

:SkipIP
; ----- Check ipbyte3 for valid range and assign site - Begin ---------------------

Select
Case AScan ($axxx3, $ipbyte3) <> 0		; Array operations
	$site = "xxx"
Case 1
	GoTo ScriptError
EndSelect
; ----- Check ipbyte3 for valid range and assign site - End -----------------------

:SKIP_IP_CHECK

; ----- Call  System Wide Scripts for System Wide Changes - Begin ---------

Call @ldrive + $Path + "\System.kix"


; ----- Call System Wide Scripts for  System Wide Changes - End -----------

; ----- Call Main.kix for the user - Begin ----------------------------------------


If InGroup("xxx-Users")
	Call @ldrive + $Path + "\xxx\xxx.kix"
	If @error = 4		; Checks for forced exit of script
	Else "User Is Not A Member of the xxx-User Group"
		GoTo ScriptError
	EndIf
Case 0
	GoTo ScriptError
	? "The user does not belong to a site group or belongs to more than one."
EndSelect
; ----- Call Main.kix for the user - End ------------------------------------------

; Calls the printer script based on current site
Call @ldrive + $Path + "\" + $site + "\Printers.kix"
GoTo EndPTI

:ScriptError
MessageBox($IPMessage, "Kixtart Error",16,5)

:EndPTI


Edited by Mart (2011-10-16 11:46 AM)
Edit Reason: Please use code tags when posting code.