Page 1 of 1 1
Topic Options
#60004 - 2001-10-21 09:41 AM Auto Download Mcafee SuperDat
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Hi Kixers, I had a scheduled script to download the superdat from MCafee Web site, and as of today the new SuperDat web page SuperDat does not have the required Java Script button which I was using in my script for the Auto download. Can anybody help please.
Top
#60005 - 2001-10-22 09:25 AM Re: Auto Download Mcafee SuperDat
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
LASAD, you can also use FTP:ing instead. Bryce is one hell of a guy @ this, see here or herefor example.

Use this with the Scheduler, and your all set!

_________________________
The tart is out there

Top
#60006 - 2001-10-23 08:16 AM Re: Auto Download Mcafee SuperDat
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Masken, appreciate your reply, you have pointed me to the right path, however, I'm wondering if you can help me convert this VB script to Kixtart format since I want to stick with Kixtart.

This is a sample VB script that came with my CuteFTP client. Now instead of downloading the whole DIR we can use filtering to list the SuperDat file "sdat4*.exe" and then download the content of the DIR "/pub/antivirus/superdat/intel" to the local folder.

'********************************************************************
'* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
'* CuteFTP Pro Script Template
'* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
'*
'*This default template script is in Visual Basic. You can write
'*scripts in your language of choice and save it with the proper
'*extenstion, or use your an editor specific to that language
'*
'*
'*See the help file for more details on how this scripting feature
'*works. Below is a quick reference of supported commands, followed
'*by a sample script. You must have Windows Scripting Host installed
'*for the COM enabled engine to work
'*
'*----TEConnection object command reference---
'*
'*Public members (Data type followed by the command)
'*See the help file for a more detailed list
'*
'*BSTR Host
'*BSTR Protocol
'*Long Port
'*BSTR Login
'*BSTR Password
'*BSTR UseProxy
'*BSTR TransferType
'*BSTR LocalFolder
'*BSTR RemoteFolder
'*BSTR LocalFilterExclude, LocalFilterInclude
'*BSTR RemoteFilterExlude, RemoteFilterInclude
'*Long Retries
'*Long Delay
'*BSTR Autorename
'*BSTR Links
'*
'*Public functions - Return Type | Function Name ([argument1],[arguement2])
'*void Connect ()
'*void Download (BSTR RemoteName, BSTR LocalName)
'*void Upload (BSTR LocalName, BSTR RemoteName)
'*void CreateLocalFolder (BSTR strName)
'*void CreateRemoteFolder (BSTR strName)
'*void LocalRemove (BSTR strName)
'*void RemoteRemove (BSTR strName)
'*void RemoteRename (BSTR strFrom, BSTR strTo)
'*void LocalRename (BSTR strFrom, BSTR strTo)
'*short LocalExist (BSTR strName)
'*short RemoteExist (BSTR strName)


'*****************************************************************
'Sample Script in Visual Basic
'Sample script using the TEConnection object
'Look into c:\temp folder to observe local activity (for testing purposes)
'or Right Click on the Transfer Engine icon in the systray and select "show current transfers"
'Uses an anonymous login to ftp://kyle.globalscape.net

'First specify a variable called Mysite
Dim MySite

'Creating a connection object and assign it to the variable
Set MySite = CreateObject("CuteFTPPro.TEConnection")

'Now set each property for the site connection or use the defaults
MySite.Protocol = "FTP"
MySite.Host = "kyle.globalscape.com"
MySite.Login = "anonymous"
MySite.Password = "user@user.com"
MySite.RemoteFolder = "/Pub/cuteftp"
MySite.UseProxy = "BOTH"


'Now see if the local folder exists
If (Not (MySite.LocalExists("c:\temp"))) Then

'Create it if necessary
MySite.CreateLocalFolder "c:\temp"

'end of the if/then/else clause
End If

'Change directories to the destination folder
MySite.LocalFolder = "c:\temp"

'Check if the remote folder exists using another method
b = MySite.RemoteExists("english")

'assign the above in to a variable then qualify it
If (Not b) Then

'tell the user that the folder was not found and quit since i have no
' permission to create the remote folder anyway
MsgBox "Remote folder not found!. Please make sure that the english folder exists on the remote site"

Quit(1)
End If

'Downloading the english folder with all its files into the
'local destination folder, giving it a new long name
MySite.Download "english", "latest english cuteftp version"

MsgBox "Folder english was successfully downloaded to c:\temp\latest english cuteftp version"

'now we are going to rename the local folder to something shorter
'but first check to see if a folder with that name already exist.
If (MySite.LocalExists("Latest")) Then
MySite.LocalRemove "Latest"
MsgBox "Previous version of Latest deleted"
End If

'Rename the local folder
MySite.LocalRename "latest english cuteftp version", "Latest"

MsgBox "Folder renamed to Latest"

'Done
'End of sample script.
'You can save you script and then run it by either selecting it from the Tools > Run
'Script menu of by double clicking on the script file in Windows

Thanks,

Top
#60007 - 2001-10-23 05:11 PM Re: Auto Download Mcafee SuperDat
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
you can use CuteFtp from a COM object.... (learn something new every day)

If you are using kix2001, then this should be easy to port to kix.

I would do it myself, but, I am in currently in colorado and do not have the time.

If this is still unresolved when i get home on friday (i bet Shawn is porting it right now ), I will be happy to take a crack at it.

Bryce

Top
#60008 - 2001-10-23 08:52 PM Re: Auto Download Mcafee SuperDat
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey Bryce, I thought all your traveling days were over ... the company is squeezing some more out of you eh ?

LASAD:

So where does one find (dl) CuteFTP ?

Are you using KiXtart 3.63 or 4.00 RC3 ?

-Shawn

Top
#60009 - 2001-10-24 03:54 PM Re: Auto Download Mcafee SuperDat
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Bryce, Thanks for the attempt.

Shawn, Mr. OLE/COM himself is here to the rescue (I'm honored ), I'm using 3.63 and the reason I have not shifted to Kix2001 is because I'm still using the famouse OLE script that uses HTML GUI as my logon script, and I know that Kix2001 only supports COM.

However, I have seperate Kix2001 setting (only for ADMIN) which I can use.

Thanks again,

Top
#60010 - 2001-10-25 02:37 AM Re: Auto Download Mcafee SuperDat
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
LASAD:

For all intents and purposes - OLE and COM are the same thing. The "COM" in KiXtart 2001 is just new and improved OLE from 3.63. If that's the only thing that's holding you back ... then I would suggest that you (can) start porting right away ! KiXtart 2001 makes automating IE much, much easier ... performance is faster too !

Hows the HTML logon script working out ?

Still want to persue this CuteFTp thingy ?

-Shawn

Top
#60011 - 2001-10-25 05:25 AM Re: Auto Download Mcafee SuperDat
Anonymous
Unregistered


Hey LSAD, if you are interested in scripting an ftp download of Mcafee ANtivirus update files, I found a great book called "Windows Admin scripting:little black book"

It's another venue that you may want to take a look at..

this script file maps a network drive and executes FTP commands and downloads the latest dat files to that network drive.

You can use the AT command or Windows 2000 scheduled task manager to automate this command.

@echo Off
c:
cd na
Net use x: /Delete
Net Use x: \\server\share
ftp -n -s:c:\NA\NA.bat > na.txt
Net use x: /Delete
exit


open ftp.nai.com
user anonymous
fred@aol.com
lcd x:\s_dat
cd \pub\antivirus\datfiles\4.x
prompt
bin
mget *
bye

Top
#60012 - 2001-10-26 08:28 PM Re: Auto Download Mcafee SuperDat
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
LASAD,

Is this still a problem that you are working on?

I am still in Denver.... but i and leaving today. If you still want to port that VBscript to Kix4.0 let me know...

Hell, I will be doing it anyways! so be looking for a posting sometime this weekend, if not, then look for one on monday.

Bryce

Top
#60013 - 2001-10-27 08:48 AM Re: Auto Download Mcafee SuperDat
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
nsakauye, thanks for the batch file, however, I'm interested in COM solution as it gives a greater flexibilty.

Shawn, The OLE script is stil working great for me (mind you it does not work on win95, because of OLE support of course!), however, I'm trying to convert that same HTML ole code to COM on kix2001 (I'm not a good programer), and yes I would like to convert cuteFTP VB script to Kixtart.

Bryce, thanks again.

LASAD

Top
#60014 - 2001-10-27 10:41 PM Re: Auto Download Mcafee SuperDat
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey LASAD, this COMable CuteFTP thingy is very sweet, here's the KiXtart 4.0 conversion of above :

code:

; First specify a variable called Mysite

Break On

Dim $MySite

$MySite = CreateObject("CuteFTPPro.TEConnection")

; Now set each property for the site connection or use the defaults

$MySite.Protocol = "FTP"
$MySite.Host = "kyle.globalscape.com"
$MySite.Login = "anonymous"
$MySite.Password = "user@user.com"
$MySite.RemoteFolder = "/Pub/cuteftp"
$MySite.UseProxy = "BOTH"


; Now see if the local folder exists

If Not $MySite.LocalExists("c:\temp")

; Create it if necessary

$MySite.CreateLocalFolder("c:\temp")

EndIf

; Change directories to the destination folder

$MySite.LocalFolder = "c:\temp"

;Check if the remote folder exists using another method

$b = $MySite.RemoteExists("english")

; assign the above in to a variable then qualify it

If Not $b

;tell the user that the folder was not found and quit since i have no
;permission to create the remote folder anyway

MessageBox ("Remote folder not found!. Please make sure that the english folder exists on the remote site","Not found",0)

Quit(1)

EndIf

; Downloading the english folder with all its files into the
; local destination folder, giving it a new long name

$MySite.Download("english", "latest english cuteftp version")

$= MessageBox("Folder english was successfully downloaded to c:\temp\latest english cuteftp version","Ok",0)

;now we are going to rename the local folder to something shorter
;but first check to see if a folder with that name already exist.

If ($MySite.LocalExists("Latest"))
$MySite.LocalRemove "Latest"
$= MessageBox("Previous version of Latest deleted","",0)
EndIf

; Rename the local folder

$MySite.LocalRename("latest english cuteftp version", "Latest")

$= MessageBox("Folder renamed to Latest","",0)

;Done
;End of sample script.
;You can save you script and then run it by either selecting it from the Tools > Run
;Script menu of by double clicking on the script file in Windows


-Shawn

Top
#60015 - 2001-10-30 02:36 PM Re: Auto Download Mcafee SuperDat
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Thanks Shawn, it is working great. by the way you can add filter to your script"$Mysite.RemoteFilterInclude".

Cheers!

Top
Page 1 of 1 1


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

Who's Online
0 registered and 246 anonymous users online.
Newest Members
SERoyalty, mytar, Gabriel, Alex_Evos, Dansen
17869 Registered Users

Generated in 0.064 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

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