parsons 寫:有沒有人認為需要做一個完全不用 PECMD.EXE 的版本 ?
沒有PECMD.EXE是有少許不便,但並非大不了的問題。假如有人有興趣和時間,我很鼓勵他或她做一個完全不用 PECMD.EXE 的版本。我覺得現時很多人過份依賴PECMD.EXE,甚或形容它爲PE的靈魂,都是言過其實之說。
nu888 寫:x64 版本便是 "完全不用 PECMD.EXE 的版本", 連上內網也不行!
更正 :
可上內網, 不過要手動 "安裝網卡驅動".
要自動應該不難,可以在winpeshl.ini下功夫。如下所示,目前x64的winpeshl.ini裡面我只加了我自己的網卡:
7-Win7peAdvConfig.script
[pre-Process]
...
Echo,"Writing winpeshl.ini..."
If,ExistFile,"%TargetDir%\windows\system32\winpeshl.ini",FileDelete,"%TargetDir%\windows\system32\winpeshl.ini"
If,NotExistFile,"%TargetDir%\windows\system32\winpeshl.ini",FileCreateBlank,"%TargetDir%\windows\system32\winpeshl.ini"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","[LaunchApps]","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qSetResolution.exe#$s-hide#$s-r1024x768#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qdrvload.exe#$sx:\windows\inf\nete1g3e.inf#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qdrvload.exe#$sx:\windows\inf\nete1e3e.inf#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qdrvload.exe#$sx:\windows\inf\netrtx64.inf#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qdrvload.exe#$sx:\windows\inf\netrtl64.inf#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","wpeinit.exe","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","x:\windows\explorer.exe","Append"
可以嘗試這樣改:
[pre-Process]
...
Echo,"Writing winpeshl.ini..."
If,ExistFile,"%TargetDir%\windows\system32\winpeshl.ini",FileDelete,"%TargetDir%\windows\system32\winpeshl.ini"
If,NotExistFile,"%TargetDir%\windows\system32\winpeshl.ini",FileCreateBlank,"%TargetDir%\windows\system32\winpeshl.ini"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","[LaunchApps]","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qSetResolution.exe#$s-hide#$s-r1024x768#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","#$qcmd.exe#$s/c#$sx:\windows\system32\startnet.cmd#$q","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","wpeinit.exe","Append"
TXTAddLine,"%TargetDir%\windows\system32\winpeshl.ini","x:\windows\explorer.exe","Append"
然後在startnet.cmd裡面寫:
FOR /R X:\WINDOWS\INF\ %%G IN (net*.inf) DO drvload.exe %%G
(上面建議未經验证,请自行试一下。)

