Hi Radimus,

I am a newbie to KIX, i need some help with McAfee.
I read with interest your Kix code about the subject. I've modified some variables to fit my environnement, but the script does'nt work.

Especially the Upgrade Engine Section.

The changes i made :

:McAfeeUpdate
; -------------[ McAfee Section ]-----------------------------

$McAfeeDat="4.0.4163"
$McEngine ="4.1.50"
$DatPath="\\Myserver\share\WinNT\Update"
$EngPath="\\Myserver\share\WinNT\Upgrade"
$95McAfeeDat="4.0.4163"
$95McEngine ="4.1.50"
$95DatPath="\\Myserver\share\Win95\Update"
$95EngPath="\\Myserver\share\Win95\Upgrade"

; ******************************* McAfee NetShield Section ***********************************

$eng=readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan", "szEngineVer")
if @error
? color r+/n " McAfee NetShield is not installed" color w/n
shell("\\Myserver\share\winnt\install\setup.exe -s")
else

; ********************************** Upgrade Engine Section ***********************************

? " Installed "color c+/n"McAfee NetShield "color w/n"is version " color w+/n $eng color w/n
if $eng<$McEngine
$McAfeeEngKey="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan\Tasks\Upgrade"
$mceng=READVALUE("$McAfeeEngKey", "szUpgradeCMD")
$RET=WRITEVALUE("$McAfeeEngKey", "szUpdateUncLocation", "$EngPath", "REG_SZ")
$RET=WRITEVALUE("$McAfeeEngKey", "uUpdateFrom", "1", "REG_DWORD")
? color g+/n" The Antivirus Program on your computer is being updated" color w/n
shell "\\Myserver\share\WiNT\Upgrade"+"\"+"$mceng"
endif

; *********************************** Update DAT Section *************************************

$dat=readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan", "szVirDefVer")
$Mcdate=readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan", "szVirDefDate")
? " Installed "color c+/n"McAfee DAT "color w/n"is version " color w+/n $dat color w/n " dated " color w+/n $Mcdate color w/n
if $dat<$McAfeeDat
? color g+/n" Updating Antivirus signatures" color w/n
$McAfeeRegKey="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VirusScan"
$mcexe=READVALUE("$McAfeeRegKey", "szUpdateEXE")
$RET=WRITEVALUE("$McAfeeRegKey"+"\Tasks\Update", "szUpdateUncLocation", "$DatPath", "REG_SZ")
$RET=WRITEVALUE("$McAfeeRegKey"+"\Tasks\Update", "uUpdateFrom", "1", "REG_DWORD")
shell "$mcexe /task update"

; ********************************* Alert Recipients Section *********************************

$McAfeeAltKey="HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\AlertManager\Recipients"
$Rep='Priority Level:"1" Type:"Network Message" Recipient:"\\'
$ret=writevalue("$McAfeeAltKey","Recipient0","$rep"+%areamis%+chr(34),"REG_SZ")
$ret=writevalue("$McAfeeAltKey","Recipient1","$rep"+$dcsa+chr(34),"REG_SZ")
endif
endif

_________________________
PG