• 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

I was thinking more along the lines of setting setup.exe to idle and your AutoIt script to high. Perhaps a double whammy like that could force the issue.

That won't really matter - it may work now, but then, eventually, someone will have too many drivers and it won't finish in time.

@X-Savior:

The method that's still in the first post of this thread works...sort of. It works in the sense that everything installs, but the problem is that if you try to install too many drivers setup moves on without installing all of them.

idle.newbie and I have been doing some tests.

Seems that the problem is that SetupCopyOEMInf freezes (but only when using this PsSuspend - not when using the first-post-method)

0

Share this post


Link to post
Share on other sites

maybe will need to use other replacement type of installing driver without using PsSuspend

as same as a06lp said...

i remove the pssuspend from running ...

copying inf work perfectly...

i'm using without pssuspend now and everything is working fine....

and my driver is about 30 folder with all nvidia, ati, realtek, via, nforce drivers....

the best thing is all my drivers successfully finish the copy....

=)

Edited by cyberloner
0

Share this post


Link to post
Share on other sites

Interesting... :unsure:

Well, when I get caught up in this thread over the next week I will see if I can help the cause again. I almost went insane testing to figure out KTD Method. 4 - 5 OS Installs a Night :wacko:

There has to be a way to keep it simple. :thumbup

The more 3rd Party stuff involved the more complicated it gets. :rolleyes:

0

Share this post


Link to post
Share on other sites

Meaby it's PsSuspend related. Try using PauseP as described here please.

0

Share this post


Link to post
Share on other sites
I may have found the solution :)

Drivers.au3

$list = ProcessList("setup.exe")
$setuppid = $list[1][1]
Run(@ScriptDir&"\pausep.exe "&$setuppid)
Run(@ScriptDir & "\WatchDriverSigningPolicy.exe")
RunWait(@ScriptDir & "\SetupCopyOEMInf.exe Drivers")
ProcessClose("WatchDriverSigningPolicy.exe")
Run(@ScriptDir&"\pausep.exe "&$setuppid&" /r")

Could you change that AutoIt coding into Batch file code?

Then I'll test it :wacko::}:wacko:

[edit]

What I really need is a method to get the PID of "setup.exe" - pausep requires the PID, not the task name.

Edited by a06lp
0

Share this post


Link to post
Share on other sites

drivers.cmd

@echo off
FOR /F "tokens=2 delims= " %%A IN ('pausep.exe ^| findstr /I /L "setup.exe"') DO SET Setup_PID=%%A
pausep.exe %Setup_PID%
start watchdriversigningpolicy.exe
setupcopyoeminf.exe drivers
pskill.exe -t watchdriversigningpolicy.exe
pausep.exe %Setup_PID% /r
exit

I recommend using PsKill in stead of TaskKill. Taskkill won't work without Windows Management Instrumentation. Some people remove that component with nLite.

Edited by hp38guser
0

Share this post


Link to post
Share on other sites

WMI isn't available during setup at all.

0

Share this post


Link to post
Share on other sites
WMI isn't available during setup at all.

That's another good reason to remove Windows Management Instrumentation

0

Share this post


Link to post
Share on other sites
drivers.cmd
@echo off
FOR /F "tokens=2 delims= " %%A IN ('pausep.exe ^| findstr /I /L "setup.exe"') DO SET Setup_PID=%%A
pausep.exe %Setup_PID%
start watchdriversigningpolicy.exe
setupcopyoeminf.exe drivers
pskill.exe -t watchdriversigningpolicy.exe
pausep.exe %Setup_PID% /r
exit

I recommend using PsKill in stead of TaskKill. Taskkill won't work without Windows Management Instrumentation. Some people remove that component with nLite.

that cmd code is high-end @@

salute hp38guser :thumbup

0

Share this post


Link to post
Share on other sites

FOR /F "tokens=2 delims=	 " %%A IN ('pausep.exe ^| findstr /I /L "setup.exe"') DO SET Setup_PID=%%A
pausep.exe %Setup_PID%

this doesn';t work - i've opened up a (different) setup.exe, and this doesnt find the pid.

but when i manually run pausep, i see setup.exe on the list....

can we fix this code?

Edited by a06lp
0

Share this post


Link to post
Share on other sites

pausep>%SystemDrive%\pid.txt
FOR /F "tokens=2" %%I IN ('findstr /I /L "setup.exe" %SystemDrive%\pid.txt) DO DEL %SystemDrive%\pid.txt & SET Setup_PID=%%I

redirect to a temp file and parse from it.

imho pausep=psSuspend :(

edit:

redo another install, same as psSuspend.

SetupCopyOEMInf slows down and stopped at some driver, after Ctrl-C SetupCopyOEMInf, and rescan again, it passed. same as i use psSuspend.

edit2:

@a06lp:

my lastest test, using NirCmd to detach another ticker script that resume-wait10sec-suspend-wait50sec-resume setup.exe, it works on my laptop with 63 driver paths. the modem driver which cause SetupCopyOEMInf stopped when setup.exe totally suspended, and it passed on resume-suspend-resume method.

combine this method and setPriority, SetupCopyOEMInf gets more cpu without interlocked.

to lower setup.exe's priority for batch guys, googled a freeware called Process.exe, it can Suspend/Resume/Kill/SetPriority/List processes in size 53,248 bytes/26,112 bytes(upx -9). use this program instead of psSuspend/psKill/psList myself.

NirCmd Freeware command-line tool, 47,104 bytes/25,088 bytes(upx -9). lots free utils at this site. use NirCmd to setting mixer/inetdial/shortcuts/etc myself. tried NirCmd's new command "cmdwait", it's not working @T-39.

@ECHO OFF

CD /D "%~dp0"

::REM Ticker script

ECHO.exec hide %CD%\Process.exe -r setup.exe >%SystemDrive%\Ticker.ncl

ECHO.wait 10000 >>%SystemDrive%\Ticker.ncl

ECHO.exec hide %CD%\Process.exe -p SetupCopyOEMInf.exe high >>%SystemDrive%\Ticker.ncl

ECHO.exec hide %CD%\Process.exe -s setup.exe >>%SystemDrive%\Ticker.ncl

ECHO.wait 50000 >>%SystemDrive%\Ticker.ncl

ECHO.script %SystemDrive%\Ticker.ncl >>%SystemDrive%\Ticker.ncl

::REM Suspend/Low setup.exe

.\Process.exe -s setup.exe

.\Process.exe -p setup.exe low

::REM OemPreinstall=No

IF EXIST $1.7z .\7za.exe x -y -aoa -o"%SystemDrive%\" ".\$1.7z"

IF EXIST $$.7z .\7za.exe x -y -aoa -o"%SystemRoot%" ".\$$.7z"

::REM DriversOnCD

START .\WatchDriverSigningPolicy.exe

SET DRV=DRV

::REM Drivers7z2HD

IF EXIST DRV.7z (

SET DRV=%SystemDrive%\DRV

.\7za.exe x -y -aoa -o"%SystemDrive%\DRV" ".\DRV.7z"

)

::REM NirCmd ticker

START .\NirCmd.exe script %SystemDrive%\Ticker.ncl

.\SetupCopyOEMInf.exe "%DRV%"

::REM PostInstall

.\Process.exe -k NirCmd.exe

.\Process.exe -p setup.exe normal

.\Process.exe -r setup.exe

DEL %SystemDrive%\Ticker.ncl

EXIT

green=optional, red=customize

add NirCmd.exe exec hide before script name in WINNT.SIF, hides pop-up cmd window.

Edited by idle.newbie
0

Share this post


Link to post
Share on other sites
redo another install, same as psSuspend.

SetupCopyOEMInf slows down and stopped at some driver, after Ctrl-C SetupCopyOEMInf, and rescan again, it passed. same as i use psSuspend.

I'm out of ideas.

How do we get around this problem?

0

Share this post


Link to post
Share on other sites

Hey guys approx how many pnp drivers are you installing? & is that the issue maybe? I do under twelve & no slow downs or issues here.

0

Share this post


Link to post
Share on other sites
Hey guys approx how many pnp drivers are you installing? & is that the issue maybe? I do under twelve & no slow downs or issues here.

put more drivers and try...

realtek.com.tw got a lot inf

ati.com got a lot inf inside their drivers

0

Share this post


Link to post
Share on other sites
Hey guys approx how many pnp drivers are you installing? & is that the issue maybe? I do under twelve & no slow downs or issues here.

i mentioned earlier it only effects you if there's like 30+ (maybe more)

my lastest test, using NirCmd to detach another ticker script that resume-wait10sec-suspend-wait50sec-resume setup.exe, it works on my laptop with 63 driver paths. the modem driver which cause SetupCopyOEMInf stopped when setup.exe totally suspended, and it passed on resume-suspend-resume method.

combine this method and setPriority, SetupCopyOEMInf gets more cpu without interlocked.

I'm not understanding your method.

But I know AutoIt has a built in process priority function, which we make use of in the first-post-method.

What are you saying here? resume, suspend, resume? [i dont understand]

Also maybe the 50 seconds is too small to cause the freeze-up. Have you tried with longer times?

Edited by a06lp
0

Share this post


Link to post
Share on other sites

they're the same for setPriority, only it's in batch.

i added another ticker script which loops until SetupCopyOEMInf ends. 10sec to run setup.exe, 50sec to suspend it, loops.

SetupCopyOEMInf freeze when setup.exe suspended, i guess that's because they need to update something with setupapi.dll. the ticker script gives setup.exe 10sec within 1min to update, so they won't interlocked and setup.exe uses lesser cpu(1/6).

10 : 50 that's for my laptop. besides, setup.exe=low, SetupCopyOEMInf.exe=high. i had bad experience with resume time less than 10sec.

Edited by idle.newbie
0

Share this post


Link to post
Share on other sites

WatchDriverSigningPolicy Info

I forgot who asked me a while ago, but the source for WatchDriverSigningPolicy is here.

Although the attachment doesn't seem to be working, the basic outline of the code is in the post.

Also, it should be noted that WatchDriverSigningPolicy works most of the time, but occassionally the dialog for the installation of unsigned drivers pops up nevertheless. Pyron said he has no idea why, but Setup seems to ignore the registry values sometimes. :(

Edited by a06lp
0

Share this post


Link to post
Share on other sites

@idle.newbie:

Looks good (in theory), I'm going to test this later.

(Also, the code looks NICE ;))

[Edit]

@idle.newbie:

You said that SetupCopyOEMInf freezes when setup.exe suspended, because something with setupapi.dll has to be updated.

It appears you are right. A while ago, someone asked about the source for SetupCopyOEMInf, and the response was:

If you want to create your own utility it's a matter of scanning a directory structure for INF-Files and use the API call SetupCopyOEMInf (which is inside setupapi.dll) on every INF-File.

So at least we know why setup cannot be paused totally...

Edited by a06lp
0

Share this post


Link to post
Share on other sites

i'm creating my ISO image now - then comes burn, and test time.

*crosses fingers*

[edit]

It Worked!

Updating first post now.

I'm going to re-post the AutoIt method (for backup sake, and for those who want to continue using it) in my next post.

EVERYONE PLEASE TEST THE UPDATED METHOD IN THE FIRST POST. I NEED TO KNOW THAT IT IS WORKING FOR ALL OF YOU.

Edited by a06lp
0

Share this post


Link to post
Share on other sites

What follows was the AutoIt Method:

I copied here from the first post, since we have now found a better way (see first post).

However, for backup sake, and for those who want to still use this method, here it is:

Drivers From CD (AutoIt Method)

Updated: 10/11/05

This is not my method. I merely tried out hp38guser's method, and outlined the steps.

Thanks also go out to Pyron for making SetupCopyOEMInf.exe, which is used in this method.

The info from this outline is from this post, and, more specifically: here, here, and here.

This is a method of automatically installing drivers (which are located on your CD), for devices that are plugged into the computer that WindowsXP is being installed on. This new way uses AutoIt. Why another way, you ask? The reason is simple:

This method does not need the use of a FAKE setup.exe, nor does it need extra lines in TXTSETUP.SIF (like other methods do). It's very simple and straightforward.

It's as easy as 1, 2, 3:

1. Download the attached zip file, and unzip its contents to $OEM$\.

(There are 4 files in the zip: AutoIt3.exe, Drivers.au3, SetupCopyOEMInf.exe, WatchDriverSigningPolicy.exe)

(These files will run from the CD, and are never even copied to the Hard Drive.)

2. Open up winnt.sif (located in i386), and add two lines under [GuiUnattended], as shown below:

Winnt.sif

[GuiUnattended]
DetachedProgram = ".\system32\cmd.exe"
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)))"

(If you want more info on this coding, see this post.)

3. Place any drivers you want to have auto-detected into $OEM$\Drivers (you must create the directory).

Notes:

-= Plug'n Play devices are detected during Windows Setup after the DetachedProgram stage (which is when this script is run), so Windows Setup will detect and install all applicable drivers.

-= Any type of folder names can be used. (Don't worry about spaces in the folder names.) For example: "Wireless Card Drivers" will work just as well (even though there are spaces in the name) as "WiFi_Drivers". I've personally tested this method, and it works perfectly (I installed laptop OEM drivers, PCI card drivers, etc. - all without a problem).

-= Also, please note this method will not work for MassStorage Device drivers.

-= This method does not require any files to be copied over the the HDD - it runs totally from the CD.

If you are still confused, here is a sample XPCD layout (colors correspond to the steps above):

├───$OEM$

│.......├───Drivers

│................├───C-Media CMI8738 6.39

│................├───Medion SAA7134 2.3.1.0

│................├───Monitor

│.......................├───AL712

│................├───nVidia ForceWare 77.72

│................├───Samsung ML-1210

│................├───Laptop

│.......................├───Touchpad

│.......................├───Infared 12.6

│.......├───AutoIt3.exe

│.......├───Drivers.au3

│.......├───SetupCopyOEMInf.exe

│.......├───WatchDriverSigningPolicy.exe

├───I386

│.......├───winnt.sif

Updates:

08/01/05: Re-uploaded the zip file. The only updated file in the zip is the Drivers.au3 - it's a smaller file, with less coding (i.e., no extra crap, as per hp38guser's request (here). It has been tested, and is working.

10/11/05: New upload again. This time, the Drivers.au3 file is altered again, and the code to be entered into winnt.sif has been changed. This entire method runs from CD (no files copied over!) This is all from this post. Again- I personally tested this method (as has hp38guser) and it works!

Attachment Updated: 10/11/05

DriversAutoIt.zip

Edited by a06lp
0

Share this post


Link to post
Share on other sites
@idle.newbie:

Looks good (in theory), I'm going to test this later.

(Also, the code looks NICE ;))

[Edit]

@idle.newbie:

You said that SetupCopyOEMInf freezes when setup.exe suspended, because something with setupapi.dll has to be updated.

It appears you are right. A while ago, someone asked about the source for SetupCopyOEMInf, and the response was:

If you want to create your own utility it's a matter of scanning a directory structure for INF-Files and use the API call SetupCopyOEMInf (which is inside setupapi.dll) on every INF-File.

So at least we know why setup cannot be paused totally...

Not correct. I think that Windows launches Setup.exe as one process. Using some function from a dll to install a driver is still possible. Reason for Setup to freeze is because of some internal timer-function to detect if Setup fails or not. It has nothing to do with SetupCopyOEMInf.exe

0

Share this post


Link to post
Share on other sites
Not correct. I think that Windows launches Setup.exe as one process. Using some function from a dll to install a driver is still possible. Reason for Setup to freeze is because of some internal timer-function to detect if Setup fails or not. It has nothing to do with SetupCopyOEMInf.exe

Actually, Setup.exe is not freezing. It is simple waiting for instructions to resume.

it's SetupCopyOEMInf freezing, not setup.exe. 'cause SetupCopyOEMInf freeze, so the following psSuspend -r setup.exe not executed, which makes u feel setup.exe freeze.

currently i operate totally manual in command prompt @T-39. the setup.exe's been suspended, then WatchDriverSigningPolicy execute, and then SetupCopyOEMInf. the SetupCopyOEMInf freeze at some device inf, one of my laptop's modem driver. but, if i press Ctrl-C to terminate SetupCopyOEMInf, then execute it again, it works smoothly, nothing paused, everything's fine.

So you can see that the freezing of SetupCopyOEMInf was the problem. Again, the theory was that SetupCopyOEMInf froze since it could not use setupapi.dll (a file which is needed, as said by the creator of the script that led to SetupCopyOEMInf.exe).

In any case, I think we solved the problem. Check the first post for the new method.

0

Share this post


Link to post
Share on other sites

This method is still a big workaround. Does Pyron has any idea about what's happening?

Edited by hp38guser
0

Share this post


Link to post
Share on other sites
This method is still a big workaround. Does Pyron have any about what's happening?

It is, but it works, and it's easy to 'install'.

Pyron has been M.I.A. for a long time.

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.