Page 1 of 2 12>
Topic Options
#72370 - 2003-01-03 05:54 PM Installing Mdac 2.7
Anonymous
Unregistered


I need help with the following script that I wrote which installs Microsoft Data Access Component 2.7. The script runs fine, however I need it to check to see what version of Mdac is currently installed in the PCs. How can I get the script to "drill down" to the Name, Type and Data string within the REG_SZ registry key?

==================================

CLS

;***Verify if registry entries for Mdac 2.7 exists.***
If (Existkey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\ExceptionComponents\{F1CAE27D-85D3-4642-B9E9-48D7F9F56C82}")=0)
? "Mdac 2.7 already exists in registry."

GOTO endofscript

ELSE

sleep (2)

$CHOICE = MessageBox("Your PC is being updated with required files. This update should take approximately thirty (30) seconds." + chr(13) + chr(10) + chr(13) + chr(10) + "Should you have questions, please contact the Help Desk at Ext. 1234. Thank you for your patience!" + chr(13) + chr(10) + chr(13) + chr(10) +"This window will close in 10 Seconds. ***DO NOT CLICK the OK button.***","Preparing To Copy Files",0480,20)

SLEEP (6)

RUN "\\Server\Windows 2000\Updates\SMB Patch\MDAC_TYP.EXE -q"

SLEEP (5)

$ReturnCode = SendKeys("~A")
sleep (2)
$ReturnCode = SendKeys("{ENTER}")

SLEEP (6)
$ReturnCode = SendKeys("{ENTER}")
SLEEP (20)

$ReturnCode = SendKeys("{ENTER}")

:endofscript

Top
#72371 - 2003-01-03 06:03 PM Re: Installing Mdac 2.7
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See http://www.appdeploy.com/packages/detail.asp?id=89 for silent install parameters for MDAC.

Also, take a look at HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MDACVer.Version\CurVer or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Advanced INF Setup\MDAC_CORE for example. Or search the registry for MDAC.
_________________________
There are two types of vessels, submarines and targets.

Top
#72372 - 2003-01-03 07:41 PM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What you can also do rather than going through the Registry is do a GETILEVERSION of -

C:\Program Files\Common Files\System\ado\msado15.dll

HTH,

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

Top
#72373 - 2003-01-03 09:03 PM Re: Installing Mdac 2.7
Anonymous
Unregistered


Kent,
After I do the GETFILEVERSION, then what?

Top
#72374 - 2003-01-03 09:09 PM Re: Installing Mdac 2.7
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You compare the fileversion with the desired fileverison, e.g by using the CompareVersions() UDF. If the fileversion is lower than the desired one, then you run the installer with the command line switches provided in my link. No need to use SENDKEYS.
code:
; framework only
$currentver='2.70'
$ver=getfileversion(...)
if compareversions($ver,$currentver)
; run installer
endif

_________________________
There are two types of vessels, submarines and targets.

Top
#72375 - 2003-02-19 03:22 PM Re: Installing Mdac 2.7
Anonymous
Unregistered


Can someone help me "revamp" this script so that I don't have to use the SEND keys? When the script runs, it's not completing, and users have to intervene. I want to be able to use the get file version and the command line to install. I haven't used Kixtart in a while so I really need some assistance. Can someone rearrange my script to accomplish this? Many thanks!
Top
#72376 - 2003-02-19 04:23 PM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

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

Have you tried -

MDAC_TYP.EXE /?

For example, I tried running MDAC_TYP.EXE /? from my system on version 2.6, we see:

quote:

Command line options:

/Q -- Quiet modes for package,

/T: -- Specifies temporary working folder,

/C -- Extract files only to the folder when used also with /T.

/C: -- Override Install Command defined by author.

HTH,

Kent

[ 19. February 2003, 16:24: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#72377 - 2003-02-19 04:32 PM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

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

This should be a good start.

code:
break on cls
$windir=READVALUE('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion','SystemRoot')
$systemdrive=SUBSTR($windir,1,2)

$MDACVer=GETFILEVERSION($systemdrive+'\Program Files\Common Files\System\ado\msado15.dll')

IF $MDACVer < '2.71.9030.0'
RUN '\\Server\Windows 2000\Updates\SMB Patch\MDAC_TYP.EXE /Q'
SLEEP 1
?'Process is complete'
ENDIF

HTH,

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

Top
#72378 - 2003-02-19 05:44 PM Re: Installing Mdac 2.7
Anonymous
Unregistered


Kdyer,

I tried this, and the script runs to the point where it asks to accept the license agreement then stops. My original script uses the sendkeys to select "yes" accept the license agreement. I'm trying to make this install transparent to the users without having them intervene by clicking the mouse. Any more suggestions with this install? (without using sendkeys)

Top
#72379 - 2003-02-19 05:46 PM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

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

What are the options when you use

MDAC_TYP.EXE /Q

??

HTH,

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

Top
#72380 - 2003-02-19 05:50 PM Re: Installing Mdac 2.7
Anonymous
Unregistered


Kdyer,

I'm prompted with the "End User License Agreement" screen which requires that you select the checkbox at the bottom of the screen to accept the agreement.

Top
#72381 - 2003-02-19 05:56 PM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
My bad..

MDAC_TYP.EXE /?

HTH,

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

Top
#72382 - 2003-02-19 07:02 PM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Downloaded MDAC from Microsoft, and the switches are the same..

http://www.microsoft.com/data/download_270RTM.htm

Where did you get your MDAC from?

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

Top
#72383 - 2003-02-19 07:50 PM Re: Installing Mdac 2.7
Anonymous
Unregistered


I got the MDAC from MS website. Now I receiving the following:

Command line options:

/Q -- Quiet modes for package,

/T: -- Specifies temporary working folder,

/C -- Extract files only to the folder when used also with /T.

/C: -- Override Install Command defined by author.

When I click OK..... the DOS window dissapears, but the install doesn't complete. Sorry to keep bugging you.

Top
#72384 - 2003-02-19 08:08 PM Re: Installing Mdac 2.7
Lee Wilmott Offline
Starting to like KiXtart

Registered: 2002-09-17
Posts: 106
Loc: Bristol, UK
I've tried to do a silent install of MDAC before and gave up!

It would appear that Microsoft produce a standard packager that lists the switches available that you have specified in your post.

However, my own personal experiences of MDAC is that a silent install doesn't work as well as other Microsoft unattended/silent installations.

If you do happen to find a solution then please let me know!

Good luck,

Lee

Top
#72385 - 2003-02-19 10:02 PM Re: Installing Mdac 2.7
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
The silent KiX version for MDAC install:

What to add to the: /C: parameter

According to this link: MDAC 2.6 Setup FAQ
it should work for MDAC versions 2.5 and up

code:
Shell '\\Server\Share\MDAC2.7\mdac_typ.exe /q:a /C:"dasetup.exe /q /n"'
If @Error = 3010 ; Restart needed
$RC = ShutDown("","Restarting",5,1,1)
Quit
EndIf

-Erik

My private thanslation of the parameters:
/Q : Silent unpack
/Q:A : Silent unpack – must be followed by parameter /C:

The parameters in the string following /C: (Must be in double quotes)
dasetup.exe : Program to run after unpacking
/q : Quiet install (No licence question)
/n : Do not boot automaticly if required

[ 20. February 2003, 01:12: Message edited by: kholm ]

Top
#72386 - 2003-02-20 04:28 AM Re: Installing Mdac 2.7
Kdyer Offline
KiX Supporter
*****

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

I think Erik "hits the nail on the head!" The only outstanding question is when your clients login or otherwise run the script, do they have proper permissions?

Also, does this work for you? [Wink]

Thanks,

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

Top
#72387 - 2003-02-20 05:44 PM Re: Installing Mdac 2.7
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also the FAQ Forum under InstallShield - How do we deploy an application? which would point you to http://www.appdeploy.com, which in turn contains instruction on how to install MDAC silently under http://www.appdeploy.com/packages/detail.asp?id=89
_________________________
There are two types of vessels, submarines and targets.

Top
#72388 - 2003-02-21 01:42 AM Re: Installing Mdac 2.7
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Just a note on the example from Appdeploy.com

The examle states that the commandline is:
mdac_typ.exe /q:a /c:\"dasetup.exe /q /n\"

Note:
Th \" should be translated to only " in KiX

The character \ is often used as exeption for unallowed characters in other scripting languages.

When you see a sequence like this in a Non KiX script. Start to be suspicous [Wink] :
  • \/ ( In Kix normaly only \ )
  • \, ( In Kix normaly only , )
  • \" ( In Kix normaly only " )
  • Worst case \\ can mean only \ in KiX ( If \ is a not alowed character in the example script)
This is where the force of KiXtart comes in. KiX has two sorts of quotes the single and doubble, so instead of the need for exeptions you just wrap the quotes in opposit qoutes.

Follow Sealeopard advice:
Allways use single quotes, unless you have to pass double quotes as part of parameters to a program/object.

After removing the exceptions from Appdeploy ,the command to execute is:
mdac_typ.exe /q:a /c:"dasetup.exe /q /n"

Top
#72389 - 2003-02-21 02:24 AM Re: Installing Mdac 2.7
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Interesting way to fame: I'm now being remembered as the single-quote-guy [Big Grin]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 2 12>


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

Who's Online
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.07 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