#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 837 anonymous users online.
|
|
|