#157104 - 2006-03-27 10:02 PM
Re: Mcafee EPO
|
rwani
Fresh Scripter
Registered: 2002-11-10
Posts: 20
Loc: Houston
|
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
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|