There really isn't too much to explain.
Code:

$epoPATH=ReadValue("HKLM\Software\Network Associates\ePolicy Orchestrator\Agent", "Installed Path")
If Not @ERROR ; -- Check for the existence of the reg value
"ePolicy Orchestrator Agent Installed" ?
Else ; -- does not exist
"Installing ePolicy Orchestrator Agent...Please wait." ?
Copy "@SCRIPTDIR\framepkg.exe" "%TEMP%" ; -- copy the package to install ePO
Shell "%TEMP%\framepkg.exe" ; -- execute the file
Del "%TEMP%\poaginst.exe" ; -- delete the file
EndIf



Pretty simple..

If you really need to look for the ePO Server.. You should be able to readprofilestring on the siteinfo.ini. It is what I used when we migrated from one ePO server to another.

Code:

CLS
BREAK ON
:epoagent
;Version 1.1 - 6-March-2003
;Original Post 24-February-2003
;Kent Dyer (leptonator@hotmail.com)
;SYNOPSIS:
;Original idea was brought about from a Support Call to NAI as we brought on-line a new ePO Server
;Sure, we could "push" the Agent to the client, but why not have the script pick this up...
;We needed to bring on-line our Branches and leave others as originally setup.
;VERSIONS:
;Version - 1.1 6-March-2003 Bug Fix, On first RETURN, file was not closed
;Version - 1.0 24-February-2003 Original Code
$windir = READVALUE('HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion','SystemRoot')
$systemdrive = SUBSTR($windir,1,2)
$sitefile=$systemdrive+'\EPOAGENT\siteinfo.ini'
$old='OLDSERVER'
$new='NEWSERVER'
IF EXIST($sitefile)
IF READPROFILESTRING($sitefile,'Current','MasterSiteServer')=$new
RETURN
ENDIF
IF READPROFILESTRING($sitefile,'Current','MasterSiteServer')<>$new
$rc=WRITEPROFILESTRING($sitefile,'Current','MasterSiteServer',$new)
ENDIF
IF READPROFILESTRING($sitefile,'Current','Servers')<>$new
$rc=WRITEPROFILESTRING($sitefile,'Current','Servers',$new)
ENDIF
IF READPROFILESTRING($sitefile,$new,'ComputerName')<>$new
$rc=WRITEPROFILESTRING($sitefile,$new,'ComputerName',$new)
ENDIF
IF READPROFILESTRING($sitefile,$new,'DNSName')<>$new+'.DOMAIN.COMPANY.COM'
$rc=WRITEPROFILESTRING($sitefile,$new,'DNSName',$new+'.DOMAIN.COMPANY.COM')
ENDIF
IF READPROFILESTRING($sitefile,$new,'LastKnownIP')<>'1.2.3.4'
$rc=WRITEPROFILESTRING($sitefile,$new,'LastKnownIP','1.2.3.4')
ENDIF
SHELL '%COMSPEC% /C NET STOP NAIMAGENT32 > nul'
sleep 2
SHELL '%COMSPEC% /C NET START NAIMAGENT32 > nul'
RETURN
ENDIF



Do not know if this is still used for 7.x..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's