Jump to content

sqlcmd in WinPE


mallen

Recommended Posts

It's been a while since I looked at PE, but I can't seem to find anything on this. I'm trying to use sqlcmd within WinPE (2.0) to run simple insert statements into a remote database. I have added sqlcmd.exe, sqlcmd.rll and batchparser90.dll into my image, but when I call sqlcmd I receive a side-by-side error. Any ideas anyone?

Thanks in advance.

Link to comment
Share on other sites


Hi,

I have the following packages installed:

Lang | Version | Ins | Name

------+---------------+-----+-----------------------------------------------

en-US |6.0.6000.16386 | + | WinPE-MDAC-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | + | WinPE-MDAC-Package

------+---------------+-----+-----------------------------------------------

en-US |6.0.6000.16386 | + | WinPE-Scripting-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | + | WinPE-Scripting-Package

------+---------------+-----+-----------------------------------------------

en-US |6.0.6000.16386 | + | WinPE-WMI-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | + | WinPE-WMI-Package

------+---------------+-----+-----------------------------------------------

en-US |6.0.6000.16386 | + | WinPE-XML-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | + | WinPE-XML-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | - | WinPE-FontSupport-JA-JP-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | - | WinPE-FontSupport-KO-KR-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | - | WinPE-FontSupport-ZH-CN-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | - | WinPE-FontSupport-ZH-HK-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | - | WinPE-FontSupport-ZH-TW-Package

------+---------------+-----+-----------------------------------------------

en-US |6.0.6000.16386 | - | WinPE-HTA-Package

------+---------------+-----+-----------------------------------------------

|6.0.6000.16386 | - | WinPE-HTA-Package

------+---------------+-----+-----------------------------------------------

I have also tried manually adding the VC runtime to the Windows\Winsxs folders, but still can't make it work. Looking through using depends.exe it looks like I have all the dependencies in place, but I still receive the following error:

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.

Thanks

Link to comment
Share on other sites

When you say you copied into the WinSxS folder, do you mean in your winpe source or after the PE was loaded? Were you following the advice of website? You can try opening up a ProcMon and then try to run your app and see if you can locate what files it is missing. Also, it is possible that it is attempting to use files of the wrong version? Its also obvious that something is different from your testing pc (where you are running depends) and your PE. Is this testing pc also running Vista with the same architecture as your PE?

Are these 3 files from sqlcmd part of a retail product or something that is available in a demo somewhere?

Did you build your PE for x86 or amd64?

Link to comment
Share on other sites

Thanks for your pointers - I've just realised I've included the winsxs files from a XP SP3 build, when my PE image is Vista. That's bound to cause some problems.

My build PC is Windows 7, but the files I've been including were lifted from a fully built target PC. I'll prep a Vista x86 PC to lift the winsxs files from and try that (matches the PE spec). I've been adding them into the PE source before I prep the image.

If that still doesn't work I'll try the ProcMon route. Basically I'm using Vista PE to deploy XP and want to use SQLCMD to log pre-installation steps into a remote database to report progress.

Thanks for all your help so far - some useful pointers as to where I'm going wrong. If I eventually manage to get it working I'll post the required changes.

Thanks

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...