Jump to content

OemPnpDriversPath Versus DevicePath?


jmmdss

Recommended Posts

I was working on an issue today where a syspreped image would find new hardware during every startup and prompt me to reboot to complete installation. No unknown devices were listed in Device Manager. I was using the DevicePath registry value (instead of OemPnpDriverPaths in sysprep.inf) to specify driver paths. I eventually found out the drivers not being installed were intel 945g video drivers.

What's weird is I have an unattended CD with the same exact drivers, and it works fine. :blink: The only difference is I'm using OemPnpDriversPath in winnt.sif to specify the driver locations. For some reason, I thought both methods were equivalent and that the answer file simply updated DevicePath. Does anyone know what the difference is between these methods? I've heard people say DevicePath was better.

Link to comment
Share on other sites


I had this problem with netwrok drivers once. Found that there were leftover drivers from the image. Go into windows\system32\inf and delete oem*.inf, and oem*.pnf then sysprep and capture.

Hope it helps.

Link to comment
Share on other sites

Thanks for the post. That didn't seem to do the trick for this particular issue. For some reason I had to use -pnp switch with sysprep.exe, even though the video drivers should be PNP... Anyway, it only adds about 1.5 to 2 minutes to deploy time, unlike the 5-10 stated in the MS docs, so I'm happy with this solution. Oh, I also tried UpdateInstalledDrivers in sysprep.inf, which didn't work in case anyone else has a similar issue.

By the way, it seems like I was wrong thinking that DevicePath and OemPnpDriversPath did different things. It appears that sysprep simply populates DevicePath based on what you have in OemPnpDriversPath when it runs.

Link to comment
Share on other sites

Thanks for the post. That didn't seem to do the trick for this particular issue. For some reason I had to use -pnp switch with sysprep.exe, even though the video drivers should be PNP... Anyway, it only adds about 1.5 to 2 minutes to deploy time, unlike the 5-10 stated in the MS docs, so I'm happy with this solution. Oh, I also tried UpdateInstalledDrivers in sysprep.inf, which didn't work in case anyone else has a similar issue.

By the way, it seems like I was wrong thinking that DevicePath and OemPnpDriversPath did different things. It appears that sysprep simply populates DevicePath based on what you have in OemPnpDriversPath when it runs.

Yep.

Only is OemPnpDriversPath limited to 4096 characters (when using XP) and even less - 2048 - when initializing setup through winnt.exe/winnt32.exe. If you write directly to the registry (i.e. to the DevicePath value), then you will be able to enter 64KB worth of driverpaths.

Link to comment
Share on other sites

  • 2 years later...

I just have a quick question about the DevicePath key itself ...

If you are going to add additional directories for Windows to scan when it detects new hardware, how should that be put into this key?

I saw one post somewhere on Microsoft's page that said to separate directories with a semi-colon.

But, the the key type for DevicePath is MULTI_SZ, and I noticed that if you go into the Registry Editor and manually edit the key, you can actually press ENTER to insert a carriage return and put stuff on a different line. Am I making sense?

In other words, which of these is right? (Or will both work?)

Example 1:

c:\windows\inf;c:\windows\drivers\vid;c:\windows\drivers\etc

Example 2:

c:\windows\inf

c:\windows\drivers\vid

c:\windows\drivers\etc

The main reason I ask is because I have a CMD script that is going to run at a certain point during my XP setup. Depending on how I set the command in the script, I can set the DevicePath key either as Example 1, or Example 2 - but I don't know which was is right, or wrong ...

Here's my code: (this would produce Example 1)

@CMDOW @ /HID
@ECHO OFF
TITLE=Windows Setup

SET DRVKEY="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion"

REG ADD %DRVKEY% /V DevicePath /T REG_MULTI_SZ /S ! /D "%SystemRoot%\inf;%WinDir%\DRV\00-CHP\01;%WinDir%\DRV\00-CHP\02;%WinDir%\DRV\00-CHP\03;%WinDir%\DRV\00-CHP\04;%WinDir%\DRV\00-CHP\05;%WinDir%\DRV\00-CHP\06" /f

EXIT

(this would produce Example 2)

@CMDOW @ /HID
@ECHO OFF
TITLE=Windows Setup

SET DRVKEY="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion"

REG ADD %DRVKEY% /V DevicePath /T REG_MULTI_SZ /S ; /D "%SystemRoot%\inf;%WinDir%\DRV\00-CHP\01;%WinDir%\DRV\00-CHP\02;%WinDir%\DRV\00-CHP\03;%WinDir%\DRV\00-CHP\04;%WinDir%\DRV\00-CHP\05;%WinDir%\DRV\00-CHP\06" /f

EXIT

The only difference between the two is that the /S value changes from an exclamation point to a semi-colon in Example 2, which I kind of did by accident, and saw the results of Example 2 in my registry file. Each folder was listed on it's own line. But, of course, I don't know if it will work like that or not ...

In any event, I changed the file to read "/S !" because I didn't realize at first that the REG command would interpret all my semi-colons as carriage returns, and then I got all confused, so here I am! :wacko:

Sorry if I've made this overly confusing or whatever. Thanks in advance for any input!

Regards,

Dave

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