Ok I am trying the following and it is not working. Script works great if I take the incontainer part out. I am using primal script. HELP!!!!!

Cls

;VARIABLES

;Agentinstall command
$agent = "\\msghostepo\epo\framepkg.exe /INSTALL=Agent /instdir=" + Chr(34) + "\Network Associates\Common Framework" + Chr(34) + " /s"
; Agentlog path
$agentlog = "\\msghostepo\epologs\logfiles"
; Set Agent registry key
$ikey="HKEY_LOCAL_MACHINE\Software\Network Associates\ePolicy Orchestrator\Application Plugins\EPOAGENT3000"
; Set current agent version
$curversion = "3.5.0.513"

$rc2 = incontainer("OU=Research,DC=cs,DC=utexas,DC=edu", "Computer")

If $rc2[0] = 0


;SCRIPT

; Check if registry key exists
IF (keyexist($ikey) = 1)
$version=ReadValue($ikey, "Version")
Else
$version="not installed"
EndIf

; Wrong Agent version -> Install new Agent
IF NOT ($version = $curversion)
? "Installing ePO Agent on " + @WKSTA + "- Please wait ..."
SHELL $agent
$version=ReadValue($ikey, "Version")
EndIf

; Create file with Workstation name if it does not exist (do not overwrite existing file)
IF Open( 1 , $agentlog + @WKSTA + ".txt" , 5 ) = 0
$message = "Agent Version is : " + $version
$x = WriteLine( 1 , @DATE + "-" + @TIME + " " + $message + @CRLF )
Else
? "failed to open file, error code : [" + @ERROR + "]"
EndIf

IF NOT ($version = $curversion)
; Create file for action necessary with Workstation name if it does not exist
IF Open( 2 , $agentlog + @WKSTA + "_notinstalled.txt" , 5 ) = 0
$message = "Agent Version is : " + $version
$x = WriteLine( 2 , @DATE + "-" + @TIME + " " + $message + @CRLF )
Else
? "failed to open file, error code : [" + @ERROR + "]"
EndIf
Else
; Remove "action necessary"-file if Version number is correct
DEL $agentlog + @WKSTA + "_notinstalled.txt"
EndIf

EndIf

Exit