Page 1 of 1 1
Topic Options
#115926 - 2004-03-11 01:58 PM How to collect the MDAC version?
Detector Offline
Fresh Scripter

Registered: 2004-03-10
Posts: 6
Hi all,

I'm looking for an example of how to collect the MDAC version from users at logon and save to a file.

Thanks.

Top
#115927 - 2004-03-11 02:15 PM Re: How to collect the MDAC version?
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
First of all don't post topics in this forum if it doesn't contain any code. Post it next time in the starters forum..

search the board and you will find threads like this:
MDAC Update From MS
_________________________
Co


Top
#115928 - 2004-03-11 02:40 PM Re: How to collect the MDAC version?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
look at this for ideas...

Code:

if not keyexist('HKLM\SOFTWARE\Microsoft\Updates\DataAccess\Q832483')
$CFPath = ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion', 'CommonFilesDir')
$MDACVer = GETFILEVERSION ($CFPath + '\System\ado\msado15.dll')
if left($MDACVer,4) > '2.52'
and not left($MDACVer,4) = '2.60'
and not left($MDACVer,4) = '2.61'
shell 'cmd /c $server\MDAC_Hotfix\enu_q832483_mdac_z86.exe /C:"dahotfix.exe /q /n" /q'
else
? 'must update MDAC version ' + $MDACVer

endif
endif


_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#115929 - 2004-03-11 02:54 PM Re: How to collect the MDAC version?
Detector Offline
Fresh Scripter

Registered: 2004-03-10
Posts: 6
Thanks Radimus.

Sorry Co, but I see your post has no scripts either j/k I will post in the proper location from now on.

Top
#115930 - 2004-03-11 03:03 PM Re: How to collect the MDAC version?
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Well smartass, I reply to your post... In that case it isn't necessary

ABC's of KiXtart board etiquette and message to new forum users


Edited by Co (2004-03-11 03:05 PM)
_________________________
Co


Top
#115931 - 2004-03-23 03:30 PM Re: How to collect the MDAC version?
MarkyMark Offline
Fresh Scripter

Registered: 2003-11-20
Posts: 6
How about

Code:
  
$mdac = right(ReadValue("HKEY_CLASSES_ROOT\MDACVer.Version\CurVer", ""),4)

$=Open (1, "\\path\mdac.txt", 4)
$=Writeline (1, @userid + "," + @fullname + "," + @wksta + "," + ",mdac=" + $mdac + chr(13) + chr(10))
$=Close (1)


Top
#115932 - 2004-03-23 04:34 PM Re: How to collect the MDAC version?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Registries can contain incorrect information, checking the actual DLL version is more reliable as already demonstrated out earlier in this thread.
_________________________
There are two types of vessels, submarines and targets.

Top
#115933 - 2004-03-23 06:44 PM Re: How to collect the MDAC version?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
I'd agree with Jens in this case, however I did notice an odd value when I ran this code.

Code:
Debug Off
Break On
Dim $RC,$MDAC,$RB,$CFPath,$MDACVer
$RC=SetOption('Explicit','On')
$RC=SetOption('NoVarsInStrings','On')

$MDAC = Trim(ReadValue('HKLM\SOFTWARE\Microsoft\DataAccess','FullInstallVer'))
$RB = Trim(ReadValue('HKLM\SOFTWARE\Microsoft\DataAccess','RollbackVersion'))
$CFPath = ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion', 'CommonFilesDir')
$MDACVer = Trim(GETFILEVERSION ($CFPath + '\System\ado\msado15.dll','BinFileVersion'))
? 'MDAC Registry version is: ' + $MDAC
? 'MDAC Registry Rollback is: ' + $RB
? 'MDAC Binary Version is: ' + $MDACVer



It gave me the following return

  • MDAC Registry version is: 2.71.9030.4
  • MDAC Registry Rollback is:
  • MDAC Binary Version is: 2.71.9030.0


Odd that the Binary version is lower then the Registry version.


Microsoft Data Access Components (MDAC) 2.8
http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&DisplayLang=en

Microsoft Data Access Components (MDAC) Security Patch MS04-003 (32-bit)
http://www.microsoft.com/downloads/details.aspx?FamilyId=39472EE8-C14A-47B4-BFCC-87988E062D91&displaylang=en

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
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.049 seconds in which 0.013 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