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.
Quote
@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.
This post has been edited by idle.newbie: 08 November 2005 - 07:39 AM