Jump to content











Photo
- - - - -

Problem with multiple Network drivers

win7pese network drivers penetwork

Best Answer steve6375 , 18 October 2014 - 04:27 PM

I had this problem many years ago. This is how  I solved it

https://sites.google...scripts/drvload

Go to the full post


  • Please log in to reply
6 replies to this topic

#1 karaktaka

karaktaka
  • Members
  • 4 posts
  • Location:Cologne
  •  
    Germany

Posted 17 October 2014 - 10:32 AM

Hi,

 

im trying to integrate multiple network drivers for different hardware into my win7pe image. I tried to integrate them via the "add drivers" option of PEnetwork and also with the "driver integration" of win7pese. Unfortunately it is not possible to integrate all the drivers at the same time. If i integrate an intel nic driver "Network_Driver_DGHKG_WN_18.7.0.0_A05.EXE" for "Intel I2xx/825xx 10/100/1000 Ethernet" it is not possible to operate other network hardware properly. I'm always getting the error, that "there is still another driver loaded and windows needs to be rebootet". So in fact windows loads the "wrong" driver first and after that finds the "right" driver and loads it, but fails to start the device properly.

 

Is there any proper way to integrate multiple drivers into pe or dynamically load those drivers at system boot?

 

Thanks for your help



#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 6462 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 18 October 2014 - 04:27 PM   Best Answer

I had this problem many years ago. This is how  I solved it

https://sites.google...scripts/drvload



#3 karaktaka

karaktaka
  • Members
  • 4 posts
  • Location:Cologne
  •  
    Germany

Posted 27 October 2014 - 10:28 AM

Hi,

 

thanks for your reply. Unfortunately i hadn't time to test this yet, but i'll tell you if it works or not.



#4 karaktaka

karaktaka
  • Members
  • 4 posts
  • Location:Cologne
  •  
    Germany

Posted 30 October 2014 - 09:42 AM

Hi,

 

thanks for this solution. It's working like a charm. I had to resolve some problem with the windows firewall and so on. As an example i still have to load the binary for penetwork, but don't need to start it. After your script loads i need to "renew" the network interface and afterwards start the firewall to allow incoming connections. Otherwise i only got outgoing network traffic, but no incoming.

 

Thanks



#5 steve6375

steve6375

    Platinum Member

  • Developer
  • 6462 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 30 October 2014 - 09:55 AM

Can you give some details so that I can add it to the article page?

Maybe it will help others.



#6 karaktaka

karaktaka
  • Members
  • 4 posts
  • Location:Cologne
  •  
    Germany

Posted 30 October 2014 - 10:25 AM

Sure. I don't know if all the changes are necessary, because i played a bit with some functions.

 

Change startnet.cmd

echo restart network...
x:\windows\system32\netcfg -winpe
wpeinit -unattend=x:\windows\system32\unattend.xml
@echo.
@echo.

echo wait 10 seconds...
@ping -n 10 -w 1000 127.0.0.1 > nul

ipconfig /renew

It's necessary to add the following line either to the startnet.cmd script or another script which is loading startnet.cmd

sc config mpssvc start= demand
net start mpssvc

Also you don't have to use "x:\windows\system32\wpeutil.exe Initializenetwork". It just fails in my scenario.

 

I'm using Win7PE_SE to build my recovery system. I'm attaching my documentary, it's in german, but maybe you can still use it.

 

https://www.dropbox....y_PE31.pdf?dl=0

 

tl;dr

@echo off

echo Initialize recovery environment...

start /wait X:\Windows\System32\startnet.cmd

echo wait 10 seconds...
@ping -n 10 -w 1000 127.0.0.1 > nul

start /wait X:\Windows\System32\vncpass.cmd

sc config mpssvc start= demand
net start mpssvc

RMDIR /S /Q X:\logs
del %windir%\System32\vncpass.cmd
del %windir%\System32\vnc.reg
del %windir%\System32\getnics.vbs
del %windir%\System32\wget.vbs
del %windir%\System32\unattend.xml

exit
@echo off
REM \windows\system32\startnet.cmd

echo Getting PCI IDs of Network adapters...
cscript /nologo getnics.vbs > nics.cmd
REM type nics.cmd
call nics.cmd > nul

REM example nics.cmd file contents shown below:
REM SET SHORT_NET1=PCI\VEN_8086&DEV_10C0
REM SET LONG_NET1=PCI\VEN_8086&DEV_10C0&SUBSYS_020D1028
REM SET LONGREV_NET1=PCI\VEN_8086&DEV_10C0&SUBSYS_020D1028&REV_02
REM SET SHORT_NET2=PCI\VEN_8086&DEV_10C0
REM SET LONG_NET2=PCI\VEN_8086&DEV_10C0&SUBSYS_020D1028
REM SET LONGREV_NET2=PCI\VEN_8086&DEV_10C0&SUBSYS_020D1028&REV_02

@echo Looking for \DRIVERS\DRIVERS.TAG file...
@for %%I in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist %%I:\DRIVERS\DRIVERS.TAG SET DRV=%%I
@if NOT "%DRV%"=="" (
@echo FOUND DRIVERS.TAG file in %DRV%, now loading drivers...
SET DRVA=
SET DRVB=
SET DRVC=
@for /D %%P in (%DRV%:\DRIVERS\*.*) do @for %%I in ("%%~fP\*.inf") do call :TESTINF %%~fI
)

@echo BEST MATCH=%DRVA%, NEXT MATCH=%DRVB%, LAST MATCH=%DRVC%

IF @%DRVA%%DRVB%%DRVC%==@ (
@Echo.
@ECHO **** WARNING: NO SUITABLE DRIVER FOUND - LOADING ALL DRIVERS! ****
@Echo.
@for /D %%P in (%DRV%:\DRIVERS\*.*) do @for %%I in ("%%~fP\*.inf") do drvload %%~fI
)

if NOT @%DRVA%==@ (
@ECHO LOADING %DRVA%...
DRVLOAD %DRVA%
if not errorlevel 1 (
SET DRVB=
SET DRVC=
)

)

if NOT @%DRVB%==@ (
@ECHO LOADING %DRVB%...
DRVLOAD %DRVB%
if not errorlevel 1 SET DRVC=
)

if NOT @%DRVC%==@ (
@ECHO LOADING %DRVC%...
DRVLOAD %DRVC%
)


echo restart network...
x:\windows\system32\netcfg -winpe
wpeinit -unattend=x:\windows\system32\unattend.xml
@echo.
@echo.

echo wait 10 seconds...
@ping -n 10 -w 1000 127.0.0.1 > nul

ipconfig /renew
GOTO :EXITPROGRAM

:TESTINF
SET FNAME=%1
IF NOT EXIST %FNAME% goto :EOF
SET LONGREV_NET=%LONGREV_NET1%
SET LONG_NET=%LONG_NET1%
SET SHORT_NET=%SHORT_NET1%
call :TESTINF1
SET LONGREV_NET=%LONGREV_NET2%
SET LONG_NET=%LONG_NET2%
SET SHORT_NET=%SHORT_NET2%
call :TESTINF1
SET LONGREV_NET=%LONGREV_NET3%
SET LONG_NET=%LONG_NET3%
SET SHORT_NET=%SHORT_NET3%
call :TESTINF1
goto :EOF


:TESTINF1
SET TI=%LONGREV_NET%
if NOT @%TI%==@ (
@Echo Checking for %TI% in %FNAME%
find /I %TI% %FNAME% > nul
if NOT errorlevel 1 SET DRVA=%FNAME%
if NOT errorlevel 1 echo ***** FOUND MATCH IN %FNAME% *****
if NOT errorlevel 1 goto :EOF
)
SET TI=%LONG_NET%
if NOT @%TI%==@ (
find /I %TI% %FNAME% > nul
if NOT errorlevel 1 SET DRVB=%FNAME%
if NOT errorlevel 1 echo ***** FOUND MATCH IN %FNAME% *****
if NOT errorlevel 1 goto :EOF
)
SET TI=%SHORT_NET%
if NOT @%TI%==@ (
find /I %TI% %FNAME% > nul
if NOT errorlevel 1 SET DRVC=%FNAME%
if NOT errorlevel 1 echo ***** FOUND MATCH IN %FNAME% *****
)

goto :EOF

:EXITPROGRAM
exit

Edited by karaktaka, 30 October 2014 - 11:03 AM.


#7 steve6375

steve6375

    Platinum Member

  • Developer
  • 6462 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 30 October 2014 - 10:43 AM

Great! Thanks. I have added it to the CodeShop99 article now :-)







Also tagged with one or more of these keywords: win7pese, network drivers, penetwork

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users