Jump to content

Setupcopyoeminf Driver Integration.


The Glimmerman

Recommended Posts

Hi all,

I’ve a question. I use one driverpack compressed with 7zip.

This pack will be extracted by my DetachedProgram .

After extraction I use setdevicepath as a fail safe.

Because I use setupcopyoeminf.exe. Why?

First its handy when new hardware is detected the hardware wizard does not show up :)

Second I found out that when not using this method and I disconnect any usb device and put it in another slot all my devices are installed again. For my mouse/keyboard/keypad/joystick etc etc

Every time it took me about 5 minutes by clicking the hardware wizard (detection) away. With setupcopyoeminf.exe windows is installing them automatically.

But my question is when I use setupcopyoeminf some hardware doesn’t install good, because it want s a file. This file is available in the directory. Does anybody why this is.

When I use the search option where to find the file.

Lets say C:\drvs\C\1. After clicking ok it puts a \ in front of the path. Like this \C:\drvs\C\1 and the driver cannot be installed automatically.

Only when I choose don’t search, I choose the driver to install, and point directly to the directory the driver is installed.

This is not good because it isn’t unattended anymore.

Hope someone can tell me why this is and how to solve this.

Greetz Glim

Link to comment
Share on other sites


I'm not sure if i understood your correctly but lets pretend I did. You're saying that if you use RegistryDevicePath it won't work when you switch lets say USB device to other slot. Well i can only see one thing that happens here. Check registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion --> DevicePath. It has to have "%SystemRoot%\inf;" (the key can also have other values that setdevicepath adds to it but the main thing has to be there).

Link to comment
Share on other sites

What I meant was when using setupcopyoeminf ,and forget setdevicepath, windows sees and installs the drivers. But at first time login. The hardware wizard pops up and asks for a file thats in the directory where the driver is located. But windows cannot install it. even when I go the dir where the driver is located.

When I click OK to install the file windows is searching for. I get an error windows cannot install/find the file. Insert driver disk ..... and for the path in the inputbox there is an extra "\" inserted Like this.

\c:\winnt\drvs\C\N

Is this an error in the driver inf or is this an error in your script.

Even without this script and using your app I have the same problems.

I'd like to think its in the inf file but I never had this problem until I use setupcopyoeminf.

Does setupcopyoem inf work with XP??

Hope you or someone else can help figure this out.

If you like I can insert my script.

thx in advance

Link to comment
Share on other sites

I don't think it's error in your script. I've seen couple of times drivers that are missing some files or have problems like that with instalation. Setupcopyoeminf works in Windows XP. I only wonder if SetupCopyOemInf does correctly it's work ;) If you have that problem with just one or two drivers i would expect it to be problem with Driver itself ;)

Link to comment
Share on other sites

btw Do you or anybody else know if there is an open source for the setupcopyoeminf.exe (pyron made it??)

Why would you need the source code of setupcopyoeminf.exe? It is straight forward and the reason I asked Pyron to make the binary is that I'm not used to write binaries for Windows and that he already wrote SetDevicePath.exe which at first will also scan a subdirectory structure for INF files. So basically he had to change the second part of SetDevicePath.exe - instead of appending every subdirectory that contains one or several INF files to a Registry Value (and avoid duplicate entries) he calls SetupCopyOEMInf with every single INF file.

SetupCopyOEMInf is an API call inside setupapi.dll, which is a normal DLL that ships with Windows.

All setupcopyoeminf.exe does is to scan a subdirectory structure for INF files and run this API call with every single INF file.

MadBoy also uses this very same API call in his AutoIt-based utility.

So: you cannot "fix" any bugs there, all you can do is to use this API call in your own utility or use SetupCopyOEMInf.exe - the results will always be exactly the same.

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