Topic: Multidriver support  (Read 197 times)

Multidriver support
« on: June 02, 2020, 12:49:37 PM »

AuraticTrance

  • Apprentice
  • *
  • Date Registered: Feb 2019
  • Posts: 7
Is it possible to keep multiple Display drivers (AMD+NVIDIA) files on WinPE ? and make the WinPE load the correct drivers on boot by detecting the display hardware component using PECMD ?

I'm relatively new to PECMD and learning about the advanced features

Re: Multidriver support
« Reply #1 on: June 03, 2020, 07:05:22 AM »

PetePossum

  • Jr. Chef
  • **
  • Date Registered: Mar 2016
  • Posts: 51
There are so many options ;)

You could use the driver integration script to add the drivers you want to the boot.wim directly (build core -> integrate drivers). During startup, the system detects the required drivers automatically and loads them as needed. However, this increases the size of the boot.wim file, and therefore the RAM usage.

I have one script which scans the host (installed Windows on harddisk) from PE, and loads matching drivers it finds into PE. This requires the installed windows version to match the PE architecture of cause (Win10, x64).

I personally like the SNAPPY Driver tool (e.g. http://theoven.org/index.php?topic=3023.msg36260#msg36260, page 2). It provides regulary updates each month, and also lets you decide which driver class you want to download. You can also run snappy with parameters to load all matching drivers automatically.

In addition to the tool, I am using a simple script like this:

FOR /F %%k in ('dir /b "Y:\programs\Auto\Drivers\*.*"') do (
CD /D Y:\programs\Auto\Drivers
FOR /F "delims=" %%i in ('dir /b /s /a-d "*.inf"') do (
title "installating drivers from y:/programs/Auto/DRIVERS..."
echo installing %%i...
start /min /wait PnpUtil.exe -i -a "%%i"
)
CD /D %~dp0
DEVCON RESCAN
)

it loads all drivers from the folder above... but it also adds those, which do not match the hardware I think.

For Video Drivers, I usually disable the "display drivers" options on the build core page. Otherwise the NVIDIA or AMD Drivers do not install and initialize without reboot, which is key on PE ;)

I am sure there are better answers, just wanted to share a few options...

 
 

Re: Multidriver support
« Reply #2 on: June 03, 2020, 03:59:00 PM »

AuraticTrance

  • Apprentice
  • *
  • Date Registered: Feb 2019
  • Posts: 7
Thanks for replying :thumbsup: Forgive any mistakes

You could use the driver integration script to add the drivers you want to the boot.wim directly (build core -> integrate drivers). During startup, the system detects the required drivers automatically and loads them as needed. However, this increases the size of the boot.wim file, and therefore the RAM usage.

Sounds good, the difficulty of the task is reduced  :tongue:. The WIM can be compressed. I'll try that soon and write about it.

I have one script which scans the host (installed Windows on harddisk) from PE, and loads matching drivers it finds into PE. This requires the installed windows version to match the PE architecture of cause (Win10, x64).

This one sounds more flexible and better, as it will import the necessary drivers from the Host. If you do not mind can you share the script ?

In addition to the tool, I am using a simple script like this:

Code: [Select]
FOR /F %%k in ('dir /b "Y:\programs\Auto\Drivers\*.*"') do (
CD /D Y:\programs\Auto\Drivers
FOR /F "delims=" %%i in ('dir /b /s /a-d "*.inf"') do (
title "installating drivers from y:/programs/Auto/DRIVERS..."
echo installing %%i...
start /min /wait PnpUtil.exe -i -a "%%i"
)
CD /D %~dp0
DEVCON RESCAN
)

it loads all drivers from the folder above... but it also adds those, which do not match the hardware I think.

What exactly is the path "Y:\programs\Auto\Drivers\*.*" ? Is it located on PE ? pardon for mistakes

For Video Drivers, I usually disable the "display drivers" options on the build core page. Otherwise the NVIDIA or AMD Drivers do not install and initialize without reboot, which is key on PE ;)
So there's chance that it wouldn't work properly and is it always a re-boot needed for initialization ? Wouldn't the driver files (*.inf) load in the same way as drivers load when normal windows boots up ?

Re: Multidriver support
« Reply #3 on: June 03, 2020, 07:00:35 PM »

PetePossum

  • Jr. Chef
  • **
  • Date Registered: Mar 2016
  • Posts: 51
Hi,

I uploaded the cmd here: https://schicks.digital/download/e8b9c8ae-7fa6-49f2-bde4-e295b8ad4e58#CGHOZ5k7S3LQYTeVbrnBZA%3D%3D

password is "theoven"

It extracts all drivers from a windows installation found on any internal drive, and then loads them in PE. Not very intelligent, but working in most cases. I found the base somewhere, but dont remember the original author to give credits.

Y:\programs\Auto\Drivers\*.* is just the path I use. Y: usually is the USB drive you booted from. You could use any folder on the USB drive you want instead, and just copy the desired drivers there.

Regarding the display drivers option on the build core page... I think if you enable this, PE will always load the MS basic display driver in case no better driver is found at bootup. If you then try to load another driver, most of them ask for a reboot to complete installation. With the option unchecked during build, video drivers load and initalize properly at runtime without reboot. At least this is what I found. Without the basic display driver, video performance and resolution options are limited. So I load the basic driver on demand via link on the desktop in case I need it.

here is the 2 line cmd to install it:

1st line:
X:\Windows\System32\cmd.exe /c drvload.exe X:\windows\inf\basicdisplay.inf X:\windows\inf\basicrender.inf X:\windows\inf\c_display.inf X:\windows\inf\display.inf X:\windows\inf\displayoverride.inf >nul & <nul (set/p z=#) & >nul ping 127.0.0.1 -n 2
2nd line:
call pecmd DISP

Again, there may be better options...

Re: Multidriver support
« Reply #4 on: June 03, 2020, 09:17:55 PM »

Malok

  • Chef
  • ***
  • Location: Canada
  • Date Registered: Aug 2016
  • Posts: 202
Hi PetePossum,

check http://theoven.org/index.php?topic=3043.msg36388#msg36388

I never had to use Devcon to bring devices online if using PNPUtil /install, some driver requires reboot but they do work right away. including Video and audio drivers + DirectX.

Re: Multidriver support
« Reply #5 on: June 04, 2020, 09:15:30 AM »

AuraticTrance

  • Apprentice
  • *
  • Date Registered: Feb 2019
  • Posts: 7
Thanks a lot for sharing the scripts :)

I'll test it out soon and let you know  :thumbsup:

Re: Multidriver support
« Reply #6 on: June 04, 2020, 12:13:12 PM »

James

  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Dec 2017
  • Posts: 2272

 

Powered by EzPortal