Jump to content

Windows 7 DISM & driver packages


Recommended Posts

Interesting thing to note, I gave MDT 2010 a try, and it "slipstreams" the video drivers fine with no errors... I might just start using that to do all my integration now instead of command line DISM.

does Microsoft Deployment Toolkit 2010 save a log of what switches DISM used ?

Link to comment
Share on other sites

  • 3 weeks later...

/recurse is for if you have more then one driver folder, so you have to point to your driver folder.

DISM.exe /image:<path_to_mounted_image_directory> /Add-Driver /driver:c:\drivers /recurse

/forceunsigned is for non WHQL / BETA drivers , and you have to do those seperate, you have to point to the inf file of the driver.

DISM.exe /image:<path_to_mounted_image_directory> /Add-Driver /driver:c:\nonwhqldrivers\ATInonwhql.inf /forceunsigned

So first do all your WHQL drivers with /recurse and point to your folder wich contains all your driver folders, then do the non WHQL drivers one by one with : /forceunsigned

Edited by sp00f
Link to comment
Share on other sites

Are you using WinPE when deploying? If so, have you tried the "/ScratchDir" argument?

I know that with Vista and Pkgmgr, when using WinPE, you have to set the scratchdir to a local folder (that you create) when injecting ATI and nVidia drivers because the WinPE scratchdir is only like 32 Mb or so, and ATI and nVidia drivers are far larger.

I've only just stated to play with Win7 myself but I found that pkgmgr automaticly calls DISM anyway, which then uses the default scratchdir,so using the DISM command to begin with and specify the sratchdir in the command line should be able to help you out, if you are using WinPE when getting these problems.

Link to comment
Share on other sites

  • 2 weeks later...

OK... this line works for me:

dism.exe /image:"d:\\" /sysdrivedir:"c:\\" /norestart /apply-unattend:"d:\Windows\Panther\Unattend.xml" /scratchdir:d:\uptemp

The only major difference is that I've specified the path to the driver store in the unattend file.

Link to comment
Share on other sites

Here's the thing, although I do employ autounattend.xml, I have never dealt with unattend.xml. Without going into too much detail, how does one employ it if there is a difference? I see my own unattend.xml (in panther folder) and it is identical to my autounattend with a few "sensitive deletions". Does one just save autounattend as unattend?

What are the double backslashes as they apply to a DISM command?

Pardon my ignorance. :(

EDIT***

Ok, I have answered my own questions! However, what kind of code are you using to specifically in your answer file to point to path? And I only ask because I believe there were issues with drive letters once? I could be mistaken... Can you post an example...I can then take it from there.

Thanks!

Edited by razormoon
Link to comment
Share on other sites

Ok, back on this project again... god love the govt; getting pulled from projects and thrown onto other things only to get pushed back onto what you were oing from the get-go...

Anyways, I'm back with the damned DISM / MDT 2010 thing, seems I was wrong about MDT taking in the drivers and not DISM; when I hit the Update on my deployment folder, I get the same errors. But I'm going to leave that one alone for now.

I'm seriously lacking basic knowledge on how DISM & package integration works... but anyways; this scenario is simple! Mount WIM image, add-package for 2 tiny MS updates (KB971180 & KB970858) and the french language pack. No errors, I do the /get-packages and clearly see them there, but with the mention "install pending".

I unmount & commit changes. I then re-mount & re-check /get-packages and yep, they're definitely there. I check WAIK after reloading the WIM and I don't see the packages in there anywhere. Ok. So I copy that WIM file to my USB key & re-install from scratch. The WIM was ~125MB bigger, so another clear indication that the packages are there.

The question: how in hell do I get them to install now? Even after W7 is loaded, it didn't install them automatically (which I thought that's how it was going to do them) and they don't appear anywhere as an option to start the installs...

So yeah, there has to be something basic I'm missing here, like either in my autounattend to tell it to do the install or before closing off the offline image.

The lack of documentation on how DISM works from MS is ridiculous, I'm about to just plug in every darn thing I want to install in the offline image, close the WIM & create a big old ugly script that installs everything instead of using these new "automation tools" :realmad: It just really sucks coming from a standpoint where XP tools had no secrets to DISM/WAIK/MDT. :wacko:

Link to comment
Share on other sites

So, like I'm just going to chalk it up to the RC/BETA thing...

I'm hoping to get a tip from JohanE as I have never pointed to any drivers from autounattend. That being said, it's only because of the physical drive pointer thing (if that still is an issue). I can get my audio and IR drivers to add...just not the video!

On my journey to working with things that are so-called "robust", it chaps my a** when I run into a brick wall like this. Don't get me wrong...I live to be educated!

Dechy: Have you tried DISM /image:<drive>\<path> /add-package /?

Maybe something there?

:blink:

Link to comment
Share on other sites

Indeed I did, there's no "install-package" or "enable-package" or something that would tell the OS on first boot (or any pass) to kick off those installs.

I just find it odd, that like you, not all my drivers work, but the ones that do, once "slipstreamed" into the .WIM using DISM, they actually "work" right away, or at least the OS is quite aware of them... but doing the same type of procedures for packages gives completely different results...

Ok, I don't find it odd, I find it frustrating.

Link to comment
Share on other sites

  • 2 weeks later...

@powera

I owe you one.

Here is what I posted on that thread:

===========================================================================

"Working off of INSTALL.WIM of W7x86 7229 in c:\w7 directory.

Extracted nvidia 185.85_desktop_win7_32bit_english_whql.exe to C:\TEMP

EXPAND C:\TEMP\*.*_ C:\DRVRS\NVIDIA

Copied contents of C:\TEMP (minus *.*_) to C:\DRVRS\NVIDIA

At cmd prompt entered:

DISM /MOUNT-WIM /WIMFILE:C:\W7\SOURCES\INSTALL.WIM /INDEX:5 /MOUNTDIR:C:\TEMP

In case you're wondering, Windows 7 Ultimate resides in the 5th index of install.wim...index 4 of x64 install.wim.

DISM /IMAGE:C:\TEMP /ADD-DRIVER /DRIVER:C:\DRVRS\ /RECURSE

I also have audio and IR controller drivers in C:\DRVRS directory.../RECURSE assures that DISM will pick through each directory.

DISM /UNMOUNT-WIM /MOUNTDIR:C:\TEMP /COMMIT

======================================================================================

Edited by razormoon
Link to comment
Share on other sites

Please thank powera and expecially Andreas Weber @ TechNet for this, the missing piece was retaining the *.??_ (underscore) on the expanded files!

And I am sure that software pieces such as MaxXpSoft's Vista 7 UA and newer programmers will take advantage of this...

In eating my own words, I suppose this proves DISM's robustness....<dang it!! ...expecially>

Edited by razormoon
Link to comment
Share on other sites

Pain in the butt having to expand files as soon as new drivers appear! For those of you that are interested in this driver quagmire, I have put together the following...copy and paste to notepad and save as filename.bat:

(Be sure to change the driver directory to match yours...this file can be run from anywhere regardless of driver directory)

REM @echo off
REM Batch file for conversion/expansion of any driver files that do not cooperate with Windows 7 DISM ADD-DRIVER due to compression.
REM This will also parse subdirectories and expand those files as well.
REM For visual confirmation, be sure to refresh your directory to view correct file sizes.

REM Location of original (untouched) driver directory (user defined, don't forget trailing backslash)
SET DRVDIR=C:\DRIVERS\

REM Wildcard pattern to search for compressed files (this example for nvidia, NVAPI.DL_)
SET WILDCARD=*.??_

REM Holds directory\filename of original compressed files (user defined, may be left unchanged)
SET DRIVERS=C:\DRVORG.TXT

REM Holds directory\filename of expanded files (user defined, may be left unchanged)
SET EXPANDED=C:\DRVEXP.TXT

REM Creates log of commands
SET LOG=C:\COOLLOG.TXT

REM Pre-Cleanup
DEL %EXPANDED% /q
DEL %DRIVERS% /q
DEL %LOG% /q

REM Creates standard text file with directory\filename of compressed files
for /f "tokens=1,2,3,4,5 delims= " %%A in ('dir /b /s %DRVDIR%%WILDCARD%') do echo %%A >> %DRIVERS%

REM Creates second standard text file with directory\filename of expanded files (minus the third ext character (underscore))
for /f "tokens=1,2,3,4,5 delims=_" %%A in ('dir /b /s %DRVDIR%%WILDCARD%') do echo %%A >> %EXPANDED%

REM Expands files to same directory (expanded files now have only two character extension)
for /f "tokens=1,2,3,4,5 delims= " %%A in ('type %DRIVERS%') do EXPAND.EXE -R %%A >> %LOG%

REM Overwrites original files
for /f "tokens=1,2,3,4,5 delims= " %%A in ('type %EXPANDED%') do MOVE /Y %%A %%A_ >> %LOG%

REM Cleanup
DEL %EXPANDED% /q
DEL %DRIVERS% /q

EXIT

As an example, I store all my drivers in E:\driver\32 and E:\driver\64 - within each of these exists DISPLAY, AUDIO, USBUIRT, ETC. This batch will go through every directory if you point it to E:\Driver\. :)

Known issues: DO NOT add spaces to end of SET and FOR lines or anywhere else for that matter. Trust me!!

Have fun!!

Edited by razormoon
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...