New
#1
App Development Help
@Superfly
I am looking to tap into your coding ability...
I have this Batch File that exports the Hosts Drivers and then integrates them into Booted WinPE
The problems are
if more then 1 host OS
if version of host OS is different then PE version (Win8.1 - Win10)
if Arch of OS is different then PE Arch (x86 - x64)
What I would like is a single exe - GUI - like showkey...
to compare WinPE OS and Arch with any Available Host OS
If a Matching OS and Arch are found then > export and integrate drivers
currently the export is to Y (our WinPE Media Drive) but we usually run 1024 WinPECache
so windows\%temp% is an option as batch delete Driver folder after integration
Code:@ECHO OFF CLS REM Set a temporary location outside of memory as your destination (i.e. usb) SET destination=Y:\HostDrivers IF EXIST "%destination%" RMDIR "%destination%" /S /Q MD "%destination%" CHOICE /C YN /M "Would you like to load drivers from the host (if present) " IF %ERRORLEVEL%==1 GOTO SCAN IF %ERRORLEVEL%==2 GOTO ABORT :ABORT EXIT :SCAN For %%I in (C D E F G H I J K L M N O P Q R S T U V W Y Z A B) do (dir %%I:\ 1>nul 2>nul && if /i exist %%I:\Windows set image=%%I:\) :EXPORT DISM /image:%image% /Export-Driver /destination:"%destination%" :LOAD CD /D "%destination%" FOR /F "delims=" %%i in ('dir /b /s /a-d "*.inf"') do ( %WinDir%\System32\pnputil.exe /add-driver "%%i" /subdirs ) DEVCON /RESCAN DEVCON RESTART * RMDIR "%destination%" /S /Q EXIT