• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
a06lp

Drivers from CD: Simple Method

227 posts in this topic

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

0

Share this post


Link to post
Share on other sites

Hi..its like dis..i already have da drivers pack of Bâshrat the Sneaky's DriverPacks and i extracte4d dem and wat appears is da image inn da attachment..xD

post-88209-1140174157_thumb.jpg

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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

Thanks!

0

Share this post


Link to post
Share on other sites
Outstanding work! This method is fast, easy, and effective. It works great with HFSLIP.

Thanks!

Glad to hear! :thumbup

0

Share this post


Link to post
Share on other sites

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

OK RESOLVED

Edited by Unlock
0

Share this post


Link to post
Share on other sites
I've problem.....My pc reboot always after the copy of the files of windows

OK RESOLVED

:blink::blink:

...ok

0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites
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

0

Share this post


Link to post
Share on other sites

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

Joc

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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é
0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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=

Edited by Djé
0

Share this post


Link to post
Share on other sites

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 Yzöwl
0

Share this post


Link to post
Share on other sites

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.

Edited by Djé
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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.