Page 1 of 1 1
Topic Options
#437 - 1999-09-16 01:00 AM GetFileTime not working from a PDC or BDC - OK on local machine re: AntiVirus updates
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
Many a time we've seen the "how do I perform my virus installation/upgrade" using Kix.

That one I've got licked, but I've gota variation to the question.

I our login script I have Norton AntiVirus either install/update every time a user logs in. This is fine across the LAN, but is as slow as all hell for our remote users.

As such, I'm doing a registry check to see what version of updates the user has installed on their machine and trying to use GetFileTime to verify to correct version that they should have BEFORE running updates.

The script does:
$VSR = GetFileTime("\\TAUBAUNT01\NavNet32\NAVUP\NavDef4x\naveng32.dll")
$VSM = SUBSTR($VSR,1,4)+SUBSTR($VSR,6,2)+SUBSTR($VSR,9,2)

to find the VirusSourceResource (VSR and VirusSourceModified (VSM) giveing VSM in a data type format.
If I run this on my 98 or 95 machines locally, it returns the date correctly as 19990907, but when the exact same script is run from a domain controller, it returns "getfiletime" for the Source value which gets back to "GETFLEIM" as the modified value.

Hence, GetFiletime doesn't work from a domain controller.

Any got any ideas? I'm pretty confident/fluent with Kix, but this particular thing is driving me nuts!

I've even tried copying that particular file to the local machine upon lgin, and runnng the getfiletime from it, but it still returns the same value.

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

Top
#438 - 1999-09-16 05:56 AM Re: GetFileTime not working from a PDC or BDC - OK on local machine re: AntiVirus updates
Anonymous
Unregistered


Can't you use the GETFILEVERSION function ?

------------------
Lon Geefshuysen (MCP)
kixtart.to/lon
lon@kixtart.to


Top
#439 - 1999-09-16 07:11 AM Re: GetFileTime not working from a PDC or BDC - OK on local machine re: AntiVirus updates
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
Unfortunately I can't use getfileversion.
All the files that are updated are .dat, .dll, .exp, .sys and various others.

getfileversion will only work (so I've found ayway) on exe's. Try properties within Explorer on a file other than an .exe. No properties shown.

But thanks for the thought! Anyone else!!!

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

Top
#440 - 1999-09-16 11:13 PM Re: GetFileTime not working from a PDC or BDC - OK on local machine re: AntiVirus updates
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
Aha!

I've found the answer.
When I first really started looking into this the other day, I noticed that 3.60 was available (I was running 3.55)
I upgraded the .exe, dll's etc on the DC's and removed, re-installed the RPC service, but....

I copy the exe and dll's down to the client machine as part of the login script. There were running the old version. IT seems as though there may have been a problem with GetFileTime using 3.55, but this was since fixed. Get the login batch file to copy new exe's and dll's BEFORE calling kix32 itself and everything works hunky dory.

My discoveries
1. GetFileTime doesn't work properly in 3.55
2. RPC calls don't work when running different versions of exe to RPC service.

Anyone interested in seeing the final product of registry checking and file checking etc to see wether updates should be applied?

------------------
Paul Moxey
POS & Senior Network Administrator
Taubmans Pty Ltd
Paul_Moxey@taubmans.com.au

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

Top
#441 - 1999-09-19 06:27 PM Re: GetFileTime not working from a PDC or BDC - OK on local machine re: AntiVirus updates
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
I have had a number of e-mail requests for this section of the script.

So.. here it comes.

quote:

$VIR = READVALUE("HKEY_LOCAL_MACHINE\Software\Symantec\SharedDefs","NAV_50_QUAR") ; $VirusInstallRaw
$VIM = SUBSTR($VIR,(LEN($VIR)-11),8) ; $VirusInstalledModified
$Vins = Existkey("HKEY_LOCAL_MACHINE\Software\Symantec\SharedDefs") $ VirusInstalledatall?
$VSR = GetFileTime("\\SERVERNAME\NavNet32\NAVUP\NavDef4x\naveng32.dll") $VirusSourceRaw
$VSM = SUBSTR($VSR,1,4)+SUBSTR($VSR,6,2)+SUBSTR($VSR,9,2) $VirusSourceMonidifed
if $VSM=$VIM OR $Vins<>0 ; IF $VSM (Source ver) = $VIM (Install ver) do nothing!
color w+/b
CLS
BIG "Anti-Virus"
SMALL
color w+/b
at (8,1) "You have the current version of Norton AntiVirus installed. (Version " + $VSM + ")"
sleep 2
else ; Otherwise, Go and install/update Norton's.
; rem Norton AntiVirus installation
color w+/b
CLS
BIG "Anti-Virus"
SMALL
color w+/b
at (8,1) "You do not have Norton AntiVirus installed, or do not have current updates"
at (9,1) "Correct version: " + $VSM + " Your version: " + $VIM
at (10,1) "Installation should take about 5 minutes. (Up to half an hour for dialin)"
at (11,1) "After Norton AntiVirus is installed/updated it will then scan every file."
at (13,15) "Please wait while this takes place..............."
run "\\SERVERNAME\navnet32\navup\navadmin\navcheck /w32:\\SERVERNAME\navnet32\navup\navadmin\custom.nns"
endif

I think that's pretty much self-explanatory. There's a few extra comments there that should make things a little more inteligible.

Enjoy!

------------------
Paul Moxey
POS & Senior Network Administrator
Taubmans Pty Ltd
Paul_Moxey@taubmans.com.au

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

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 988 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.05 seconds in which 0.022 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