MSFN Forum: Odbc Support In Ms Winpe 1.2 - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Odbc Support In Ms Winpe 1.2 Rate Topic: -----

#1 User is offline   luckyse7en 

  • Group: Members
  • Posts: 5
  • Joined: 24-March 04

Posted 18 April 2004 - 03:32 PM

Has anyone figured out what needs to be loaded/registered in order to give MS WinPE 1.2 ODBC support? I need to query a sql database from within WinPE. Thanks for any information provided.


#2 User is offline   syrynxx 

  • Newbie
  • Group: Members
  • Posts: 18
  • Joined: 03-March 04

Posted 19 April 2004 - 01:40 PM

I don't know about ODBC support, but the BuildOptionalComponents.vbs file in the OEMPK sounds like the ticket. Here's the comment section at the top:

'----Windows Script Host script to generate components needed to run WSH, HTA, or
'----ADO (for Microsoft SQL Server connectivity) under Windows PE.

This file creates OC.BAT and OC2.BAT which, when executed in PE, register the objects needed to run ADO commands in vbscript. So run BuildOptionalComponents.vbs in the PE build phase, and then run OC2.BAT from within PC. I haven't run any ADO functions myself yet, but that's the way it's supposed to work.

-syrynxx

#3 User is offline   syrynxx 

  • Newbie
  • Group: Members
  • Posts: 18
  • Joined: 03-March 04

Posted 03 May 2004 - 12:41 PM

Update - I just verified SQL query ability from MS PE 1.2 built from WS03 source, but I had a strange problem before I got it working.

First step - run "BuildOptionalComponents.vbs" from the PE build directory. If you run off a WS03 source as I did, you'll need to comment out the version checking in this VBS file, since it claims it's only designed to run from Windows XP. This creates the OC.BAT and OC2.BAT files in the Win PE i386 folder. If you run this VBS without any parameters, it will copy all support files necessary for WSH/VBS, HTA, and ADO support to the PE target directory, as well as some sample files to prove the subsystems work.

Second step - from a booted copy of WinPE, run OC.BAT, which in turn calls OC2.BAT. This does a bunch of REGSVR32 calls.

Third step - verify subsystem functionality by running \SAMPLES\testWSH.vbs, testHTA.hta, and testADO.vbs. The test ADO will ask for a SQL server name, user, and password, then attempt to query the Northwind database (one of the defaults).

This worked for me, only after I performed "step 2.5: Replace all files in 'C:\Program Files\Common Files\System\Ole db' with the ones from a fully-installed copy of WS03." My testADO.vbs wasn't working at first, and I had to create a test subset of OC2.BAT with the REGSVR32 silent switch removed (/S). Then I saw I was getting the following error :
"C:\Program Files\Common Files\System\Ole db\MSDAORA.DLL is not an executable file and no registration helper is registered for this file type."

which I got for about 10 files in that folder. Copied over the ...\Ole db folder from a normal WS03 installation, and then the DLLs registered jes fine.

I believe Wes Miller, who did the WinPE webcast for Microsoft a few weeks back, also had a problem with his testADO.vbs script during the demo, so perhaps there's something fishy in the MS PE build script.

Hope this helps.
-syrynxx

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy