Topic: Manual integration and installation question

I wonder, if it's possible to embed drivers manually into a Win Vista installation folder on a usb stick.
If yes, what do I have to do? Or is it only possible through using tools as nLite or WinIntegrator and not by doing it by hand?

The second question is: Can Windows somehow check a directory for driver updates for all devices at once? Because sometimes it's a little bit annoying to install all new driver versions separately by executing all installers or clicking the "update driver" button, if I downloaded new versions of all DriverPacks, that are provided here. Especially annoying, if you have to search and navigate through the folder structure of the driver packs to locate the right drivers for your devices, first.

Last edited by Maxx (2010-08-03 11:40:30)

Re: Manual integration and installation question

WAIK / DISM

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

I already know how to inject the drivers with DISM, but am wondering if its somehow possible to keep them outside the image file so that they can be used later with dpinst directly from the dvd (and still be "integrated")?

I seemed to see in WAIK that the $OEM$ folder is still supported, but you have to make a data image out of it or a package or some such thing that completely defeats the purpose - is it indeed a dead end, or am i just missing something?

Re: Manual integration and installation question

okay, wasn't lazy, did a little research, it is possible after all, and in a number of ways even...



METHOD 1 (too long):

first, you HAVE to dism mass storage drivers (and lan - if you enabled network for pe in answer file) into boot.wim (2nd index only needed for setup) cause it runs completely from memory and copies nothing to hdd (and dvd drive could be ANY letter at this point) - it is equivalent to integrating them in I386 folder as before for xp

but know that the injected drivers are automaticaly expanded within image, and multiple copies of them are kept separately if there are more than one .inf files per folder (or multiple entries in a single *.inf), so integrate only boot critical drivers this way (chipset, storage and lan) or your image may not fit on a dvd - and you can actualy run out of ram when booting from it

mount image (must be writable, so copy to hdd first):
Dism /Mount-Wim /WimFile:C:\test\boot.wim /Index:2 /MountDir:C:\test\offline

remove old drivers (skip if this is the first time):
Dism /Image:C:\test\offline /Remove-Driver /Driver:OEM1.inf /Driver:OEM2.inf ...  /Driver:OEM99.inf
(how ever many there are third party drivers in C:\test\offline\Windows\Inf folder, you cant uninstall default ones)

inject all the drivers from C:\D folder, including in subfolders and even unsigned ones:
Dism /Image:C:\test\offline /Add-Driver /Driver:C:\D /Recurse /ForceUnsigned

dismount image (and then replace boot.wim from where you got it):
Dism /Unmount-Wim /MountDir:C:\test\offline /Commit

second, you create a $OEM$\$$\Inf\D folder INSIDE sources folder on install dvd/usb (not in root anymore) and add ALL the drivers there (dvd:\sources\$OEM$\$$\Inf\D) - they get automaticaly copied to C:\Windows\Inf\D folder during install (and windows already searches for drivers there on its own, including subfolders), only needed ones also get copied to windows driverstore folder, so you can safely delete C:\Windows\Inf\D after install if you wish



METHOD 2 (but only for vista/2008 with any integrated service pack, or 7 and 2008 R2):

at install windows automaticaly searches ALL the available drives for $WinPEDriver$ folder (not $WinPEDriverS$) in its root, so copy only boot critical drivers there (dvd:\$WinPEDriver$), they can be in subfolders too and are used during the whole install

but beware not to run out of ram as before, cause WinPE doesnt have anywhere else to keep its driverstore folder but memory

also - if a driver fails to inject in boot.wim with dism tool (as in previous method) the setup WILL fail if you put it in $WinPEDriver$ folder, so i suggest that you test all the drivers with dism FIRST (you can see the failed ones in C:\Windows\Logs\DISM\dism.log file) and move the bad ones to dvd:\sources\$OEM$\$$\Inf\D folder (as in previous method)

winpe supports cabbed drivers - but i had to expand some to work with dism (only 2 or 3 out of ALL the available driverpacks, but just one can f*ck you up)



METHOD 3 (too large):

forget everything from above and in the answer file for install.wim image, under Microsoft-Windows-Setup in WinPE pass just set UseConfigurationSet to true - now you have a system variable %configsetroot% which always points to the drive containing autounattend.xml in its root (doesnt need to be the install drive)

add the %configsetroot%\your_drivers_path to Microsoft-Windows-PnpCustomizationWinPE as a device driver path, and they are immediately available from the very start

but know that ALL the files from %configsetroot% drive WILL be automaticaly copied to C:\Windows\configsetroot folder, which can safely be deleted afterwards

EDIT: corrected $OEM$\$$\Windows\Inf\D to $OEM$\$$\Inf\D (but $OEM$\$1\Windows\Inf\D would work too)

Last edited by pOcHa (2010-10-31 12:10:48)

Re: Manual integration and installation question

That is very helpful pOcHa

need to know how to copy the DriverPacks to  "%WinPEDriver% (not %WinPEDriverS%) in root of install drive"

if you can post that (or if i get a chance to look it up) i'll move this to the FAQ section of our site.


Welcome to DriverPacks

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

thank you, it is the least i could do to contribute for all of your hard work, since paypal still ignores Serbia

its $WinPEDriver$ actualy, not %WinPEDriver% sorry (and you just unzip the downloaded driverpacks there any way you like), edited the previous post with some more clarifications...

here is a very simple batch file with which i makecab (best compression) all usual driver files (but not *.exe, sometimes i need to start the driver installation manualy) in ALL the subfolders under it - it also deletes the originals afterward and writes a log file too (use wordpad not notepad)

UPDATE: there must be NO spaces in folder names, driverpacks dont have them so just check your path from root to batch file (makecab doesn't support spaces nor quotes in paths, stupid m$ would probably just say as always - its not a bug, its a feature!)

echo %date% %time% > MakeCab.log

FOR /R %%i IN (*.bin;*.cat;*.cpl;*.dat;*.dll;*.sys;*.vxd) DO MakeCab.exe /D CompressionType=LZX /D CompressionMemory=21 /L %%~dpi "%%i" >> MakeCab.log& DEL "%%i" /F /Q

PAUSE

and here is a very simple batch file with which i expand all the compressed driver files in ALL the subfolders under it, delete originals and write a log

echo %date% %time% > Expand.log

FOR /R %%i IN (*.??_) DO Expand.exe -r "%%i" >> Expand.log& DEL "%%i" /F /Q

PAUSE

i noticed that the dpinst.ex_ file in nvidia drivers is NOT cabbed but actualy just renamed, and of course expand doesnt know that so it just renames it too BUT not to its original name dpinst.exe - but to dpinst.ex or even dpinst.ex. sometimes (so check the logs always)

hope this helps...

Last edited by pOcHa (2010-10-24 08:05:46)

Re: Manual integration and installation question

here is a fix for unsigned drivers in final version of win 7 x64 ONLY (but may work in others/newer), so you dont have to use f8 on every startup anymore AND you dont get test mode message on desktop (without even patching user32.dll and its mui)

http://fyyre.ivory-tower.de/projects/disable_pg_ds.rar

just follow instructions, or use one of my alternative methods below

1.) dont run 1.bat but manualy copy ntoskrnl.exe and winload.exe from windows\system32 to patch_temp folder (create it) where you extracted the files, run 2.exe and 3.bat and then this batch (you skip the new f8 option this way)

SC.exe stop peauth
SC.exe config peauth start= demand

BCDEdit.exe /set {default} path \Windows\System32\osload.exe
BCDEdit.exe /set {default} kernel ntkrnlmp.exe
BCDEdit.exe /set {default} TESTSIGNING ON
BCDEdit.exe /set {default} NOINTEGRITYCHECKS ON
BCDEdit.exe /set {default} loadoptions DDISABLE_INTEGRITY_CHECKS

2.) do everything from above BUT dont run 3.bat and rename ntkrnlmp.exe and osload.exe to their original names (ntoskrnl.exe and winload.exe) and run this batch instead of previous one

SC.exe stop peauth
SC.exe config peauth start= demand

BCDEdit.exe /set {default} TESTSIGNING ON
BCDEdit.exe /set {default} NOINTEGRITYCHECKS ON
BCDEdit.exe /set {default} loadoptions DDISABLE_INTEGRITY_CHECKS

now overwrite original files with patched ones from dual boot, recovery console, some livecd, usb boot or any other method when they are not in use...

UNATTENDED INSTALL:

you can inject the patched files directly into install.win or simply add them to dvd:\sources\$OEM$\$$\System32 folder (yes, they overwrite the originals if from second alternative) - but the problem is that i dont know how to access the windows boot store from winpe pass (bcdedit commands change winpe's bcd, not windows's) and offlineservicing pass doesnt support adding commands (not that i know of anyway?), so if anyone knows the solution to either of those problems OR which bcd file on install dvd to manualy edit (so we dont even need those batch commands) then we can get a TRULY silent install with unsigned drivers...

P.S. boot record MUST be changed prior to first restart, otherwise windows throws an unsigned security error for patched winload.exe (only if from second alternative) AND you cant even access f8 anymore (yes, you can then enter bcdedit commands from recovery console, but thats not unattended anymore) - if from first alternative, just name its batch file as setupcomplete.cmd and put it in dvd:\sources\$OEM$\$$\Setup\Scripts folder, it gets run on its own just before first logon

Last edited by pOcHa (2010-10-24 00:39:53)

Re: Manual integration and installation question

To make changes to BCD stores OTHER than the Boot store, use the /store switch. For example, this command:

      BCDEdit.exe /set {default} TESTSIGNING ON

becomes this, instead:

      BCDEdit.exe /store D:\Boot\BCD /set {default} TESTSIGNING ON

this is, of course, assuming one hard drive, the hidden boot partition, and booted from standard WinPE, causing the hidden BOOT partition to be assigned drive letter D:

ZC

Re: Manual integration and installation question

* edited my last post cause i was refering to boot.sdi (image file used to boot from ramdisk) instead of bcd (no extensions) file which is actualy just a registry hive that can be opened in any registry viewer *

yes, i am well aware of the /store switch BUT winpe pass commands are executed BEFORE any disk manipulation - so assuming unpartitioned disk there are only two available drives then (you can check with browse for drivers), d: as installation drive and x: as winpe ram drive (c: is probably reserved for hidden partition, but is not actualy created at that time, and not reserved/created at all if there are any existing partitions already - it becomes the last partition, or d: in your example AFTER restart, and offlineservicing pass doesnt support adding commands)

now, bcdedit commands for x: (without /store switch) DON'T get passed on to windows, and d:\boot\bcd store (if on usb, cause dvd is read only) is for booting winpe anyway, not windows

TIP: if you dont want to end up with a hidden bitlocker partition (boot store is then in c:\boot), either partition all disks before windows install, done - or first create all the partitions you need in windows install, then delete the one you wish to be c: and just EXPAND the hidden partition, thats it

Last edited by pOcHa (2010-10-23 05:08:16)

Re: Manual integration and installation question

silly me, its quite simple really, {default} entry in every bcd file on install dvd is for either winpe or setup (even in wim images), and windows entry gets automaticaly created during install (and then set to {default} one) with a unique guid so it cant be known in advance...

BUT {globalsettings} entry exist from the start with same guid, and all new entries inherit setting from it, so i will now try to:

1.) run bcdedit commands in winpe pass for {globalsettings}
UPDATE: didnt try it, cause you lose repair and upgrade options (only fresh install) when exist winpe pass in answer file

2.) edit {globalsettings} in ALL bcd files on install dvd (including inside images)
UPDATE: edited d:\boot\bcd and added another one to dvd:\sources\$OEM$\$$\Boot\DVD\PCAT to overwrite install.wim's, was to lazy to inject the last one in boot.wim also - but didnt and wouldnt work anyway, see below why

3.) add a bcd file with edited {globalsettings} from already installed windows to dvd:\sources\$OEM$\$1\Boot folder to overwrite the setup's one
UPDATE: setup creates a completely NEW bcd file and it gets succesfuly overwriten from $oem$ in offlineservicing pass, but AFTER all files get copied it creates random guids for a couple of entries so i ended up with duplicates - this method works, just delete "Windows 7", "Windows Resume Application", "Windows Recovery Environment" and "Ramdisk Options" from bcd in $oem$

only other alternatives to 3. would be a way to add bcd commands to offlineservicing pass or finding a script which creates a new bcd file (its not from any of the already existing bcd's on install dvd)

NOW, as you can see from batch files in my previous post, the peauth service must be stopped or it bsods already installed windows on logon and hangs up the setup on first logon too (and after restart it WONT continue) - i added the commands in serialize pass BUT they dont get executed soon enough, so i am at the end of my witts here and changing registry in install.wim just seems like too much work

Last edited by pOcHa (2010-10-24 04:29:01)

Re: Manual integration and installation question

ok found it, bcd is created from this file: windows\system32\config\bcd-template (no extension) inside install.wim
so i just edit its {globalsettings} and add it to dvd:\sources\$OEM$\$$\system32\config folder

and i take registry hive: system (no extension) file from same folder in image, change peauth service startup to 3 (manual), and put it in same $oem$ folder (btw, you can extract files from wim's with 7zip, no need for dism or imagex)

UPDATE: well thats it, finaly did it, fully unattentended win 7 x64 installation with integrated unsigned drivers (no need to press f8 and disable driver signature enforcement during setup, or ever after), tested and working - has it been done already? been searching the net for a while until decideing to do something about it myself...

hope you guys can use it to make dpbase for vista/7/2008/R2, i can provide an automated batch of the whole process if needed?

Last edited by pOcHa (2010-10-24 07:52:31)

Re: Manual integration and installation question

All excellent Info pOcha

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

damn, that patch fyyre made doesnt work anymore with sp1 rc wave1 which came out this week, hope he updates it...

UPDATE - made a manual sp1 rc wave1 slipstream (not reverse integration but with dism) guide here:
http://forums.mydigitallife.info/thread … post337159

Last edited by pOcHa (2010-10-30 00:51:16)

Re: Manual integration and installation question

There is an updated WAIK posted at the Microsoft download site - supposedly version 2.0.

http://d1syubgj0w3cyv.cloudfront.net/cdn/farfuture/ajoHKH618C_cS2O6V00_aY3Cse0ggjzP4uxI8Hk5viw/perpetual:forever/userbar/donator-3.png

Re: Manual integration and installation question

found none, and i doubt they would release one for beta/rc either, but there are leaked official integrated iso's which contain updated dism on them - the version of the image (that is, of the tool with which it was created) doesnt really matter though, except if you are trying to edit a newer image with an older tool of course...

UPDATE: there IS a "newer" waik - http://www.microsoft.com/downloads/en/d … c26d3b3b34

(but dont bother, read this first - http://forums.mydigitallife.info/thread … ed/page40)

Last edited by pOcHa (2010-10-30 13:49:58)

Re: Manual integration and installation question

cleaned and updated the guide with new driver signing workaround here:

http://forums.mydigitallife.info/thread … drivers...

Last edited by pOcHa (2010-10-31 15:27:01)

Re: Manual integration and installation question

Hey guys...I have been beating my head against the wall trying to figure this out.  If anyone can help I would greatly appreciate it.  Our current setup is as follows...and we must use Symantec Ghost.

1st step - Install windows 7 to a machine
2nd step - Created an unattend.xml file
3rd step - Run the bat file which runs sysprep /generalize /oobe /shutdown /unattend:unattend.xml
4th step - Boot the machine up via pxe boot and take the image using symantec ghost.(creates .gho image)

Now my problem is all of the drivers aren't there for the multiple machines.  Can someone tell me the best way to do this?  Thanks a lot
Andy

Re: Manual integration and installation question

The instructions are above... sad

That is to say you asked "what the best way to do add drivers" at the end of the thread that describes in great detail the best way to do it...

Obviously you have been banging your head against the wall too long tongue. (skip that step and read the above thread)

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

OverFlow wrote:

The instructions are above... sad

That is to say you asked "what the best way to do add drivers" at the end of the thread that describes in great detail the best way to do it...

Obviously you have been banging your head against the wall too long tongue. (skip that step and read the above thread)

Thanks for the quick response.  I don't think these instructions work for me.  If I am wrong please tell me.  I can't use the DISM tool because I can't use a WIM file.

I did try to change the registry key hklm\software\microsoft\windows\currentversion\DevicePath but that didn't work.

I am using Windows 7 64 bit.  Any other ideas?

Re: Manual integration and installation question

On the contrary, you must install windows before you do anything else... Yes?
Windows is installed from a Wim file... Yes?

That makes these instructions "Step 0"
IE the very first thing you do.

Once you add the drivers to windows... you are done... Let me be even more clear... These instructions don't just add the drivers during the install... They permenently add the drivers to windows.


Again what you want and keep asking for is right under your nose ... well if you scroll up.

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

Also here is way to do it after the fact... Thanks to Ricktendo64 for pointing it out.
http://forum.driverpacks.net/viewtopic. … 678#p41678
obviously adding them to your source FIRST is a better method... but since it seems you have already blown way past that point you could use pnputil to update your already completed source, and then use the WIM method above the next time you start clean big_smile

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

haeey.i read out all post its useful but i m worried about win7 drivers,
i search out a lot of time win7 graphics drivers but  sad

SO please suggest me webs for downloading win7 complete drivers

Re: Manual integration and installation question

Http://DriverPacks.net
You are here already... question answered

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: Manual integration and installation question

Yes There is an updated WAIK posted at the Microsoft download site - supposedly version 2.0.

SPAM link removed by moderator

Re: Manual integration and installation question

Hold onto your old versions, JIK.

Edit: ALWAYS hold on to your old versions, Just In Case! roll

Last edited by TechDud (2011-05-14 17:04:31)