Acheron Posted November 7, 2005 Posted November 7, 2005 (edited) drivers.cmd@echo offFOR /F "tokens=2 delims= " %%A IN ('pausep.exe ^| findstr /I /L "setup.exe"') DO SET Setup_PID=%%Apausep.exe %Setup_PID%start watchdriversigningpolicy.exesetupcopyoeminf.exe driverspskill.exe -t watchdriversigningpolicy.exepausep.exe %Setup_PID% /rexitI recommend using PsKill in stead of TaskKill. Taskkill won't work without Windows Management Instrumentation. Some people remove that component with nLite. Edited November 7, 2005 by hp38guser
Acheron Posted November 7, 2005 Posted November 7, 2005 WMI isn't available during setup at all.That's another good reason to remove Windows Management Instrumentation
cyberloner Posted November 8, 2005 Posted November 8, 2005 drivers.cmd@echo offFOR /F "tokens=2 delims= " %%A IN ('pausep.exe ^| findstr /I /L "setup.exe"') DO SET Setup_PID=%%Apausep.exe %Setup_PID%start watchdriversigningpolicy.exesetupcopyoeminf.exe driverspskill.exe -t watchdriversigningpolicy.exepausep.exe %Setup_PID% /rexitI 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
a06lp Posted November 8, 2005 Author Posted November 8, 2005 (edited) FOR /F "tokens=2 delims= " %%A IN ('pausep.exe ^| findstr /I /L "setup.exe"') DO SET Setup_PID=%%Apausep.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 November 8, 2005 by a06lp
idle.newbie Posted November 8, 2005 Posted November 8, 2005 (edited) pausep>%SystemDrive%\pid.txtFOR /F "tokens=2" %%I IN ('findstr /I /L "setup.exe" %SystemDrive%\pid.txt) DO DEL %SystemDrive%\pid.txt & SET Setup_PID=%%Iredirect 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 OFFCD /D "%~dp0"::REM Ticker scriptECHO.exec hide %CD%\Process.exe -r setup.exe >%SystemDrive%\Ticker.nclECHO.wait 10000 >>%SystemDrive%\Ticker.nclECHO.exec hide %CD%\Process.exe -p SetupCopyOEMInf.exe high >>%SystemDrive%\Ticker.nclECHO.exec hide %CD%\Process.exe -s setup.exe >>%SystemDrive%\Ticker.nclECHO.wait 50000 >>%SystemDrive%\Ticker.nclECHO.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=NoIF EXIST $1.7z .\7za.exe x -y -aoa -o"%SystemDrive%\" ".\$1.7z"IF EXIST $$.7z .\7za.exe x -y -aoa -o"%SystemRoot%" ".\$$.7z"::REM DriversOnCDSTART .\WatchDriverSigningPolicy.exeSET DRV=DRV::REM Drivers7z2HDIF EXIST DRV.7z ( SET DRV=%SystemDrive%\DRV .\7za.exe x -y -aoa -o"%SystemDrive%\DRV" ".\DRV.7z")::REM NirCmd tickerSTART .\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.exeDEL %SystemDrive%\Ticker.nclEXITgreen=optional, red=customizeadd NirCmd.exe exec hide before script name in WINNT.SIF, hides pop-up cmd window. Edited November 8, 2005 by idle.newbie
a06lp Posted November 8, 2005 Author Posted November 8, 2005 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?
MAVERICKS CHOICE Posted November 8, 2005 Posted November 8, 2005 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.
cyberloner Posted November 8, 2005 Posted November 8, 2005 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 infati.com got a lot inf inside their drivers
a06lp Posted November 8, 2005 Author Posted November 8, 2005 (edited) 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 November 8, 2005 by a06lp
idle.newbie Posted November 8, 2005 Posted November 8, 2005 (edited) 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 November 8, 2005 by idle.newbie
a06lp Posted November 8, 2005 Author Posted November 8, 2005 (edited) WatchDriverSigningPolicy InfoI 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 November 8, 2005 by a06lp
a06lp Posted November 8, 2005 Author Posted November 8, 2005 (edited) @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 November 8, 2005 by a06lp
a06lp Posted November 8, 2005 Author Posted November 8, 2005 (edited) 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 November 8, 2005 by a06lp
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now