Jump to content

Recommended Posts

Posted

Here - I found a good way, to get CDROM where XP-CD is inserted:

FOR /F "skip=3 tokens=3" %I IN ('REG QUERY"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v SourcePath') DO SET CDROM=%I

In Batchfiles use

FOR /F "skip=3 tokens=3" %%I IN ('REG QUERY"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v SourcePath') DO SET CDROM=%%I

Greetings

Al


Posted

umm....

Good job!

but not to be rude or anything, but you have to be like the 3 person to post this in a week :P

Now I'm just gonna explain why I believe the IF EXIST checking for a file is better.

1. It can be expanded to multiple CDs.

2. If you are creating a MultiBoot CD, then the SourcePath then becomes something obscene :P And most people put their Unattend stuff in the root and not buried in folders.

3. EVERY XP CD has the Win51 file.

4. It only fails SOMETIMES with removable storage drives like ZIP drives.

The SourcePath method locks you to a drive, a SINGLE drive. And like above, it gets alittle nasty when doing MultiBoot CDs.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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