Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Problem loading driver when using %OEM%

- - - - -

  • Please log in to reply
17 replies to this topic

#1
drkhyron

drkhyron
  • Member
  • 5 posts
  • Joined 06-January 04
I am trying to create a "mostly" unattended install of Windows 2000 and 2003. I have created a CD that does everything that I want except for one problem. Some of the engineers that I support need to load new drivers that are not on the CD. When they press F6 the install goes into the proper mode of loading the drivers from the diskette. It looks on the diskette and lists the drivers, letting the engineer select the correct driver, but when the install is supposed to copy the drivers from the diskette, it fails. It seems to be looking on the CD for the driver and not the diskette, saying that it can't find the drivers.

After some investigation I found that this one line in the winnt.sif file causes the problem:
OemPreinstall=Yes

If I set this line to No, F6 works correctly, but nothing in %OEM% is used. It seems to be one or the other.

Is there a way to have F6 continue to work and still have the contents of %OEM% used?

DrKhyron
DrKhyron


How to remove advertisement from MSFN

#2
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,767 posts
  • Joined 17-August 01
  • OS:Windows 7 x64
  • Country: Country Flag
By using DetectCD.exe you can get a system environment variable for the CD-ROM drive letter. You can then run your installs from the CD instead.

See here for more information.

#3
drkhyron

drkhyron
  • Member
  • 5 posts
  • Joined 06-January 04
I'm not sure how I would use that program during the part of the install where you hit F6 to load a driver from the floppy.
DrKhyron

#4
IcemanND

IcemanND

    MSFN Junkie

  • Super Moderator
  • 3,266 posts
  • Joined 24-September 03
  • OS:Windows 8.1 x64
  • Country: Country Flag
@drkhyron - Neither am I and I wrote it. Maybe a new function for it I haven't heard of.

@AaronXp - how about a little enlightenment?

#5
drkhyron

drkhyron
  • Member
  • 5 posts
  • Joined 06-January 04
Hmm. I think I might have figured out what AaronXP is telling me. Let's see if I got this right.

Set OEMPreinstall=No so that F6 works for loading the driver.
Then use GuiRunOnce to run a program that does all of the stuff in %OEM% that would have been done if OEMPreinstall=Yes, using DetectCD.exe to find the CDROM with %OEM%.

Is this what was being suggested?

If I need DetectCD.exe to find the CDROM, how do I run DetectCD.exe which would be on the CDROM that I need to be finding?
DrKhyron

#6
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • Joined 03-October 03
  • OS:none specified
  • Country: Country Flag
Why not just make 2 boot options, 1 for an unattended install, 2 for a regular install. That way if you need to use f6 you just do option 2. On my website and other threads on this site show how to use more than one boot folder. In the first boot folder you would put your unattend file (winnt.sif), in the second boot folder you wouldn't use any unattend file.

-gosh

#7
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,767 posts
  • Joined 17-August 01
  • OS:Windows 7 x64
  • Country: Country Flag

Hmm. I think I might have figured out what AaronXP is telling me. Let's see if I got this right.

Set OEMPreinstall=No so that F6 works for loading the driver.
Then use GuiRunOnce to run a program that does all of the stuff in %OEM% that would have been done if OEMPreinstall=Yes, using DetectCD.exe to find the CDROM with %OEM%.

Is this what was being suggested?

yup...

If I need DetectCD.exe to find the CDROM, how do I run DetectCD.exe which would be on the CDROM that I need to be finding?


Didn't think of that! :)

#8
Bachus

Bachus

    Advanced Member

  • Member
  • PipPipPip
  • 408 posts
  • Joined 25-July 03
Reminds me of the stories I've heard about cd-rom drivers being put on cds.. :)

#9
brent24

brent24

    Script kiddie

  • Member
  • Pip
  • 97 posts
  • Joined 14-December 03
You would put DetectCD.exe in the $oem$\$1\install folder so you can access it from a know location, %systemdrive%\install

Or ... you could use a js (or vbs [argh]) script to go through all the cdroms on the system looking for DetectCD.exe in a known folder on the cd.

If, for whatever reason, you choose the latter, I can help out if you don't know how.

[EDIT] I just realized....duh...if you go through all the cdroms on the system, you already know what the cdrom drive is. Now, it's a matter of finding which cdrom has the xp install cd in it :) If you choose the script route, I can still help out. :rolleyes:

[EDIT AGAIN] Ya know, this makes no sense either. You'd still have to put the script somewhere and if you know where it is, you can know where DetectCD.exe is. It's been a long day, i'm not thinking str8 :/ Option 1 is the better solution, i think. Good night.
They call me ... [root].

#10
drkhyron

drkhyron
  • Member
  • 5 posts
  • Joined 06-January 04

You would put DetectCD.exe in the $oem$\$1\install folder so you can access it from a know location, %systemdrive%\install

If I set OEMPreinstall=Yes to use %OEM%, loading a specific driver using F6 breaks.

I'd like #1 a fix for this problem so that I can set OEMPreinstall=Yes AND use F6.
or
#2 a work around that allows me to use the F6 driver load and somehow load the items that are in %OEM%

So far I like Gosh's suggestion to have 2 types of install, one for full unattended install and another for using F6 and having the engineer do more themselves.

I also like AaronXP's suggestion, but still need to understand how to reference an install program on the CD when the OS loads the first time.

BTW, I'm working on Win2K, but will apply what I learn to Win2K3 later.
DrKhyron

#11
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,767 posts
  • Joined 17-August 01
  • OS:Windows 7 x64
  • Country: Country Flag
I suppose a floppy disk with detectcd.exe on it is out of the question? It's all I can think of.

You *might* be able to run a cmd file with IF EXIST / SET commands then run detectcd.exe straight after. The environment variable will disappear when the cmd file is finished, but detectcd.exe should set a permanent environment variable from then on. I'm only just speculating at the moment.

#12
Fugacious

Fugacious
  • Member
  • 1 posts
  • Joined 07-January 04
If you can get a batch file to be copied to your harddrive you can use something like this.


@echo off

IF EXIST d:\i386\winnt.exe (

  set CDROM=d:\i386\$oem$\


)ELSE IF EXIST e:\i386\winnt.exe (

  set CDROM=e:\i386\$oem$\

)ELSE IF EXIST f:\i386\winnt.exe (

  set CDROM=e:\i386\$oem$\

)ELSE (

  And so on...

)	

%CDROM%\Drivers\4523\Setup.exe -s -f1"%CDROM%\Drivers\4523\Setup.iss"

%CDROM%\Drivers\Live51\Audio\Setup\setup.exe -s -f1"%CDROM%\Drivers\Live51\Audio\Setup\setup.iss"

EXIT


#13
IcemanND

IcemanND

    MSFN Junkie

  • Super Moderator
  • 3,266 posts
  • Joined 24-September 03
  • OS:Windows 8.1 x64
  • Country: Country Flag
another option to get the cd letter, only if you know at the time the current directory id the root of the CD is

set MYCD=%CD%

This will set MYCD to the current directory.

#14
brent24

brent24

    Script kiddie

  • Member
  • Pip
  • 97 posts
  • Joined 14-December 03
What about putting the DetectCD.exe (or a script or .cmd) in the i386\updates directory and then putting an entry in the svcpack.inf [setuphotfixestorun] section like so:

[SetupHotfixesToRun]
update.exe -q -n
DetectCD.exe
Q330994.exe /Q:A /R:N
etc....
etc....
etc....

I'm not sure if DetectCD.exe sets a local machine variable or a current user variable but if it's the machine variable I think it should still be accessible at first boot time.

I'm not sure if all this made sense, comments? :)
They call me ... [root].

#15
Alanoll

Alanoll

    CODE tags people, CODE tags!

  • Patrons
  • 5,496 posts
  • Joined 25-September 03
are you running the stuff from a batch file, or an INF. as this was never answered i don't think. People just assumede batch.
when are you running the stuff from $OEM$? from cmdlines.txt or GUIRunOnce
Welcome to the Forum! Please READ Me!!
Alright, that's it for the site for now. Now on to the next project....which could concievable replace the current site :)

#16
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,767 posts
  • Joined 17-August 01
  • OS:Windows 7 x64
  • Country: Country Flag
brent24, that's likely to work as someone else mentioned that svcpack.inf is processed no matter what OemPreinstall is set to :)

#17
IcemanND

IcemanND

    MSFN Junkie

  • Super Moderator
  • 3,266 posts
  • Joined 24-September 03
  • OS:Windows 8.1 x64
  • Country: Country Flag
Detectcd.exe sets a local machine variable, not current user.

I don't know why it wouldn't run from [setuphotfixestorun], its worth looking into.

#18
drkhyron

drkhyron
  • Member
  • 5 posts
  • Joined 06-January 04
Thanks Brent24! I think that will work for me. I've just gotten busy with another project as I am responsible for automating everything in the test lab, but I should be able to try it out in a few days.

Thanks IcemanND for the DetectCD utility.

Thanks all!

DrKhyron
DrKhyron




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users