Page 1 of 1 1
Topic Options
#133013 - 2005-01-26 06:05 PM Search and Replace Files on a C Drive
Kim Offline
Lurker

Registered: 2005-01-26
Posts: 2
Please can you help. I need to write a batch file that searches a c: drive for all instances of msado15.dll and then replaces with a specific version, ie, pre XP SP2 476K file dated 29/08/02. I am new to Kixstart andhave just downloaded! OS is XP and will be SP2.

Many thanks.

Kim the newbie.

Top
#133014 - 2005-01-26 07:03 PM Re: Search and Replace Files on a C Drive
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Hello Kim and welcome to the board.

First off replacing just this DLL is probably not a good idea unless you have fully tested that replacing it does correct your issues. This is a main file for Microsoft MDAC (Microsoft Data Access Components)

Microsoft Data Access Components (MDAC) 2.8

Here is some code to run that will tell you what the current version is and it's location.

The typical location would be:
C:\Program Files\Common Files\System\ado

Code:
Break On

Dim $SO,$RC,$MDAC,$RB,$CFPath,$MDACVer,$MDACDesc
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('WrapAtEOL','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'))
$MDACDesc = Trim(GETFILEVERSION ($CFPath + '\System\ado\msado15.dll','FileDescription'))

? 'MDAC Description: ' + $MDACDesc
? 'MDAC Registry version is: ' + $MDAC
? 'MDAC Registry Rollback is: ' + $RB
? 'MDAC Binary Version is: ' + $MDACVer
? 'File location for MSADO15.DLL is: ' + $CFPath + '\System\ado\'



Edited by NTDOC (2005-01-26 07:06 PM)

Top
#133015 - 2005-01-27 04:55 PM Re: Search and Replace Files on a C Drive
Kim Offline
Lurker

Registered: 2005-01-26
Posts: 2
Thanks for this NTDoc. Not the best way to do things by replacing a single dll, but unfortunately it's to make a third party database function properly under XP SP2.

Thanks again.

Kim

Top
#133016 - 2005-01-30 02:55 PM Re: Search and Replace Files on a C Drive
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Maybe reinstalling MDAC 2.8 would be a better way.
_________________________
There are two types of vessels, submarines and targets.

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 611 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.054 seconds in which 0.024 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