#14998 - 2001-12-07 05:20 PM
Script not working over Dialup
|
Anonymous
Anonymous
Unregistered
|
I have a script which updates McAfee's engine, to do this I first have to create the site from which the local computer obtains the setup files. If I run this script over a DSL VPN connection or on my LAN, it works with no problem at all. Everytime I run over a Dialup connection, the script performs the registry hacks correctly but the "Site" does not show up in the McAfee scheduler. Because of this, the Upgrade fails with the message "...There is no site configured for upgrade operation."If I manually create the site but enter in some incorrect information, my script will correct the information and upgrade with no problems at all. Here is the exact script I am trying to run: $McInstallDir = ReadValue("HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion","szInstallDir") $McUpgradePath = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1\","szUNCLocation") ;$UpgradePath = ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Update\Update Site1","szUNCLocation") If ($McUpgradePath = "") OR ($McUpgradePath <> "\\server\itapps\distribution\virus\updates\engineupdate") ;SHELL "%comspec% /c regedit /s I:\distribution\virus\mcafeeupdatescripts\McAfeeEngineRegistry.reg" ; /s disables any pop up windows from appearing on the users computer ADDKEY ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bAnonymousLogin", "1", "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bProxy", "0", "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bRebootSystem", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bRetrieveOnly", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bSiteEnabled", "1" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bStoreAfter", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "dwInternetAcessType", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "dwProxyPort", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szFTPLocation","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szftpPassword","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szftpUserName","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szProxy","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szSiteName","Philips","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szStoreFolder","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szUNCLocation","\\server\itapps\distribution\virus\updates\engineupdate","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szUpgradeCMD","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","uUpdateFrom","1","REG_DWORD") EndIf If exist ("I:\distribution\virus\updates\engineupdate\*eng.exe") ; Only need to rename and extract once DEL "I:\distribution\virus\updates\engineupdate\setup.exe" SHELL "%comspec% /c rename I:\distribution\virus\updates\engineupdate\*eng.exe setup.exe" RUN "I:\distribution\virus\updates\engineupdate\setup.exe /e I:\distribution\virus\updates\engineupdate\extracted" ; /e extracts the executable EndIf sleep 30 ; time for Extraction to complete EndIf IF COMPAREFILETIMES("I:\distribution\virus\updates\engineupdate\extracted\mcscan32.dll","c:\Program Files\common files\network associates\virusscan engine\4.0.xx\mcscan32.dll") = 1; Downloaded file is newer than current file on the computer, proceed cd $McInstallDir SHELL "%comspec% /c mcupdate.exe /task upgrade" sleep 20 ; Time for McAfee VirusScan to reinitialize itself before trying to perform a DatUpdate EndIF Oh, these are all NT 4.0/W2K workstations and the user is a local admin to the machine. Drive letter "I" is mapped by the batch file calling this script and each machine is running McAfee 4.5 SP1. Any suggestions or ideas are greatly appreciated!! Fudd
|
|
Top
|
|
|
|
#15000 - 2001-12-09 05:29 PM
Re: Script not working over Dialup
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,We have take also a look at it. Special attention takes te way you try to upgrade with f.e. RUN command. Your code:
code:
$mcinstalldir=ReadValue("HKEY_LOCAL_MACHINE\Software\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion","szInstallDir") $mcupgradepath=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1\","szUNCLocation") ;$UpgradePath=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Update\Update Site1","szUNCLocation") IF ($mcupgradepath = "") OR ($mcupgradepath <> "\\server\itapps\distribution\virus\updates\engineupdate") ;SHELL "%comspec% /c regedit /s I:\distribution\virus\mcafeeupdatescripts\McAfeeEngineRegistry.reg" ; /s disables any pop up windows from appearing on the users computer ADDKEY ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bAnonymousLogin", "1", "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bProxy", "0", "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bRebootSystem", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bRetrieveOnly", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bSiteEnabled", "1" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "bStoreAfter", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "dwInternetAcessType", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1", "dwProxyPort", "0" , "REG_DWORD") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szFTPLocation","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szftpPassword","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szftpUserName","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szProxy","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szSiteName","Philips","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szStoreFolder","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szUNCLocation","\\server\itapps\distribution\virus\updates\engineupdate","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","szUpgradeCMD","","REG_SZ") WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\McUpdate\CurrentVersion\Upgrade\Upgrade Site1","uUpdateFrom","1","REG_DWORD") ENDIF IF exist("I:\distribution\virus\updates\engineupdate\*eng.exe") ; Only need to rename and extract once DEL "I:\distribution\virus\updates\engineupdate\setup.exe" SHELL "%comspec% /c rename I:\distribution\virus\updates\engineupdate\*eng.exe setup.exe" RUN "I:\distribution\virus\updates\engineupdate\setup.exe /e I:\distribution\virus\updates\engineupdate\extracted" ; /e extracts the executable EndIf SLEEP 30 ; time for Extraction to complete ENDIF IF COMPAREFILETIMES("I:\distribution\virus\updates\engineupdate\extracted\mcscan32.dll","c:\Program Files\common files\network associates\virusscan engine\4.0.xx\mcscan32.dll") = 1; Downloaded file is newer than current file on the computer, proceed CD $mcinstalldir SHELL "%comspec% /c mcupdate.exe /task upgrade" SLEEP 20 ; Time for McAfee VirusScan to reinitialize itself before trying to perform a DatUpdate ENDIF
The part we should change to:
code:
IF exist("I:\distribution\virus\updates\engineupdate\*eng.exe") ; Only need to rename and extract once DEL "I:\distribution\virus\updates\engineupdate\setup.exe" SHELL "%comspec% /c rename I:\distribution\virus\updates\engineupdate\*eng.exe setup.exe" RUN "%comspec% /c start /w I:\distribution\virus\updates\engineupdate\setup.exe /e I:\distribution\virus\updates\engineupdate\extracted" ; /e extracts the executable ENDIF IF COMPAREFILETIMES("I:\distribution\virus\updates\engineupdate\extracted\mcscan32.dll","c:\Program Files\common files\network associates\virusscan engine\4.0.xx\mcscan32.dll") = 1; Downloaded file is newer than current file on the computer, proceed CD $mcinstalldir SHELL "%comspec% /c start /w mcupdate.exe /task upgrade" SLEEP 20 ; Time for McAfee VirusScan to reinitialize itself before trying to perform a DatUpdate ENDIF
Also possible to copy first the setup.exe file to your TEMP directory and do the extraction on your client before running the upgrade fom your client. With the start /w call your script will wait for completion of all processes (father & child) before it will continu. greetings.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 640 anonymous users online.
|
|
|