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

Drivers from CD: Simple Method

* * * * * 1 votes

  • Please log in to reply
221 replies to this topic

#151
tom9191

tom9191
  • Members
  • 6 posts
Hi.
im new to this forum and this is my first post..
so..
here comes my doubt..its like dis
i donwloaded da driver pack and i extracted dem but it appears as d/c/1/... etc..
is it suppose to be like dis?? am i suppose to do anything more??
thnx ahead..


How to remove advertisement from MSFN

#152
5eraph

5eraph

    Update Packrat

  • MSFN Sponsor
  • 1,105 posts
  • OS:XP Pro x64
  • Country: Country Flag

Donator

@tom9191:

You need DriverPacks_BASE to make any of the other DriverPacks work.

#153
tom9191

tom9191
  • Members
  • 6 posts
Hi..its like dis..i already have da drivers pack of Bshrat the Sneaky's DriverPacks and i extracte4d dem and wat appears is da image inn da attachment..xD

Attached Files



#154
5eraph

5eraph

    Update Packrat

  • MSFN Sponsor
  • 1,105 posts
  • OS:XP Pro x64
  • Country: Country Flag

Donator

You shouldn't extract anything; DriverPacks_BASE.exe does all the work for you. Just run BASE and follow the instructions.

#155
tain

tain

    Cyber Ops

  • Super Moderator
  • 3,674 posts
  • OS:none specified
  • Country: Country Flag

Donator

Outstanding work! This method is fast, easy, and effective. It works great with HFSLIP.

Thanks!

#156
a06lp

a06lp

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 976 posts

Outstanding work! This method is fast, easy, and effective. It works great with HFSLIP.

Thanks!


Glad to hear! :thumbup

#157
Unlock

Unlock

    Newbie

  • Members
  • 27 posts
I've problem.....My pc reboot always after the copy of the files of windows

OK RESOLVED

Edited by Unlock, 01 March 2006 - 06:13 AM.


#158
a06lp

a06lp

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 976 posts

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

OK RESOLVED

:blink: :blink:

...ok

#159
Unlock

Unlock

    Newbie

  • Members
  • 27 posts
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?

#160
tain

tain

    Cyber Ops

  • Super Moderator
  • 3,674 posts
  • OS:none specified
  • Country: Country Flag

Donator

This would be cool as an addon pack. Has anyone tried to build one yet?

#161
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Members
  • PipPipPipPipPipPipPip
  • 1,754 posts
  • OS:Windows 7 x64
  • Country: Country Flag


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
Joc

Joc

    Junior

  • Members
  • Pip
  • 91 posts

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
Joc

Joc

    Junior

  • Members
  • Pip
  • 91 posts
Solved the BSoD 0x7e: everything is working correctly with Forceware 77.72!

Joc

#164
Unlock

Unlock

    Newbie

  • Members
  • 27 posts
ok canghe forceware 8 wiht 77.72.......where found it?

#165
Dj

Dj

    accent artist

  • Members
  • PipPipPip
  • 359 posts
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:

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)))"

* 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

DetachedProgram = cmd.exe
Arguments = "/Q /C START /MIN %SYSTEMDRIVE%\Drivers.cmd"

3- Modify Drivers.cmd to find the exact source folder at the beginning and to remove itself at the end:

Drivers.cmd

CLS
@ECHO OFF
TITLE Drivers-from-CD Installation
color 1F
:: Set Current Drive as CD
CD /D "%~dp0"

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

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

Edited by Dj, 02 May 2006 - 08:54 AM.


#166
carter8189

carter8189

    Newbie

  • Members
  • 14 posts
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
a06lp

a06lp

    Friend of MSFN

  • Members
  • PipPipPipPipPip
  • 976 posts

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
Dj

Dj

    accent artist

  • Members
  • PipPipPip
  • 359 posts

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
Yzwl

Yzwl

    Wise Owl

  • Super Moderator
  • 4,506 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

@ 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
Dj

Dj

    accent artist

  • Members
  • PipPipPip
  • 359 posts
: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))"

Edited by Dj, 04 May 2006 - 09:19 AM.


#171
Dj

Dj

    accent artist

  • Members
  • PipPipPip
  • 359 posts
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 Yzwl.

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

@Yzwl, 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=

Edited by Dj, 04 May 2006 - 09:21 AM.


#172
Yzwl

Yzwl

    Wise Owl

  • Super Moderator
  • 4,506 posts
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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>

Edited by Yzwl, 04 May 2006 - 03:08 AM.


#173
Dj

Dj

    accent artist

  • Members
  • PipPipPip
  • 359 posts
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, Yzwl, 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 Yzwl for the great simplification.

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

Edited by Dj, 04 May 2006 - 05:33 PM.


#174
Dj

Dj

    accent artist

  • Members
  • PipPipPip
  • 359 posts
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
msy91262

msy91262
  • Members
  • 1 posts
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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN