Jump to content

Odbc Support In Ms Winpe 1.2


luckyse7en

Recommended Posts


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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...