Topic: Simple batch files for integrating updates and drivers in Win7

Here's some simple batch files that I've been using to integrate updates and drivers into all indexes of Win7 source files before building .iso.
I thought I'd share them for others.
Make sure to execute these batch files by right-clicking and selecting "Run as administrator".
Set the paths to whatever you like, just be sure to NOT use a trailing backslash in the path (i.e. C:\mnt instead of C:\mnt\ )
To download the patches, I use Windows Updates Downloader with current download lists from this post (not 100% complete, but a great start)

For drivers, I separate my folders into boot & main.  Boot drivers are integrated into the boot.wim (index 2) and for me only contain dpms. 

Enjoy! smile

updates-x86.bat

@echo off
::Set Paths
:: Do NOT use trailing backslash in path (i.e. C:\mnt instead of C:\mnt\ )
:Path to mount folder
set mnt=C:\Tools\W7\mount
:Path to source .wim
set src=C:\Tools\W7\Source\x86\sources
:Path to update packages
set updates1=C:\Tools\W7\Updates\Windows_7_SP1_x86_ENU\Critical_Updates
set updates2=C:\Tools\W7\Updates\Windows_7_SP1_x86_ENU\Important_Updates
set updates3=C:\Tools\W7\Updates\Windows_7_SP1_x86_ENU\Optional_Updates

cls
dism /Mount-Wim /WimFile:%src%\install.wim /index:5 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:4 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:3 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:2 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:1 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
echo .........................................
echo Update integration complete
pause
exit

updates-x64.bat

@echo off
::Set Paths
:: Do NOT use trailing backslash in path (i.e. C:\mnt instead of C:\mnt\ )
:Path to mount folder
set mnt=C:\Tools\W7\mount
:Path to source .wim
set src=C:\Tools\W7\Source\x64\sources
:Path to update packages
set updates1=C:\Tools\W7\Updates\Windows_7_SP1_x64_ENU\Critical_Updates
set updates2=C:\Tools\W7\Updates\Windows_7_SP1_x64_ENU\Important_Updates
set updates3=C:\Tools\W7\Updates\Windows_7_SP1_x64_ENU\Optional_Updates

::Do NOT modify anything below this line unless you know what you are doing!
cls
dism /Mount-Wim /WimFile:%src%\install.wim /index:4 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:3 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:2 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:1 /MountDir:%mnt%
dism /Image:%mnt% /Add-Package /PackagePath:%updates1%
dism /Image:%mnt% /Add-Package /PackagePath:%updates2%
dism /Image:%mnt% /Add-Package /PackagePath:%updates3%
dism /Unmount-Wim /MountDir:%mnt% /commit
echo .........................................
echo Update integration complete
pause
exit

drivers-x86.bat

@echo off
::Set Paths
:: Do NOT use trailing backslash in path (i.e. C:\mnt instead of C:\mnt\ )
:Path to mount folder
set mnt=C:\Tools\W7\mount
:Path to source .wim
set src=C:\Tools\W7\Source\x86\sources
:Path to driver packages
set driver-boot=C:\Tools\Drivers\Boot\x86
set driver-main=C:\Tools\Drivers\x86

::Do NOT modify anything below this line unless you know what you are doing!
cls
Dism /Mount-Wim /WimFile:%src%\BOOT.WIM /index:2 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-boot% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:5 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:4 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:3 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:2 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:1 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
echo .........................................
echo Driver integration complete
pause
exit

drivers-x64.bat

@echo off
::Set Paths
:: Do NOT use trailing backslash in path (i.e. C:\mnt instead of C:\mnt\ )
:Path to mount folder
set mnt=C:\Tools\W7\mount
:Path to source .wim
set src=C:\Tools\W7\Source\x64\sources
:Path to driver packages
set driver-boot=C:\Tools\Drivers\Boot\x64
set driver-main=C:\Tools\Drivers\x64

::Do NOT modify anything below this line unless you know what you are doing!
cls
Dism /Mount-Wim /WimFile:%src%\BOOT.WIM /index:2 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-boot% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:4 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:3 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:2 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
dism /Mount-Wim /WimFile:%src%\install.wim /index:1 /MountDir:%mnt%
Dism /image:%mnt% /Add-Driver /driver:%driver-main% /recurse
dism /Unmount-Wim /MountDir:%mnt% /commit
echo .........................................
echo Driver integration complete
pause
exit

And for post install options, I use the %cdrom%\sources\$oem$\$$\Setup\scripts\setupcomplete.cmd method (thanks to Ricktendo64 for the .net4 ideas), but I'll be transitioning some of the below to a custom WPIW installer session later.

setupcomplete.cmd for Win7

@echo off
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:\sources\install.wim set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%
::Begin hotfix install

:Malicious software removal tool
echo Installing Malicious Software Removal Tool
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\windows-kb890830-x64-v3.22.exe /Q
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\windows-kb890830-v3.22.exe /Q

:Defender Definitions
echo Installing Windows Defender Definition updates
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\WinDefUpdate\mpas-fe64.exe /Q
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\WinDefUpdate\mpas-fe.exe /Q

:DirectX
echo Updating DirectX
start /wait %CDROM%\updates\directx\DXSETUP /silent

:NET Framework 4
echo Installing .NET 4 Framework
::start /wait Client\netfx_core_x64.msi EXTUI=1
::start /wait Extended\netfx_extended_x64.msi EXTUI=1
start /wait %CDROM%\updates\dotNetFx40_Full_x86_x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2160841-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2416472-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2446708-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2468871-v2-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2478663-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2487367-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2518870-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2533523-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2539636-x64.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2416472-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2446708-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2468871-v2-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2478663-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2487367-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2518870-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2533523-x86.exe /passive /norestart
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2539636-x86.exe /passive /norestart

:options
::Requires .NET 4
echo Installing Super Calendar
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\WinCal-Win7-amd64-en-us.exe /S /v/qb
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\WinCal-Win7-x86-en-us.exe /S /v/qb
echo Installing Pinball
start /wait %CDROM%\updates\WinPinball-en-us.exe /S /v/qb

:WPIW
::Begin WPIW
echo Starting Windows Post-Install Wizard
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Disable Script Debugger" /T "REG_SZ" /D "no" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "DisableScriptDebuggerIE" /T "REG_SZ" /D "no" /F
::Start %CDROM%\WPI\wpi.exe

::all processing finished, delete used files, and EXIT::
:CLEANUP
start /wait %windir%\Microsoft.NET\Framework\v4.0.30319\ngen executequeueditems
IF EXIST %SystemRoot%\SysWOW64 start /wait %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen executequeueditems
IF EXIST %windir%\Setup\scripts RD /S /Q %windir%\Setup\scripts >nul
DEL /F /Q %0% >nul
exit

And for you testing types, here's some experimental code for all NT6 OS (auto adjusts).  Code in-work.

@echo off
:: Do NOT use trailing backslash in paths (i.e. C:\mnt instead of C:\mnt\ )
:: Hardcoded paths (C:\etc) are acceptable, but discouraged in favor of flexible relative paths 
:: such as (%~dp0\ "the directory containing this script", or %cd% "current directory", or ..\..\ "back two directories")
:: Network shares (\\server\path) are not supported by this script.
::Set Paths to directories here.
:Path to mount folder
set "mnt=%~dp0mount"
:Path to temp folder
set "tmp=%~dp0temp"
:Path to source .wim files
set "src=%~dp0source"
:Path to driver folders (each should contain x86 & x64 folders)
set "driver-boot=%~dp0Drivers\Boot"
set "driver-main=%~dp0Drivers\Install"
::Do NOT modify anything below this line unless you know what you are doing!
:Environment checks
:DISM-check
IF NOT EXIST "%WINDIR%\SYSTEM32\DISM\DISMHOST.EXE" GOTO ERROR1
:WIM-check
IF NOT EXIST "%src%\*.wim" GOTO ERROR2
:Driver-check
IF NOT EXIST "%driver-boot%\*" GOTO ERROR3

:Index-start
set idx=1
:Index stop
set bootx=2
dism /get-wiminfo /wimfile:"%src%\install.wim" > "%tmp%\index.log"
dism /get-wiminfo /wimfile:"%src%\install.wim" /index:1 > "%tmp%\detail.log"
setlocal EnableDelayedExpansion
set "cmd=findstr /R /N "^^" "%tmp%\index.log" | find /C "Index""
for /f %%a in ('!cmd!') do set indexs=%%a
cls

echo %indexs% Install.wim indexes found.
:Arch detection
if exist "%tmp%\detail.log" (
  FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Architecture" "%tmp%\detail.log"`) DO (
  set str=%%a
  for /f "tokens=2 delims=: " %%b in ('echo !str!') do (
  set arch=%%b
  )) 
)
echo The install.wim architecture is %arch%
echo Using boot drivers from folder:%driver-boot%\%arch%
echo Using main drivers from folder:%driver-main%\%arch%
:begin-boot
echo Integrating Boot WIM Index: %idx%
Dism /Mount-Wim /WimFile:"%src%\BOOT.WIM" /index:%idx% /MountDir:"%mnt%"
Dism /image:"%mnt%" /Add-Driver /driver:"%driver-boot%\%arch%" /recurse /forceunsigned
Dism /Unmount-Wim /MountDir:"%mnt%" /commit
if "%idx%"=="%bootx%" set idx=1 & goto begin-install
set /a idx+=1
goto begin-boot
:begin-install
echo Integrating Install WIM Index: %idx%
Dism /Mount-Wim /WimFile:"%src%\install.WIM" /index:%idx% /MountDir:"%mnt%"
Dism /image:"%mnt%" /Add-Driver /driver:"%driver-main%\%arch%" /recurse /forceunsigned
dism /Unmount-Wim /MountDir:"%mnt%" /commit
if "%idx%"=="%indexs%" goto END
set /a idx+=1
goto begin-install
:End
echo .........................................
echo Driver integration complete.
:Cleanup
 cd %SYSTEMDRIVE%\
 IF EXIST "%tmp%\*" DEL /F /S /Q "%tmp%\*" >nul
echo Cleanup complete.
:Exit
pause
exit
:ERROR1
IF EXIST "%WINDIR%\SYSWOW64\DISM\DISMHOST.EXE" GOTO WIM-check
ECHO DISM utility not found.  Please install the Microsoft WAIK suite of utilities.
echo Windows® Automated Installation Kit (AIK) downloads
echo WAIK 3.0: http://www.microsoft.com/download/en/details.aspx?id=5753
echo WAIK 3.1 supplement: http://www.microsoft.com/download/en/details.aspx?id=5188
goto Exit
:ERROR2
IF EXIST "%src%\sources\*.wim" set "src=%src%\sources" & GOTO Driver-check
ECHO WIM files not detected.  Please check source directory.
goto Exit
:ERROR3
IF EXIST "%driver-main%\*" GOTO Index-start
ECHO Driver files not detected.  Please check driver directory.
goto Exit
Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

Updated to include sample setupcomplete.cmd file.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

Hi Erik,
Thanks for sharing this work it has already helped me with some things I was trying to integrate. Now I have a few questions I tried your method of installing the MassStorage to the boot.wim but when I try to do a test install in VirtualBox it does not see my hard drive if I move the drive off of the SATA controller and on to the IDE controller in VirtualBox I am able to see the drive and do the test install. Have you had this problem? Or am I doing something wrong? I am also trying to get these setting to apply with the setupcomplete.cmd they will not work during the first run during the install but if I run the setupcomplete.cmd after window starts they apply just fine would you happen to know why? One last question do you have one setupcomplete.cmd that you use for x64 and one for x86?

Thanks,
Dean

This is what I have in the setupcomplete.cmd

:IE Registrty Add
echo Adding IE Registry Setting
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "DisableFirstRunCustomize" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Check_Associations" /T "REG_SZ" /D "NO" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Friendly http errors" /T "REG_SZ" /D "NO" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Show image placeholders" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Start Page" /T "REG_SZ" /D "about:blank" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "UseSWRender" /T "REG_DWORD" /D "1" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PhishingFilter" /V "EnabledV9" /T "REG_DWORD" /D "0" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes" /V "DefaultScope" /T "REG_SZ" /D "{52ADEEAA-7118-4D93-944B-4C284B1DD322}" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes" /V "DownloadUpdates" /T "REG_DWORD" /D "0" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{52ADEEAA-7118-4D93-944B-4C284B1DD322}" /V "DisplayName" /T "REG_SZ" /D "Google" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{52ADEEAA-7118-4D93-944B-4C284B1DD322}" /V "URL" /T "REG_SZ" /D "http://www.google.com/search?q={searchTerms}&rls=com.microsoft:{language}&ie={inputEncoding}&oe={outputEncoding}&startIndex={startIndex?}&startPage={startPage}" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /V "Groups" /T "REG_DWORD" /D "0" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /V "NewTabNextToCurrent" /T "REG_DWORD" /D "0" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /V "NewTabPageShow" /T "REG_DWORD" /D "0" /F
http://d1syubgj0w3cyv.cloudfront.net/cdn/farfuture/5NQ1BpqvDa_0vDwtHeoZCcSJjOVNuvMXSp4i7SE7DQA/perpetual:forever/userbar/moderator-1.png

Re: Simple batch files for integrating updates and drivers in Win7

In VB I have the HDD set on the SATA controller with AHCI and "I/O cache" enabled.  The Win7 installer sees my drives even without integrating dpms (ICH9R controller).
I just got my new Vertex2 SSD so I'm building a new .iso to install fresh.  I don't anticipate any issues.

For your registry entries, I think Ricktendo64 would know more about that than me.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

@mr_smartepants
nice batch file, i will need it to add my stuff. Thanks

@dolivas
You don´t need 2 setupcomplete.cmd, only you need to add commands like this:

REG ADD %KEY%\000 /VE /D "VMWAre Tools" /f
IF EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\000 /V 1 /D "msiexec.exe /i "%AppsRoot%\Install\VMware.Tools\VMware.Tools_x64.msi" /qr /norestart" /f
IF NOT EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\000 /V 1 /D "msiexec.exe /i "%AppsRoot%\Install\VMware.Tools\VMware.Tools.msi" /qr /norestart" /f

you can also use IF %Process_architecture% =="AMD64" instead of  IF EXIST %SystemRoot%\SysWOW64, but the problem if your CPU is not really 64 and your OS is 64 bits,  %Process_architecture% will return usually "x86"

Last edited by Major (2011-04-17 06:44:56)

Re: Simple batch files for integrating updates and drivers in Win7

@mr_smartepants
I have the HDD set the same way in VB and Yes if I do not integrate DP MassStorage in to the Boot.wim it finds the hard drive just fine but as soon as the DP is integrated I can no longer see the drive. When you integrate the DP do you add all drivers or only select drivers? (ICH10R controller) setup using raid0 this might be the problem?

@major
Thanks for the tip I was using the %Process_architecture% =="AMD64" but changed to your recommendation I will post it later for you to look at I am sure there is a better way to do it but so far it seems to be working.

http://d1syubgj0w3cyv.cloudfront.net/cdn/farfuture/5NQ1BpqvDa_0vDwtHeoZCcSJjOVNuvMXSp4i7SE7DQA/perpetual:forever/userbar/moderator-1.png

Re: Simple batch files for integrating updates and drivers in Win7

I'm putting the final touches on my .iso for my personal use.  I'll test one more time in VB once I add the drivers.
Tested in VB and working just fine.  I don't remove anything from my source.
I'll test on real hardware tonight.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

@ mr_smartepants
Ok let me know how it goes I am getting mine ready also for a new install on a Kingston SSD

@major
ok here is the setupcomplete file so far let me know if you have any other suggestions. I figured out how to add most of the IE setting in the Autounattend.xml file the others I have got to work by running a bat file on first login.

Thanks,
Dean

SetupComplete.cmd

@echo off
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:\sources\install.wim set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%
::Begin hotfix install

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /V "EnableLUA" /T "REG_DWORD" /D "0" /F

:Malicious software removal tool
echo Installing Malicious Software Removal Tool
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\windows-kb890830-x64-v3.18.exe /Q
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\windows-kb890830-v3.18.exe /Q

:Misc apps 
echo Installing Miscellaneous Apps
start /wait %CDROM%\updates\Silverlight4.exe
start /wait %CDROM%\updates\flashaio.exe
start /wait %CDROM%\updates\Win7codecs_v281_do.exe
start /wait %CDROM%\updates\Java6u24.exe
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\Java6u23_x64.exe
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\x64Components_v285.exe -ai
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\Mse_x64.exe
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\Mse_x86.exe

:VC Redist Runtimes
echo Installing VC Redist Runtimes
start /wait %CDROM%\updates\runtimes\fsharp_redist\fsharpredist2.0.msi /qn
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\runtimes\vcredist_x64_2005\vcredist.msi /qn
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\runtimes\vcredist_x64_2008\vc_red.msi /qn
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\runtimes\vcredist_x64_2010\vc_red.msi /qn
start /wait %CDROM%\updates\runtimes\vcredist_x86_2005\vcredist.msi /qn
start /wait %CDROM%\updates\runtimes\vcredist_x86_2008\vc_red.msi /qn
start /wait %CDROM%\updates\runtimes\vcredist_x86_2010\vc_red.msi /qn


:IE Registrty Add
::echo Adding IE Registry Setting
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "DisableFirstRunCustomize" /T "REG_DWORD" /D "1" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Check_Associations" /T "REG_SZ" /D "NO" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Friendly http errors" /T "REG_SZ" /D "NO" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Show image placeholders" /T "REG_DWORD" /D "1" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Start Page" /T "REG_SZ" /D "about:blank" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "UseSWRender" /T "REG_DWORD" /D "1" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PhishingFilter" /V "EnabledV9" /T "REG_DWORD" /D "0" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes" /V "DefaultScope" /T "REG_SZ" /D "{52ADEEAA-7118-4D93-944B-4C284B1DD322}" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes" /V "DownloadUpdates" /T "REG_DWORD" /D "0" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{52ADEEAA-7118-4D93-944B-4C284B1DD322}" /V "DisplayName" /T "REG_SZ" /D "Google" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\{52ADEEAA-7118-4D93-944B-4C284B1DD322}" /V "URL" /T "REG_SZ" /D "http://www.google.com/search?q={searchTerms}&rls=com.microsoft:{language}&ie={inputEncoding}&oe={outputEncoding}&startIndex={startIndex?}&startPage={startPage}" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /V "Groups" /T "REG_DWORD" /D "0" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /V "NewTabNextToCurrent" /T "REG_DWORD" /D "0" /F
::REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing" /V "NewTabPageShow" /T "REG_DWORD" /D "0" /F


:Defender Definitions
echo Installing Windows Defender Definition updates
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\mpas-fex64.exe /Q
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\mpas-fe.exe /Q

:Security Essentials
echo Installing Microsoft Security Essentials updates
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\mpam-fex64.exe /Q
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\mpam-fe.exe /Q

:DirectX
echo Updating DirectX
start /wait %CDROM%\updates\directx\DXSETUP.exe /silent

:NET Framework 4
echo Installing .NET 4 Framework
::start /wait Client\netfx_core_x64.msi EXTUI=1
::start /wait Extended\netfx_extended_x64.msi EXTUI=1
start /wait %CDROM%\updates\dotNetFx40_Full_x86_x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2160841-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2416472-x64.exe /passive /norestart
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\NDP40-KB2446708-x64.exe /passive /norestart
start /wait %CDROM%\updates\NDP40-KB2416472-x86.exe /passive /norestart
start /wait %CDROM%\updates\NDP40-KB2446708-x86.exe /passive /norestart
start /wait %windir%\Microsoft.NET\Framework\v4.0.30319\ngen executequeueditems
IF EXIST %SystemRoot%\SysWOW64 start /wait %windir%\Microsoft.NET\Framework64\v4.0.30319\ngen executequeueditems

:options
::Requires .NET 4
echo Installing Super Calendar
IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\WinCal-Win7-amd64-en-us.exe /S /v/qb
IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\updates\WinCal-Win7-x86-en-us.exe /S /v/qb

echo Installing Pinball
start /wait %CDROM%\updates\WinPinball-en-us.exe /S /v/qb
::start /wait %CDROM%\updates\ /silent

:WPIW
::Begin WPIW
echo Starting Windows Post-Install Wizard
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "Disable Script Debugger" /T "REG_SZ" /D "no" /F
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /V "DisableScriptDebuggerIE" /T "REG_SZ" /D "no" /F
::Start %CDROM%\WPI\wpi.exe

::all processing finished, delete used files, and EXIT::
:CLEANUP
::SHUTDOWN /R /T 60
IF EXIST %windir%\Setup\scripts RD /S /Q %windir%\Setup\scripts >nul
DEL /F /Q %0% >nul
exit
http://d1syubgj0w3cyv.cloudfront.net/cdn/farfuture/5NQ1BpqvDa_0vDwtHeoZCcSJjOVNuvMXSp4i7SE7DQA/perpetual:forever/userbar/moderator-1.png

Re: Simple batch files for integrating updates and drivers in Win7

Thanks Dean!  I like the combined script.  I may use it myself.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

I think you have forgotten sometimes in The commands on x86, IF NOT EXIST %SystemRoot%\SysWOW64, for example

start /wait %CDROM%\updates\runtimes\vcredist_x86_2005\vcredist.msi /qn
start /wait %CDROM%\updates\runtimes\vcredist_x86_2008\vc_red.msi /qn
start /wait %CDROM%\updates\runtimes\vcredist_x86_2010\vc_red.msi /qn

You have to take a look in it again to fix some commands. Respect to the firstlogocommands, is a good idea, but i think it only applied to the first user, i means if you logon with the user created and then you create a new user, the HKCU will not be applied to the new user. I am not sure, I will try it and then tell you. For HKCU i use the other method

@echo off
REG LOAD "HKU\zzz" "%SystemDrive%\Users\Default\NTUSER.DAT"
Start /wait Regedit /S "%AppsRoot%\Install\RegTweaks.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\Install\WinRAR.4.00\Settings.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\Install\Messenger.14.0.8117.416\Messenger.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\install\Codecs\DivX.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\install\Codecs\AC3Filter.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\install\Codecs\ReClock.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\Install\KMPlayer.3.0.0.1439\KMPlayer.HKCU.reg"
REG UNLOAD "HKU\zzz"

Re: Simple batch files for integrating updates and drivers in Win7

Updated first post with fixed scripts.  Fixed drivers-x86, was missing image #5 (Ultimate).  Updated setupcomplete.cmd to include both x86 & x64 items (Thanks dolivas!)

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

(first, thank you for the excellent tools! smile )

Pardon my ignorance but...will these function just as "useful" as a Windows VBscript?

PROUD Windows 7 User...and HAPPY too. smile ( I may be a n00b HERE but I'm not a n00b... wink ) Thank you DriverPacks.net, you guys have saved me HUNDREDS of times already. smile

Re: Simple batch files for integrating updates and drivers in Win7

Yes.  In fact a VPS script would actually extend the functionality quite a bit.  But batch-script is easy, and these would make a good learning tool for those willing to look.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

Hi mr_smartepants

I am inexperienced and am trying to integrate drivers in my image of Windows 7.

My doubt: driverpacks Chipset must be integrated in Boot.wim or Install.wim?

Thanks

Re: Simple batch files for integrating updates and drivers in Win7

Just Install.wim.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

Thanks for the fast reply and congratulations for its excellent script!

Re: Simple batch files for integrating updates and drivers in Win7

This is my Windows 7 script for adding drivers and updates. I have a separate one for 64 bit. This is kinda like mr_smartepants but with a little more bells and whistles as they say. I just double click and let it do its thing. I found that the Boot.wim has 2 index so I add boot drivers to both and all is working fine

@echo off
color 9f

::Win7_x32
::Set Paths

:Path To Mount Folder
set mnt1="%~dp0MountStarter"
set mnt2="%~dp0MountBasic"
set mnt3="%~dp0MountPremium"
set mnt4="%~dp0MountPRO"
set mnt5="%~dp0MountUltimate"

:Path To Source .wim
set src="%~dp0Win7Wims\Install"

:Path To Driver Packages
set system-drivers="%~dp0Drivers"

:Path To Update Packages
set updates1="%~dp0Updates"

cls
:STARTER
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting STARTER 
echo.
Dism /Mount-Wim /WimFile:"%src%\install.wim" /Name:"Windows 7 STARTER" /MountDir:%mnt1%
echo.
echo Installing Drivers To STARTER 
echo.
Dism /image:%mnt1% /Add-Driver /driver:%system-drivers% /recurse
echo.
echo Slipstreaming Updates To STARTER 
echo.
Dism /Image:%mnt1% /Add-Package /PackagePath:%updates1%
echo.
echo Unmounting And Saving Changes To STARTER 
echo.
Dism /Unmount-Wim /MountDir:%mnt1% /commit
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

:BASIC
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting BASIC 
echo.
Dism /Mount-Wim /WimFile:"%src%\install.wim" /Name:"Windows 7 HOMEBASIC" /MountDir:%mnt2%
echo.
echo Installing Drivers To BASIC 
echo.
Dism /image:%mnt2% /Add-Driver /driver:%system-drivers% /recurse
echo.
echo Slipstreaming Updates To BASIC 
echo.
Dism /Image:%mnt2% /Add-Package /PackagePath:%updates1%
echo.
echo Unmounting And Saving Changes To BASIC 
echo.
Dism /Unmount-Wim /MountDir:%mnt2% /commit
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ


:PREMUIM
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting PREMIUM 
echo.
Dism /Mount-Wim /WimFile:"%src%\install.wim" /Name:"Windows 7 HOMEPREMIUM" /MountDir:%mnt3%
echo.
echo Installing Drivers To PREMUIM
echo.
Dism /image:%mnt3% /Add-Driver /driver:%system-drivers% /recurse
echo.
echo Slipstreaming Updates To PREMUIM
echo.
Dism /Image:%mnt3% /Add-Package /PackagePath:%updates1%
echo.
echo Unmounting And Saving Changes To PREMUIM 
echo.
Dism /Unmount-Wim /MountDir:%mnt3% /commit
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ



:PRO
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting PRO 
echo.
Dism /Mount-Wim /WimFile:"%src%\install.wim" /Name:"Windows 7 PROFESSIONAL" /MountDir:%mnt4%
echo.
echo Installing Drivers To PRO
echo.
Dism /image:%mnt4% /Add-Driver /driver:%system-drivers% /recurse
echo.
echo Slipstreaming Updates To PRO
echo.
Dism /Image:%mnt4% /Add-Package /PackagePath:%updates1%
echo.
echo Unmounting And Saving Changes To PRO 
echo.
Dism /Unmount-Wim /MountDir:%mnt4% /commit
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ


:ULTIMATE
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting ULTIMATE 
echo.
Dism /Mount-Wim /WimFile:"%src%\install.wim" /Name:"Windows 7 ULTIMATE" /MountDir:%mnt5%
echo.
echo Installing Drivers To ULTIMATE
echo.
Dism /image:%mnt5% /Add-Driver /driver:%system-drivers% /recurse
echo.
echo Slipstreaming Updates To ULTIMATE
echo.
Dism /Image:%mnt5% /Add-Package /PackagePath:%updates1%
echo.
echo Unmounting And Saving Changes To ULTIMATE
echo.
Dism /Unmount-Wim /MountDir:%mnt5% /commit
echo.
echo.
echo Update and Driver Integration Complete
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
GOTO Boot

:Boot
::x32 Boot Drivers

:Path to mount folder
set mnt="%~dp0BootMount"

:Path to source .wim
set src="%~dp0Win7Wims\Boot"

:Path to driver packages
set driver-boot="%~dp0BootDrivers"


cls
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting Boot.wim
echo.
Dism /Mount-Wim /WimFile:%src%\BOOT.WIM /index:1 /MountDir:%mnt%
echo.
echo Adding Drivers To Boot.wim
echo.
Dism /image:%mnt% /Add-Driver /driver:%driver-boot% /recurse
echo.
echo Unmounting Boot.wim
echo.
Dism /Unmount-Wim /MountDir:%mnt% /commit
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ

echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
echo.
echo Mounting Boot.wim 2
echo.
Dism /Mount-Wim /WimFile:%src%\BOOT.WIM /index:2 /MountDir:%mnt%
echo.
echo Adding Drivers To Boot.wim 2
echo.
Dism /image:%mnt% /Add-Driver /driver:%driver-boot% /recurse
echo.
echo Unmounting Boot.wim 2
echo.
Dism /Unmount-Wim /MountDir:%mnt% /commit
echo.
echo ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
pause

Re: Simple batch files for integrating updates and drivers in Win7

Thanks Chris.
Boot.wim index 1 is the emergency recovery partition.  I'm told that integrating drivers into index-1 will corrupt it.  I've never tried it myself, I use my DART 7 ERD disc for recovery work.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

Thanks Chris.
Boot.wim index 1 is the emergency recovery partition.  I'm told that integrating drivers into index-1 will corrupt it.  I've never tried it myself, I use my DART 7 ERD disc for recovery work.

No problem, mr_smartepants. I make a folder in the $OEM$\$1 called Install. All of my programs (firefox etc...) and updates (net 4 etc....) are copied to the C drive during install and in my unattended.xml, I have a first log on command that runs my .cmd from the Install folder called Win7x86.cmd and of course on 64 Win7x64.cmd (so I don't get them mixed up is why I name them this way)



I haven't had any trouble yet. Nothing corrupt and your right, its the recovery partition. I think maybe the drivers would come in handy in the recovery partition but I can't be sure.


By the way, I have booted in to recovery and no problems from a disc with drivers integrated into Boot index 1

Last edited by laddanator (2011-11-07 10:11:52)

Re: Simple batch files for integrating updates and drivers in Win7

mr_smartepants,

                    Where can I get Debugging Tools For Windows? I found the DART Tool but it was 6.5 not 7. It is asking for that Debugging Tool. Microsoft wants you to buy that I think? Is DART 7 the latest version?

Re: Simple batch files for integrating updates and drivers in Win7

DART 7 is the current version and part of the Microsoft Desktop Optimization Pack 2011 (MDOP).  I'll see if I can find a link for you.  If you have a MS Live acct, you should be able to log in here:
http://msdn.microsoft.com/en-us/windows … 63009.aspx

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

DART 7 is the current version and part of the Microsoft Desktop Optimization Pack 2011 (MDOP).  I'll see if I can find a link for you.  If you have a MS Live acct, you should be able to log in here:
http://msdn.microsoft.com/en-us/windows … 63009.aspx

We are Microsft Partners but on a small scale, I guess. I logged into Technet and I was able to down load the new MDOP 2011 R2 but not able to download the "Debugging Tools with the Windows Driver Kit Developer Preview" from that link. I was able to get the SDK with Debugging Tools from May of 2010. You think that is out of date?

Re: Simple batch files for integrating updates and drivers in Win7

laddanator wrote:

I was able to get the SDK with Debugging Tools from May of 2010. You think that is out of date?

I think that was where I got them from.  The .msi installers I have all have a 4/19/2010 date.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: Simple batch files for integrating updates and drivers in Win7

Can someone tell me why this command is giving me a "no disk error" but it will find Windows folder on K:. K is the Windows 7 drive letter and C is XP. Why would it skip C. I have been using this command to setpagefile with Setpagefile.exe forever and now I get the no disk error and it skips C

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:\Windows SET PageFile=%%i:
echo %PageFile%

This does the same also %%i:Windows

by the way if I hit cancel til it gets to K all is well but how do you suppress the error message? Weird how it never did this before

Last edited by laddanator (2011-11-14 12:20:16)

Re: Simple batch files for integrating updates and drivers in Win7

What is the environment the batch is run in?  Why not just use %systemdrive% or %windir% or %systemroot% and skip the whole drive-scan?  %systemdrive% will return the drive letter (K:\) of the OS you're running in and the others will return "K:\Windows".

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!