Jump to content

Multiple 1= Lines under [SourceDisksNames]


daddydave

Recommended Posts

I have almost completed a working version of a utility that does the third step of the HFSLIP/DRIVERCAB integration method described here.

Third step

Third step: editing INF files.

We came to the most difficult part as it needs some manual work. You have to open each INF in DRIVERCAB folder and search for the section [sourceDisksNames]or [sourceDisksNames.x86] and insert right after it and before any line this code:

[SourceDisksNames.x86]
1 = %W2Kcd%,driver.cab,,"I386"

and I would like to clarify something. The above results in something like:

[SourceDisksNames]
1 = %w2kcd%,driver.cab,,"I386"
1=%DISK%,,,

Does it do any harm to have the two 1= lines like that?

By the way, the utility is written in .au3 and I will be happy to share the source once I have tested it a little more on my end. I would be very surprised if others smarter than me are not working on something similar.

Also, by the way, this is my first post. :)

Edited by daddydave
Link to comment
Share on other sites


And your first post edit... :)

Nobody ever said anything about the duplicates so I suppose it's allright. But it's maybe safer to remove the old one if possible. Creating a second [sourceDisksNames] section would certainly confuse Windows.

But now that we're on the subject... It's maybe better to change "I386" to "\I386". According to Yzöwl, that's the correct syntax.

Also, something other than %w2kcd% could be used. I know it's just a name and that it doesn't make a difference; it just doesn't really reflect the fact that this procedure isn't limited to Windows 2000. HFSLIP uses "Windows CD" in one of the other INF files. You could make "WinCD" or something similar out of that to keep it short.

Does your program already cover INF files which use a number other than 1? You'd have to update the [sourceDisksFiles] section in that case too.

Link to comment
Share on other sites

Thanks for the good info!

This unattended stuff is a little new for me, as will become apparent. I thought I would give it a try, and I thought I don't really want to open up every INF file and edit it manually.

I can change the variable to %WINCD% easily, but that raises something else I am not really clear about. When does that environment variable, if that's what it is, get set?

In current form, once the script is inside a [sourceDisksNames] or [sourceDisksNames.x86] section, it looks for

foo=anything

and changes it to

foo=1

.

It is aware of whitespace, of course. Should it be something different if there are subdirectories?

Link to comment
Share on other sites

Should it be something different if there are subdirectories?
No; they are merged.
I can change the variable to %WINCD% easily, but that raises something else I am not really clear about. When does that environment variable, if that's what it is, get set?
I meant: change %W2Kcd% to "WinCD"...

1="WinCD",driver.cab,,"\I386"

Link to comment
Share on other sites

For clarification in case someone stumbles on this thread. The default ISOTITLE is HFSLIPCD not WINCD. Click on the DrivercabHelper link in my signature for more details

Thanks..

Come to think of it, what if the original line is

foo=anything,param,param,param;comment

?

Currently this would get changed to

foo=1;comment

Maybe I should preserve those params?

Edited by daddydave
Link to comment
Share on other sites

  • 2 months later...
I can change the variable to %WINCD% easily, but that raises something else I am not really clear about. When does that environment variable, if that's what it is, get set?

[strings] section is used for variables ie

netb57xp.inf

[SourceDisksNames]
1 = %DISK_DESC%,,,

[Strings]
BRCM = "Broadcom"
DISK_DESC = "Broadcom NetXtreme Installation Media"

Link to comment
Share on other sites

  • 7 months later...

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