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

#101
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts

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)


How to remove advertisement from MSFN

#102
cyberloner

cyberloner

    CyberMania.ws

  • Member
  • PipPipPipPip
  • 535 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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, 07 November 2005 - 12:55 PM.

CyberMania
AMD FX 8350 Vishera | Scythe Ninja 2 | ASUS M5A97 LE R2.0 | Micron VALUE DDR3 2X 4GB 1333MHZ (OC 1866MHZ) | SAPPHIRE HD7770 | 27" Samsung P2770H | 2X WD 2TB Black | CM iGreen Power 600W | Klipsch ProMedia GMX A-2.1 | X-FI Titanium | CM ELITE 430

#103
X-Savior

X-Savior

    Member

  • Member
  • PipPip
  • 124 posts
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:
EVGA 680I MB, Intel Core 2 Duo 6600 @ 3.5 Ghz, 2 x EVGA 7800 GTX (256 MB) PCI-E (SLI Configuration), Sound Blaster X-FI Music, 4 GB (4x 1024MB) OCZ PC-2 6400 Gold XTC Memory, 2 x Raptor 74 Gb RAID-0, 2 x Seagate 500 GB SATA (1TB RAID), Dell 24" Widescreen LCD Panel & Dell 22" Widescreen LCD Panel (Dual View), Pioneer DVD-RW, Zalman 9500-Cu CPU Cooler, Antec Sonata II Case.

#104
Acheron

Acheron

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 988 posts
  • OS:XP Pro x86
  • Country: Country Flag
Meaby it's PsSuspend related. Try using PauseP as described here please.
Say no to bloatware. Download Nero Lite!

#105
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts

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, 07 November 2005 - 01:41 PM.


#106
Acheron

Acheron

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 988 posts
  • OS:XP Pro x86
  • Country: Country Flag
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, 07 November 2005 - 03:34 PM.

Say no to bloatware. Download Nero Lite!

#107
RogueSpear

RogueSpear

    OS: SimplyMEPIS

  • MSFN Sponsor
  • 1,529 posts
WMI isn't available during setup at all.

#108
Acheron

Acheron

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 988 posts
  • OS:XP Pro x86
  • Country: Country Flag

WMI isn't available during setup at all.


That's another good reason to remove Windows Management Instrumentation
Say no to bloatware. Download Nero Lite!

#109
cyberloner

cyberloner

    CyberMania.ws

  • Member
  • PipPipPipPip
  • 535 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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
CyberMania
AMD FX 8350 Vishera | Scythe Ninja 2 | ASUS M5A97 LE R2.0 | Micron VALUE DDR3 2X 4GB 1333MHZ (OC 1866MHZ) | SAPPHIRE HD7770 | 27" Samsung P2770H | 2X WD 2TB Black | CM iGreen Power 600W | Klipsch ProMedia GMX A-2.1 | X-FI Titanium | CM ELITE 430

#110
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts
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, 07 November 2005 - 08:22 PM.


#111
idle.newbie

idle.newbie

    Junior

  • Member
  • Pip
  • 93 posts
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, 08 November 2005 - 07:39 AM.


#112
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts

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?

#113
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Member
  • PipPipPipPipPipPipPip
  • 1,765 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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.

#114
cyberloner

cyberloner

    CyberMania.ws

  • Member
  • PipPipPipPip
  • 535 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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
CyberMania
AMD FX 8350 Vishera | Scythe Ninja 2 | ASUS M5A97 LE R2.0 | Micron VALUE DDR3 2X 4GB 1333MHZ (OC 1866MHZ) | SAPPHIRE HD7770 | 27" Samsung P2770H | 2X WD 2TB Black | CM iGreen Power 600W | Klipsch ProMedia GMX A-2.1 | X-FI Titanium | CM ELITE 430

#115
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts

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, 08 November 2005 - 08:06 AM.


#116
idle.newbie

idle.newbie

    Junior

  • Member
  • Pip
  • 93 posts
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, 08 November 2005 - 08:49 AM.


#117
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts
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, 08 November 2005 - 11:27 AM.


#118
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts
@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, 08 November 2005 - 11:44 AM.


#119
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts
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, 08 November 2005 - 02:55 PM.


#120
cyberloner

cyberloner

    CyberMania.ws

  • Member
  • PipPipPipPip
  • 535 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Hope u success...
CyberMania
AMD FX 8350 Vishera | Scythe Ninja 2 | ASUS M5A97 LE R2.0 | Micron VALUE DDR3 2X 4GB 1333MHZ (OC 1866MHZ) | SAPPHIRE HD7770 | 27" Samsung P2770H | 2X WD 2TB Black | CM iGreen Power 600W | Klipsch ProMedia GMX A-2.1 | X-FI Titanium | CM ELITE 430

#121
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts
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

Attached Files


Edited by a06lp, 08 November 2005 - 02:03 PM.


#122
Acheron

Acheron

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 988 posts
  • OS:XP Pro x86
  • Country: Country Flag

@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
Say no to bloatware. Download Nero Lite!

#123
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts

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.

#124
Acheron

Acheron

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 988 posts
  • OS:XP Pro x86
  • Country: Country Flag
This method is still a big workaround. Does Pyron has any idea about what's happening?

Edited by hp38guser, 08 November 2005 - 04:24 PM.

Say no to bloatware. Download Nero Lite!

#125
a06lp

a06lp

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 976 posts

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN