Okay Vin,
Here is a SAMPLE of how to do what you're looking for.
Now if this doesn't get me another 5 star VOTE, I don't know what will
NOTE None of this code has been tested in any way what so ever.
It is only an idea of how it can be done. You MUST review and modify it to work for your circumstances.
Please review the code below and modify as needed... I don't think too many
other users will write out this much code for you except maybe MCA
he is a
work horse of help and ideas.
My Opinion This program sure looks like a rip-off of Symantec's
Norton AntiVirus Corporate Edition. Too many similarites for my liking.
ePolicy Orchestrator
ePolicy Orchestrator at McAfee
ePolicy Orchestrator is the first and only truly scalable tool for managing and enforcing anti-virus
protection and policies. No matter whether you use McAfee or Symantec anti-virus products.
Compare ePolicy Orchestrator to other management tools
Designed specifically for the Internet, ePolicy Orchestrator is the first and only truly scalable
tool for managing and enforcing anti-virus protection and policies. No matter whether you use McAfee
or Symantec anti-virus products, ePolicy Orchestrator gives you the power to ensure virus protection
more effectively than any other solution on the market. Using ePolicy Orchestrator's comprehensive
policy management, detailed graphical reporting, and software deployment. Administrators can manage
policies and deploy protection while generating detailed graphical reports on McAfee anti-virus
products, as well as Symantec desktop and server anti-virus products.
code:
$NTEpol = "\\myserver\myshare\my_nt_epol_installer.exe"
$9xEpol = "\\myserver\myshare\my_9x_epol_installer.exe"
IF @INWIN = 1
$SRVR = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions", "ProductType")
IF $SRVR<>"WinNT" ; System is not a Workstation so assume it is a Server
; Call the server routine or return to main script.
RETURN
ENDIF
ENDIF
SELECT
CASE @INWIN = 1
IF EXIST("C:\EPOLICY\EPOLNT.DLL")=1 ;found file, so don't need to do anything. Return to main script.
RETURN
ELSE
SHELL $NTEpol ;execute the installer for NT
GOSUB "InstallOkay" ;log the install as okay
RETURN
ENDIF
CASE @INWIN <>1
IF EXIST("C:\EPOLICY\EPOL9X.DLL")=1 ;found file, so don't need to do anything. Return to main script.
RETURN
ELSE
SHELL $9xEpol ; execute the installer for Win9x
GOSUB "InstallOkay" ;log the install as okay.
RETURN
ENDIF
CASE 1 ; Unknown error go log error.
GOSUB "UnknownError"
RETURN
ENDSELECT
:UnknownError
IF OPEN(1,"\\MYSERVER\LOGS\"+@WKSTA+".LOG", 5)= 0
$out = WriteLine(1, @DATE+"*"+@TIME+"*"+@USERID+"*"+@FULLNAME+"*"+@lserver+"*"+"Unknown error installing ePolicy"+"*"+Chr(13)+Chr(10))
$nul = CLOSE(1)
ENDIF
RETURN
:InstallOkay
IF OPEN(1,"\\MYSERVER\LOGS\"+@WKSTA+".LOG", 5)= 0
$out = WriteLine(1, @DATE+"*"+@TIME+"*"+@USERID+"*"+@FULLNAME+"*"+@lserver+"*"+"ePolicy installed okay"+"*"+Chr(13)+Chr(10))
$nul = CLOSE(1)
ENDIF
RETURN
:END
RETURN