MSFN Forum: Drivers from CD: Simple Method - MSFN Forum

Jump to content



  • 12 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Drivers from CD: Simple Method Rate Topic: ***** 1 Votes

#161 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,604
  • Joined: 14-November 03

Posted 12 March 2006 - 02:14 PM

View Posta06lp, on Mar 2 2006, 12:47 AM, said:

View PostUnlock, on Feb 28 2006, 10:11 AM, said:

I've problem.....My pc reboot always after the copy of the files of windows

OK RESOLVED

:blink: :blink:

...ok


Exactly when are you getting this problem shortly after T39?

Cheers
MC.


#162 User is offline   Joc 

  • Junior
  • Pip
  • Group: Members
  • Posts: 91
  • Joined: 02-December 03

Posted 17 March 2006 - 05:45 AM

View PostUnlock, on Mar 1 2006, 10:34 AM, said:

new problem:

1)Start installation windows
2)start driver.cmd and I see all operation after, pc restart and blue screen

WHY?

I've many drivers for more pc in drivers directory...Is the problem it?



I have same problem. I deleted the Forceware driver and everything working correctly. I think the problem appears with 8x.xx drivers only. In this weekend I will test.

Any opinion?

Joc

#163 User is offline   Joc 

  • Junior
  • Pip
  • Group: Members
  • Posts: 91
  • Joined: 02-December 03

Posted 19 March 2006 - 03:33 AM

Solved the BSoD 0x7e: everything is working correctly with Forceware 77.72!

Joc

#164 User is offline   Unlock 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 17-September 04

Posted 22 March 2006 - 06:46 AM

ok canghe forceware 8 wiht 77.72.......where found it?

#165 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 26 March 2006 - 06:45 PM

Now that everything is back to batch syntax, may I submit for testing a small modification to this method?
Using it as specified in the 1st post, there may be a weak point in the way Drivers.cmd is looked for, namely the Arguments line in Winnt.sif:
[quote name='a06lp' post='358011' date='Jul 22 2005, 08:59 PM']Arguments="/Q /C FOR /F %I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (FOR %J IN (%I$OEM$) DO (IF EXIST %J (start /min /D%J Drivers.cmd)))"[/quote]* All the lines of $WINNT$.INF are processed regardless of their relevance/risk.
* %I$OEM$ works fine for installing from CDROM but for installing using a local source (from dos, network, etc.) we need to use %I\$OEM$

I would suggest the following 3 steps:

1- put Drivers.cmd in \$OEM$\$1 instead of \$OEM$
Doing so, it will be copied to %SystemDrive% at the end of the Textmode Setup
2- Have a really simple Arguments line:
Winnt.sif
3- Modify Drivers.cmd to find the exact source folder at the beginning and to remove itself at the end:
Drivers.cmd[quote]CLS
@ECHO OFF
TITLE Drivers-from-CD Installation
color 1F
[s]:: Set Current Drive as CD
CD /D "%~dp0"[/s]

:: Find the source (dospath) folder
FOR /F "tokens=1* delims==" %%I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (IF dospath==%%I SET dosP=%%J)
::Add trailing slash for installs from local source
IF NOT %dosP:~-1%==\ SET dosP=%dosP%\
:: check for drivers existence
IF NOT EXIST "%dosP%$OEM$\SetupCopyOEMInf.exe" EXIT
:: Set $OEM$ as CD
CD /D "%dosP%$OEM$"

:: Set Drivers Location Folder
SET DRV=Drivers
...
...
... Bulk of Drivers.cmd goes here
...
...

:: Delete Ticker File
DEL %SystemDrive%\Ticker.ncl
:: Clean myself 'cause I'm a nice little boy
DEL %SystemDrive%\Drivers.cmd

EXIT[/quote]

* The FOR can now use quotes so it can properly target the folder referenced by the dospath line, at the exclusion of any other potential folder referenced by the other lines of $WINNT$.INF. Although the risk of having another $OEM$ elsewhere is low, this may avoid unexpected things to happen,
* The next line allow for use in any situation: install from CDROM and install using a local source,
* Then a control is performed,
* Eventually the current directory is set to $OEM$ and the rest of the operations can follow.


[edit]: added the 'START' command in the arguments directive, otherwise .cmd files are not processed.

This post has been edited by Djé: 02 May 2006 - 08:54 AM


#166 User is offline   carter8189 

  • Newbie
  • Group: Members
  • Posts: 14
  • Joined: 17-April 06

Posted 18 April 2006 - 08:14 AM

guys but the driver that i have to put in Drivers folder has to be unpacked (example i extract a rar file or a setup.exe) or i can leave the only setup.exe? do i have to create folders for each driver? thanks

#167 User is offline   a06lp 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 976
  • Joined: 19-August 04

Posted 24 April 2006 - 06:57 AM

View Postcarter8189, on Apr 18 2006, 10:14 AM, said:

guys but the driver that i have to put in Drivers folder has to be unpacked (example i extract a rar file or a setup.exe) or i can leave the only setup.exe? do i have to create folders for each driver? thanks


As I told you in your PM to me:

extract the files. (there should be an "ini" file, along with other files)

you can, but don't have to, create subfolders in Drivers. It will detect which driver is needed.

#168 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 03 May 2006 - 12:36 AM

View Postidle.newbie, on Nov 4 2005, 07:31 AM, said:

Arguments="/Q /C FOR /F %I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (FOR %J IN (%I$OEM$) DO (IF EXIST %J (start /min /D%J Autoit3.exe Drivers.au3)))"
using DetachedProgram to scan dospath should consider a hack, tho it works currently, it may not perm.


In that post, I suggested to have a much simpler Arguments line in Winnt.sif:
DetachedProgram = cmd.exe
	Arguments = "/Q /C START /MIN %SYSTEMDRIVE%\Drivers.cmd"
and to do the dospath scan comfortably from the Drivers.cmd that would have been copied to %SYSTEMDRIVE% through '$OEM$\$1'.

The only problem with that method is when OemPreinstall has to be set to 'No'. Because Drivers.cmd could not be copied over. It's always possible to have it copied by another method during text mode setup but this involves even more integration.

So I managed an Arguments line for the DetachedProgram in Winnt.sif that may be more universal:
- It do a better scan of $WINNT$.INF, really looking for the dospath line.
- It does not require to copy anything from the $OEM$ folder.
- Moreover, it adresses the problem of the missing trailing "\" for installations using a local source (from dos, network, etc.).
Here it is:
DetachedProgram = cmd.exe
	Arguments = "/Q /V:ON /E:ON /C FOR /F %I IN (%SystemRoot%\SYSTEM32\$WINNT$.INF) DO (SET LINE=%I&& SET DEB=!LINE:~0,7!&& IF dospath==!DEB! (SET dosP=!LINE:~8!&& (IF NOT !dosP:~-1!==\ SET dosP=!dosP!\) && START /MIN !dosP!$OEM$\Detached.cmd))"
Besides being unreadable ;), the 'Arguments' is one single line, which has no other quotes than the surrounding one (as required by winnt.sif syntax) and where every space in it is important!

I'm using it here (for another purpose than drivers installation) and it works very fine.

#169 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,119
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 03 May 2006 - 06:59 PM

@ Djé
Would this shorter code not do the same thing, apart from the minimized running of the batch file.
DetachedProgram = cmd.exe
	Arguments = "/Q /C FOR /F %? IN ('FINDSTR/I DOSPATH= ^<%SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (IF ERRORLEVEL 0 (SET %? &CALL %dospath:~0,2%\$OEM$\Detached.cmd))"


#170 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 04 May 2006 - 12:15 AM

:w00t: use FINDSTR, SET %? and CALL :thumbup

Sorry if I was not clear about that, but dospath is not always just a drive path like 'E:\':
When installing using winnt.exe (or winnt32), you may have to make a local source and $OEM$ would be transfered by winnt.exe to that local source.
The location of the local source FOLDER would then be in the 'dospath' directive (something like 'c:\$WIN_NT$.~LS').
So we need to retreive the full line (and add a trailing '\' to the local source folder name to have the same pattern as with a Cd based install).
This slash thing is why we need the '(IF NOT !dospath:~-1!==\ SET dospath=!dospath!\)' (and so delayed expansion).
I'll try to shorten this as well using CALL.

Also, I am not sure that CALLing a .cmd file works @T39. I've read about and painfully experimented troubles when not using START. Do you know better?

[EDIT] this is not yet working properly @T39, see post below for the solution[/EDIT]:
DetachedProgram = cmd.exe
	Arguments = "/Q /V:ON /C FOR /F %? IN ('FINDSTR/I DOSPATH ^<%SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (IF ERRORLEVEL 0 (SET %?&& (IF NOT !dospath:~-1!==\ SET dospath=!dospath!\) && START !dospath!$OEM$\Detached.cmd))"

This post has been edited by Djé: 04 May 2006 - 09:19 AM


#171 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 04 May 2006 - 01:53 AM

Got it! :P

[EDIT] this is not yet working properly @T39, see post below for the solution[/EDIT]:
DetachedProgram = cmd.exe
	Arguments = "/Q /C FOR /F %? IN ('FINDSTR/I DOSPATH= ^<%SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (IF ERRORLEVEL 0 (SET %?\&& CALL START %dospath:\\=\%$OEM$\Detached.cmd))"
No more delayed expansion thanks to Yzöwl.

I'm gonna test the CALL START in real T39 situation soon.

@Yzöwl, why would we need the input redirection to FINDSTR (<)? why not just feed it directly with the file name? :
FINDSTR/I DOSPATH= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF

We may also want to specify the start of the line: ^^DOSPATH=

This post has been edited by Djé: 04 May 2006 - 09:21 AM


#172 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,119
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 04 May 2006 - 02:59 AM

We shouldn't need it! I was being extra cautious due to the lack of quotes for the findstr command. We dont want findstr thinking that %systemroot… etc. was part of the search string

<Edit>
Just as an after thought, if you are sure that the 'dospath=' line is added to every $WINNT$.INF then you can dispense with the IF ERRORLEVEL 0 too!
    DetachedProgram = cmd.exe
    Arguments = "/Q /C FOR /F %? IN ('FINDSTR/I DOSPATH= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (SET %?\&& CALL START /MIN %dospath:\\=\%$OEM$\Detached.cmd)"

</Edit>

This post has been edited by Yzöwl: 04 May 2006 - 03:08 AM


#173 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 04 May 2006 - 09:10 AM

LOL: the 'FINDSTR/I DOSPATH= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF' command is finding ... itself! :D
... because the 'Arguments' line remains in $WINNT$.INF which is a cleaned-up copy of the answer file.
--> So we really have to specify to search at the beginning of the lines.
In facts, we have to double-escape the caret:
^^^^DOSPATH=
Jupiter knows why...

Luckily, while in $WINNT$.INF all other lines are written (in text mode setup) with spaces surrounding the '=' sign and all values (double-)quoted, the very 'dospath' line is added (in GUI mode setup) with no space nor quote:
dospath=C:\$WIN_NT$.~LS
If it were not like this, FOR would only return 'dospath' and not the value.
(Note that there is NEVER any space in the value itself, as the only possible values for dospath are 'X:\' or 'Y:\$WIN_NT$.~LS', X & Y being drive letters, since only a 'temp drive' can be specified for winnt.exe or winnt32.exe).


As you adviced, Yzöwl, I also removed the 'IF ERRORLEVEL 0' as I'm pretty sure the 'dospath' line is ALWAYS added (by Setup?).
And anyway, who cares? If it's not, FOR will NOT DO anything (as FINDSTR is searching the start of the lines for 'dospath=')

So the (temporary?) final version is:
DetachedProgram = cmd.exe
	Arguments = "/Q /C FOR /F %? IN ('FINDSTR/I ^^^^DOSPATH= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (SET %?\&& CALL START /MIN %dospath:\\=\%$OEM$\Detached.cmd)"
*TESTED* @T39, on a local source installation.

Thanks again Yzöwl for the great simplification.

[EDIT]I guess 'FINDSTR/B dospath=' should work as well and is better looking. I'll test it.

This post has been edited by Djé: 04 May 2006 - 05:33 PM


#174 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 05 May 2006 - 10:52 AM

I confirm the new T39-tested final version to be:
DetachedProgram = cmd.exe
	Arguments = "/Q /C FOR /F %? IN ('FINDSTR/B dospath= %SYSTEMROOT%\SYSTEM32\$WINNT$.INF') DO (SET %?\&& CALL START /MIN %dospath:\\=\%Detached.cmd)"
@copy-pasters: please note that my Detached.cmd is no more in $OEM$, just at the root.

#175 User is offline   msy91262 

  • Group: Members
  • Posts: 1
  • Joined: 02-November 05

Posted 07 May 2006 - 04:56 AM

Is there any idea why I have no luck for this method when I use the dvd-rom rather than a cd-rom?

Plz help

#176 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 07 May 2006 - 02:34 PM

View Postmsy91262, on May 7 2006, 12:56 PM, said:

Is there any idea why I have no luck for this method when I use the dvd-rom rather than a cd-rom?

Can you be more specific, please?
What do you mean by 'no luck'??? It's very possible that you don't need any luck to use this method, you know...
What fails? Where? When?
When you talk about cd & dvd, are you mentionning the disc or the drive?
Finally, a rather important question regarding this method: how many drivers do you have? Do you use a dvd because you've got so many of them?
Help us to help you.

#177 User is offline   djackson 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 13-January 05

Posted 22 May 2006 - 02:20 AM

Only just found this method of doing drivers. Running a build now and working well.

On a multiboot DVD, is it possible to only have one instance of the drivers directory in the root of the DVD, instead of having a driver directory in each $OEM$ folder?

this
<ROOT>
>Drivers
>Drivers\LAN
>Drivers\GFX
>XPHOME
>XPHOME\I386
>XPPRO
>XPPRO\I386


instead of this
<ROOT>
>XPHOME
>XPHOME\$OEM$\drivers
>XPHOME\$OEM$\drivers\LAN
>XPHOME\$OEM$\drivers\GFX
>XPHOME\I386
>XPPRO
>XPPRO\$OEM$\drivers
>XPPRO\$OEM$\drivers\LAN
>XPPRO\$OEM$\drivers\GFX
>XPPRO\I386

This post has been edited by djackson: 22 May 2006 - 02:25 AM


#178 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,604
  • Joined: 14-November 03

Posted 22 May 2006 - 04:42 AM

I don't know, though making the image with cdimage it will only include one instance of that directory thus resulting in a much smaller final image than your original source. Give it a try

Cheers
MC.

#179 User is offline   djackson 

  • Newbie
  • Group: Members
  • Posts: 39
  • Joined: 13-January 05

Posted 22 May 2006 - 05:40 AM

@MC

Tried that (with Balder Multiboot) and it works fine. Just that I'm using the latest BtS driver packs and they come to about 520Mb (compressed) for the lot.

When it comes to an AiO DVD (XPpro, XPhome, XPnlite, etc) @ 500+Mb each, takes a bit of time to copy and a lot of time for the app to sort thru all files only to keep one of each. I've been doing it that way for some time, except copying PNP drivers to disk. Just wondering if there is a way to keep one master copy in the root of the DVD. Not an issue if not possible, but never hurts to ask, worst that can happen is I'm no better off than I am now

cheers
Dave

This post has been edited by djackson: 22 May 2006 - 05:42 AM


#180 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 22 May 2006 - 08:18 AM

View Postdjackson, on May 22 2006, 10:20 AM, said:

On a multiboot DVD, is it possible to only have one instance of the drivers directory in the root of the DVD, instead of having a driver directory in each $OEM$ folder?

You may want to give a try to this method of finding the Drivers.cmd from DetachedProgram in winnt.sif.
Just replace 'Detached.cmd' by something like '..\Drivers\Drivers.cmd'
That way you could use any path.
Check the value of 'dospath' in the '\SYSTEM32\$WINNT$.INF' when you install from your multiboot DVD, and adapt from that.

Also, you may want to share the $OEM$ at the root as well by using something like:
OEMFilesPath=..\..\$OEM$
in the [Unattended] section of the different winnt.sif files.

This post has been edited by Djé: 22 May 2006 - 08:25 AM


Share this topic:


  • 12 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy