Page 1 of 1 1
Topic Options
#14998 - 2001-12-07 05:20 PM Script not working over Dialup
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
#14999 - 2001-12-08 11:01 PM Re: Script not working over Dialup
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Fudd,

Have you thought about copying the scripts to the client machines and then running them from the client and not over to the server?

Just a thought.

- Kent

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

Top
#15000 - 2001-12-09 05:29 PM Re: Script not working over Dialup
MCA Offline
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.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.052 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org