RicaNeaga Posted March 25, 2012 Share Posted March 25, 2012 I'm talking about the new online drivers installer found in 1.4.0, with the features described by ricktendo here.Why would anyone need it? What are the advantages over integrating the drivers with DISM?1. This would make an AIO driver + windows 7 ISO truly possible, making the probability of conflicts even lower (the example of the AMD PCIE filter chipset driver installing on Intel-based systems comes to mind);2. On the system only the needed drivers are installed and copied to drive C:, so a balast content with other drivers will be avoided;3. Useful for a novice user, that doesn't have to hand-pick the needed drivers, but can ''integrate'' hundreds of them without any other worry.After months of work (not continuous work, of course), I'm finalizing a pack of ONLY-windows-7 drivers, based on the driverpacks - heavily updated and more organised. And with such a powerful tool, the usefulness of such a pack will be even greater - people will not have to hand-pick their drivers and just integrate all the folder. Such a behaviour is unfortunately also common now with W7T users for integrating the current driverpacks, and this is not a very good idea.So I don't know if this is doable, and to be more precise if this utility can be run before the second phase of windows installation starts. It has to because that's when the windows installation process starts to look for the (microsoft integrated) drivers needed. And this is just exaclty what the great driverpacks integrating tool can do ONLY for windows xp.I also hope ricktendo and Kelsenellenelvian will comment on this one. Quote Link to comment Share on other sites More sharing options...
ricktendo Posted March 26, 2012 Share Posted March 26, 2012 You can also use it to remove outdated drivers to regain HDD/SSD space Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted March 26, 2012 Share Posted March 26, 2012 (edited) Why would anyone need it? What are the advantages over integrating the drivers with DISM?Simply answer really, someone requested it so i added it. As rick said it lets you remove outdated drivers also.Problem is i don't know the difference between Windows 7 and Windows Vista drivers, surely there's something different in the inf file? Edited March 26, 2012 by Legolash2o Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 26, 2012 Author Share Posted March 26, 2012 Legolash, I don't understand what you're saying. I'm not requesting what ricktendo already has requested, I'm requesting that somehow through W7T, the Online driver installer to be integrated into an offline image (alongside maybe a user-generated driver pack / folder), and run before the second phase of windows installation starts.About the second question, it depends - sometimes there is a mention in the .inf (like a NTamd64 6.1 for windows x64 drivers, or a NTx86 6.1 for 7 x86, or even a clear mention in the beginning - windows 7 driver), sometimes it isn't and you have to manually download the individual drivers from the producer's support site (like I already did for many).But this isn't the issue since I'll make public this pack very soon (I'm now trying to set up a ftp-like solution, and if I can't, I'm going for the usual mediafire option). The problem is how this tool can be run before the second phase of windows installation starts. And this is where I hope ricktendo / Kelsenellenelvian will help a little. Or maybe even someone from driverpacks, since a similar solution is implemented in their driver installer tool for windows xp (DriverPacks BASE). Quote Link to comment Share on other sites More sharing options...
ricktendo Posted March 26, 2012 Share Posted March 26, 2012 I think what he wants is something like I requested for your tool to support cmd line so he can use it post install to install a batch of driversI think Microsoft-Windows-PnpCustomizationsNonWinPE used with DriverPaths would work the same or better Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 26, 2012 Author Share Posted March 26, 2012 That's what I was talking about... ways to make this happen Thank you ricktendo for the solution! Quote Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted March 26, 2012 Share Posted March 26, 2012 Logistically it is near impossible.The machine would have to be able to connect to the net.Win7 wouldn't allow this untill the net group is setup. (Home\public)Hell net drivers for MOST devices wouldn't be setup. Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 26, 2012 Author Share Posted March 26, 2012 (edited) I won't interfere anymore with this discussion, since I don't know how to implement my request, but once again I remind you that there is a similar working solution for XP only, that does exactly this (the app runs before the second phase of windows xp install process) - Driverpacks BASE. Edited March 26, 2012 by RicaNeaga Quote Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted March 26, 2012 Share Posted March 26, 2012 LOL I read it COMPLETLY WRONG....Lack of sleep.I read the dp's would be downloaded during setup and used... Quote Link to comment Share on other sites More sharing options...
ricktendo Posted March 26, 2012 Share Posted March 26, 2012 "Online" only means that its applied to the OS you are currently in, it comes from the dism command /online vs /image:<path_to_mount> Quote Link to comment Share on other sites More sharing options...
bphlpt Posted March 26, 2012 Share Posted March 26, 2012 One way to handle this would be to only integrate the most urgent drivers then use mr_smartepants' SAD2 script - http://forum.driverpacks.net/viewtopic.php?id=5336 to install the rest of the required drivers. This minimizes the time to integrate the drivers but allows the flexibility of the driverpacks.Cheers and Regards Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted March 26, 2012 Share Posted March 26, 2012 Ricktendo was correct, the Online Driver installer is for the currently installed Windows and doesn't work with images at all. Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 27, 2012 Author Share Posted March 27, 2012 If the only solution is to run it at first logon, with the other switchless installers, then it's ok. I would have preffered it to give that drivers to the windows installation process during the second phase, but better this then nothing. Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted March 27, 2012 Share Posted March 27, 2012 (edited) Again, Online Drivers does not work with wim images, it works on the currently installed OS, there isn't a second phase if Windows is already installed. It will probably not benefit the installation at all apart from slow it down.Online Driver Installer does not even use dism, it uses pnptuil Edited March 27, 2012 by Legolash2o Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 27, 2012 Author Share Posted March 27, 2012 I understand that. I was asking you to make (smth like) a silent installer, that runs this online drivers app automatically (for ex.) at first logon (as the rest of the silent installers, like ricktendo's .net4), and installs only the needed drivers from a batch folder of hundreds of drivers.I already mentioned the advantages in the first post, as an alternative to the DISM way of installing drivers.Please don't be mad because I insist on this feature - I really consider it CLEARLY SUPERIOR to DISM integrating of drivers especially for novice users. Hope you'll consider solving my request at some time in the future Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted March 27, 2012 Share Posted March 27, 2012 It's a big task so it will definitely have to wait.P.S. I aint mad Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 27, 2012 Author Share Posted March 27, 2012 lol don't get mad. and thanks! I ain't in a hurry. Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted March 27, 2012 Share Posted March 27, 2012 What i can do is, if W7TRunOnce detects a "Drivers" folder on any partition/dvd/usb root it will use pnputil to install all the inf files? Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 28, 2012 Author Share Posted March 28, 2012 (edited) Great! I have four suggestions:1. The name of that folder maybe shouldn't be so common - a Drivers folder is also in windows directory; a ''W7TDrivers'' folder name (that a user can copy to the usb root, or make another ISO and include it) I think will be more appropriate;2. An option in the ISO Maker that isn't checked by default, to also add/copy the ''W7TDrivers'' folder to the root of the iso;3. Make the the implicit and only option that pnptuil only installs the needed (found on the system) drivers; if advanced users, that aren't interested in saving HDD/SSD space and for other reasones, want to have an AIO disk, with all the drivers on the planet integrated, then DISM can already do that for them. 4. An option to also delete all the not-present-on-the-machine / not-needed-drivers Microsoft drivers (if it is doable), to further save HDD/SSD space; but I don't know if this will have the potential for potential failures (bluescreens etc) afterwards... in case other hardware is added to the system. For non-important drivers (chipset, mass storage, usb), such a risk I think will be very close to 0.LE: and a fifth suggestion - please recheck Mr. ricktendo's post from this thread.... maybe will help Edited March 28, 2012 by RicaNeaga Quote Link to comment Share on other sites More sharing options...
bphlpt Posted March 28, 2012 Share Posted March 28, 2012 @RicaNeaga, have you had a chance to check out the SAD2 script I mentioned earlier?One way to handle this would be to only integrate the most urgent drivers then use mr_smartepants' SAD2 script - http://forum.driverp...pic.php?id=5336 to install the rest of the required drivers.Since you're now talking about adding the drivers at first logon, I was wondering how you thought the script's actions compared with what you were wanting to accomplish?Cheers and Regards Quote Link to comment Share on other sites More sharing options...
RicaNeaga Posted March 28, 2012 Author Share Posted March 28, 2012 That script is driverpacks-folder tyed. It's like saing ''Hey, Apple has an alternative to Flash''. It's just my take on this, my opinion. And I really don't like the current way driverpacks for windows 7 looks like. That's why I ''wasted'' so much time updating it / making it windows 7 - only / adding drivers to it... Quote Link to comment Share on other sites More sharing options...
ianymaty Posted March 28, 2012 Share Posted March 28, 2012 I think the SAD2 solution would be the best solution and easy to implement with setupcomplete.cmdAll you have to do is to copy the DPs into the image and setup the script to run at first logon. A window with the progress would be handy here.~ 800 MB of drivers will fit along with the setup files on a DVD5 eventualy, filtering out Chipset and MassStorage that will be integrated into the imageI want this feature implemented if possible. Quote Link to comment Share on other sites More sharing options...
Mr_Smartepants Posted March 29, 2012 Share Posted March 29, 2012 (edited) What i can do is, if W7TRunOnce detects a "Drivers" folder on any partition/dvd/usb root it will use pnputil to install all the inf files?I really like where this discussion is going. But to be honest, I don't think either DISM or pnputil will give you the desired result.See, both are great for removing drivers from either the offline or online OS (respectively), but both will add ALL drivers to the OS whether they're needed or not.Quote taken from here:http://technet.micro...v=ws.10%29.aspxDrivers that are located in the path specified by DriverPaths are copied to the driver store ...So this continues the problem of driverstore bloat. What I use in my SAD2 script is the Microsoft tool dpinst.exe. There are two versions (incompatible with each other) for 32 & 64 bit OS.Where dpinst excels is that it only installs drivers for the hardware that is present during execution.About 95% of my script deals with OS detection, path resolution, and driverpack extraction. The "meat & potatoes" line that gets the drivers loaded is right here:Start "MicroSoft Driver Installer Tool Running" /wait /separate /realtime /min CMD /C DPInst.exe /c /sBut in order for this to work, dpinst needs to be copied to the root of the folder containing all the drivers.The line I was experimenting with for pnputil usage was this::: pnputil -a -i %SystemDrive%\D\*\*.infBut again, this loads ALL the detected drivers into the driverstore.RickNeaga is right though, my script is hard-coded to a specific folder structure. I am working on adding more code to allow for a more flexible folder structure though.Here's my entire script:::Except otherwise noted, the open-source code of the DP_Install_Tool.cmd file is © 2011-2012 by Erik Hansen for DriverPacks.net, under a Creative Commons Attribution-ShareAlike license: http://creativecommo...ses/by-sa/3.0/.::7-Zip is open source software by Igor Pavlov. Most of the source code is under the GNU LGPL license. The unRAR code is under a mixed license: GNU LGPL + unRAR restrictions. Check license information here: http://www.7-zip.org/license.txt or http://www.gnu.org/licenses/lgpl.html::DPInst.exe is proprietary code owned completely by Microsoft and distributed under their own license. (see .\bin\*\dpinst-license.rtf):: rev 12.03.26:: Originally written by Jeff Herre AKA OverFlow, significantly rewritten by Erik Hansen AKA Mr_Smartepants.:: Modified by Brent Newland (casipc.com) to support network shares and UAC elevation:: A Script to use Microsoft's DPInst.exe with the DriverPacks.:: Help and Support available at http://forum.driverp...pic.php?id=5336:: This script assumes that the original folder structure of the downloaded archive remains intact.:: Please do not alter the folder structure unless you REALLY know what you are doing and alter the below code accordingly.:: Changelog::: v120326:: Fixed code to prevent errors during cleanup stage (Iceblackice):: v120318:: Added code to enable switches. Only a Help guide and "Silent" operation for now. (Erik Hansen):: v120317:: Added code for silent operation. No prompts, displays progress only. (Erik Hansen):: Added code to delete folders not needed. (Erik Hansen):: v120217:: Updated command line 7-zip in \bin folder to 9.22. (Erik Hansen):: v120215:: Added command line 7-zip to \bin folder and code to use. (Erik Hansen):: Updated elevate.vbs to current version from MSDN.:: Optimized OS detection subroutines.:: Fixed log file output reference to %windir%\dpinst.log.:: v120203:: Added code to use native installed 7-Zip IF present. (Erik Hansen):: Fixed bug with extra space in %ARCH% variable:: v111118:: Fixed typo in log file output reference.(Twig123/Dave):: v111009:: Fixed typo in KTD option code.(Erik Hansen):: v111008:: Added code to allow user to change Keep The Drivers (KTD) option (Erik Hansen):: Fixed bug where DriverPacks wouldn't be found IF there were spaces in the path.:: v110713:: Fixed code to prevent errors during cleanup stage (Erik Hansen):: Added code to report accurate CPU type (Erik Hansen):: Added code to detect DP_*.7z files in the current directory (Erik Hansen):: v110505:: Fixed code to prevent writing log to read-only disc (Erik Hansen):: Repackaged dpinst* files to prevent accidental deletion. (Erik Hansen):: v110504:: Fixed bug where NT6 Method 1 fails prematurely. (Erik Hansen):: v110503:: Fixed code to remove extra backslash from path if one exists. (Erik Hansen):: v110502:: Fixed un7zip code to allow for wildcard file extraction (Erik Hansen):: v110501:: Updated to support network shares and UAC elevation for NT6 (Brent Newland):: Fixed CPU detection to allow for 32-bit OS on 64-bit CPU (Erik Hansen):: Fixed un7zip code to allow breakpoints (Brent Newland):: v110312 (Erik Hansen):: Fixed missing NT5\x86\dpinst.* files:: Updated to current DriverPack ChipSET versions.:: v110213 (Erik Hansen):: Added NT6 Method 1 functionality.:: Added check for UNC (\\server\path\to\file) paths. Cmd.exe will fail if UNC path is used.:: Changed Method 1 COPY function to XCOPY for reliability.:: Improved readme.txt instructions.@ECHO off: Default options:: Change SILENT option to "Y" if you want to bypass all prompts but make sure the next two options are set to your preferences first.SET "SILENT=N":: KTD option. Default is "N", "Y" will not delete any drivers from the %systemdrive%\D\ folder.SET "KTD=N":: OS folder clean option. Default is "N", "Y" will delete any drivers for OS folders not needed.SET "CLEAN=N": Help optionsif "%1"=="/?" goto usageif "%1"=="/h" goto usageif "%1"=="/H" goto usageif "%1"=="/S" SET "SILENT=Y"::if "%1"=="/K" SET "KTD=Y"::if "%1"=="/C" SET "CLEAN=Y":: Check for network paths, assign temporary drive letter IF found.SET pd=%~dp0pushd %~dp0SET cur=%cd%:slash:: Strip all trailing backslash from path. \\ should become \ then nothing.IF [%cur:~-1%]==[\] SET "cur=%cur:~0,-1%"IF [%cur:~-1%]==[\] GOTO slashclsTITLE DriverPacks.net Stand Alone Driver Updater v2.0 & Color 9fSET LOG=nul & IF [%1] NEQ [] (IF /I [%1] NEQ [Q] (SET LOG=%1) & IF /I [%1] EQU [V] (SET LOG=CON))SET msg2=%msg% %username%:OS-checkFOR /F "tokens=2*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentBuildNumber') DO SET build=%%BFOR /F "tokens=2*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName') DO SET prodname=%%BFOR /F "tokens=2*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v InstallationType') DO SET installtype=%%BIF /I "%build%"=="2600" SET OSbuild=NT5FOR %%i IN (6000 6001 6002 7600 7601 7602) DO (IF /I "%build%"=="%%i" SET OSbuild=NT6 )SET "OSTYPE=WINXP"FOR %%i IN (6000 6001 6002) DO (IF /I "%build%"=="%%i" SET "OSTYPE=VISTA" )FOR %%i IN (7600 7601 7602) DO (IF /I "%build%"=="%%i" SET "OSTYPE=WIN7" )IF "%INSTALLTYPE%"=="Server" SET "OSTYPE=SERVER"ECHO. & ECHO Locating the DriverPacks...SET "M=0"IF "%OSbuild%"=="NT6" GOTO Elevate:PROCESSOR:: Detect Processor type on running systemSET "ARCH=32"IF EXIST "%SystemRoot%\SysWOW64" SET "ARCH=64" & GOTO PROCESSOR3:PROCESSOR2:: No 64-bit system folders found, must be 32-bit system regardless of processor typeSET "DPLoc=%cur%\%OSbuild%\x86"GOTO ZipCheck:PROCESSOR3:: 64-bit system folders found, must be 64-bit system double-check for x86 processor for error?SET "DPLoc=%cur%\%OSbuild%\x64"IF /I "%PROCESSOR_ARCHITECTURE%"=="x86" GOTO Error3:ZipCheckSET zip=NIF EXIST "%programfiles%\7-Zip\7z.exe" (SET "zpath=%programfiles%\7-Zip\7z.exe" & SET "zip=Y" & GOTO ZipFound)IF EXIST "%cur%\bin\%ARCH%\7z.exe" (SET "zpath=%cur%\bin\%ARCH%\7z.exe" & SET "zip=Y" & GOTO ZipFound):ZipFoundIF not EXIST "%zpath%" SET zip=N:DoubleCheck::Check for XP-64IF "%OSbuild%"=="NT5" GOTO Method5IF "%OSbuild%"=="NT6" GOTO Method6GOTO Error1:Method5::Double check for XP-64IF /I [%PROCESSOR_ARCHITECTURE%] NEQ [x86] GOTO Error1IF EXIST "%cur%\D\" (SET "DPLoc=%cur%" & SET "M=1" & GOTO Message2)IF EXIST "%DPLoc%\D\" (SET "M=1" & GOTO Message2)IF EXIST "%DPLoc%\DP_*.7z" (SET "M=2" & GOTO Found)IF EXIST "%cur%\DP_*.7z" (SET "DPLoc=%cur%" & SET "M=2" & GOTO Found)ECHO Searching Root folders since DriverPacks were not found in current folder...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) DO (IF EXIST "%%i:\OEM\bin\un7zip.exe" SET "M=2"IF EXIST "%%i:\$OEM$\$1\D\" (SET "DPLoc=%%i:\$OEM$\$1" & SET "M=1" & %%i)IF "%M%">="1" GOTO Message2)ECHO. & ECHO Strange... The DriverPacks were not found in %DPLoc% & ECHO. & Pause & GOTO Done:Method6IF "%ARCH%"=="32" SET "ARCHP=X86"IF "%ARCH%"=="64" SET "ARCHP=X64"FOR %%i IN (3 A B 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 "%DPLoc%\%%i\" SET "M=1" & GOTO Message2 )IF EXIST "%DPLoc%\DP_*.7z" (SET "M=2" & GOTO Found)ECHO. & ECHO Strange... The DriverPacks were not found in %DPLoc% & ECHO. & Pause & GOTO Done:FoundIF "%zip%"=="Y" GOTO Message2IF not EXIST "%cur%\bin\un7zip.exe" GOTO Error2:Message2IF "%SILENT%"=="Y" GOTO Lets-GO::Reset variables to defaultsSET "KTD=N"SET "CLEAN=N"clsSETlocalECHO ********************************************************************ECHO Released under Creative Commons Attribution-ShareAlike licenseECHO %msg2% please read below carefully. ECHO.ECHO Operating System Architecture Detected:ECHO %prodname% %ARCH%-bit on %PROCESSOR_ARCHITECTURE% compatible CPUECHO CPU: %PROCESSOR_IDENTIFIER% ECHO.ECHO %ARCH%-bit DriverPacks will be installed fromECHO %DPLoc% using method: %M%ECHO Native 7-zip command line application found? %zip%ECHO.ECHO IF this is NOT intended, exit the program now!ECHO ********************************************************************ECHO Do you want to Keep The Drivers (KTD) after install?ECHO Answer Y/N (Y- will keep all drivers unless deleted manually)ECHO ********************************************************************:KTD-optionSET /p option=[Y,N]?IF "%option%"=="Y" SET "KTD=Y"IF "%option%"=="y" SET "KTD=Y"IF "%KTD%"=="Y" ECHO KTD option has been enabled.:Message3ECHO.ECHO ********************************************************************ECHO Do you want to remove drivers not needed by this OS?ECHO Answer Y/N (N- will use all drivers from every folder)ECHO ********************************************************************:CLEAN-optionSET /p option=[Y,N]?IF "%option%"=="Y" SET "CLEAN=Y"IF "%option%"=="y" SET "CLEAN=Y"IF "%CLEAN%"=="Y" ECHO Unnecessary drivers will be deleted prior to integration.:Lets-GOSET DPFL=%SystemDrive%\DPsFnshr.iniIF NOT EXIST "%SystemDrive%\D\" MD "%SystemDrive%\D\":dpinstIF "%zip%"=="Y" GOTO dpinstNativeECHO. & ECHO Extracting the DriverPacks %ARCH%-bit core files.Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%cur%\bin\%ARCH%\dpinst.7z" %SystemDrive%\D\GOTO Method1:dpinstNativeECHO. & ECHO Extracting the DriverPacks %ARCH%-bit core files using native 7-Zip.Start /wait /separate /high "" "%zpath%" x "%cur%\bin\%ARCH%\dpinst.7z" -o"%SystemDrive%\D\":Method1IF "%M%"=="1" ( ECHO. & ECHO Preparing the DriverPacks files. Method 1 was found. & ECHO.IF NOT "%DPLoc%"==%SystemDrive% ECHO Copying Driverpacks files & XCOPY "%DPLoc%\." "%SystemDrive%\D\." /E /HECHO [settings] > %DPFL%ECHO DPsRoot = "%DPLoc%" >> %DPFL%ECHO DPsRootDel = "false" >> %DPFL%ECHO debug = "true" >> %DPFL%CD %DPLoc%\D ):Method2IF "%zip%"=="Y" GOTO Method2NativeIF "%M%"=="2" ( ECHO. & ECHO Preparing the DriverPacks now. Method 2 was found. & ECHO. ECHO Extracting DriverPacks from: %DPLoc% for %%f in ("%DPLoc%\DP_*.7z") do Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%%f" %SystemDrive%\D\ IF "%OSbuild%"=="NT6" GOTO Begin COPY /Y "%DPLoc%\*.ins" %SystemDrive%\Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%cur%\bin\DPsFnshr.7z" %SystemDrive%\%SystemDrive% & cd %SystemDrive%\DECHO [settings] > %DPFL%ECHO DPsRoot = "%SystemDrive%" >> %DPFL%ECHO DPsRootDel = "true" >> %DPFL%ECHO debug = "true" >> %DPFL% )GOTO SKIPKTD:Method2NativeIF "%M%"=="2" ( ECHO. & ECHO Preparing the DriverPacks now. Method 2 was found. & ECHO Using native 7-Zip ECHO Extracting DriverPacks from: %DPLoc% for %%f in ("%DPLoc%\DP_*.7z") do Start /wait /separate /high "" "%zpath%" x "%%f" -o"%SystemDrive%\D\" IF "%OSbuild%"=="NT6" GOTO Begin COPY /Y "%DPLoc%\*.ins" %SystemDrive%\Start /wait /separate /high "" "%zpath%" x "%cur%\bin\DPsFnshr.7z" -o"%SystemDrive%\"%SystemDrive% & cd %SystemDrive%\DECHO [settings] > %DPFL%ECHO DPsRoot = "%SystemDrive%" >> %DPFL%ECHO DPsRootDel = "true" >> %DPFL%ECHO debug = "true" >> %DPFL% ):SKIPKTDIF "%KTD%"=="Y" GOTO KEEPKTDECHO KTD = "false" >> %DPFL%ECHO KTDlocation = "%SystemRoot%\DriverPacks" >> %DPFL%ECHO logLocation = "%SystemRoot%" >> %DPFL%GOTO Begin:KEEPKTDECHO KTD = "paths:D" >> %DPFL%ECHO KTDlocation = "%SystemRoot%\DriverPacks" >> %DPFL%ECHO logLocation = "%SystemRoot%" >> %DPFL%:BeginIF "%CLEAN%"=="N" GOTO Begin2:CLEAN-warnECHO OSTYPE is %OSTYPE%IF "%OSTYPE%"=="SERVER" ( ECHO drivers will be deleted from "%SystemDrive%\D\%ARCHP%\Vista\" ECHO drivers will be deleted from "%SystemDrive%\D\%ARCHP%\Win7\" )IF "%OSTYPE%"=="VISTA" ( ECHO drivers will be deleted from "%SystemDrive%\D\%ARCHP%\Server\" ECHO drivers will be deleted from "%SystemDrive%\D\%ARCHP%\Win7\" )IF "%OSTYPE%"=="WIN7" ( ECHO drivers will be deleted from "%SystemDrive%\D\%ARCHP%\Server\" ECHO drivers will be deleted from "%SystemDrive%\D\%ARCHP%\Vista\" )IF "%SILENT%"=="Y" GOTO CLEAN-folderECHO This is your final warning before drivers are deleted from unneeded OS folders.pause:CLEAN-folderIF "%OSTYPE%"=="SERVER" ( RD /S /Q "%SystemDrive%\D\%ARCHP%\Vista\" RD /S /Q "%SystemDrive%\D\%ARCHP%\Win7\" )IF "%OSTYPE%"=="VISTA" ( RD /S /Q "%SystemDrive%\D\%ARCHP%\Server\" RD /S /Q "%SystemDrive%\D\%ARCHP%\Win7\" )IF "%OSTYPE%"=="WIN7" ( RD /S /Q "%SystemDrive%\D\%ARCHP%\Server\" RD /S /Q "%SystemDrive%\D\%ARCHP%\Vista\" )ECHO Excess drivers deleted! IF "%SILENT%"=="Y" GOTO Begin2pause:Begin2%SystemDrive% & cd %SystemDrive%\DclsECHO *********************************************************************ECHO.ECHO. & ECHO.ECHO Running the MicroSoft Driver Installer now !ECHO.ECHO The progress window is minimized to the task bar & ECHO. & ECHO.ECHO. & ECHO.ECHO Please wait for the MicroSoft tool to complete its job...ECHO This may take from 2-30 minutes depending on the speed of this PC.ECHO.ECHO *********************************************************************Start "MicroSoft Driver Installer Tool Running" /wait /separate /realtime /min CMD /C DPInst.exe /c /sIF "%OSbuild%"=="NT6" GOTO LOG-file:FinisherECHO. & ECHO Running the DriverPacks.net Finisher now! & ECHO.%SystemDrive% & cd\ & Start /wait /separate /high "" DPsFnshr.exe:LOG-file:: Log and Attended output sectionIF /I [%1] NEQ [Q] (IF [LOG] NEQ [nul] ( ECHO. & ECHO Method %M% was found at: >>%LOG% ECHO %DPLoc% >>%LOG% ECHO List INF's that were matched with this system >>%LOG% FOR /F "usebackq tokens=2,3*" %%G IN ('type %windir%\dpinst.log') DO ( IF [%%G]==[successfull] IF [%%H]==[installation] ECHO %%G %%H %%I >>%LOG%)): Final MessageclsECHO *********************************************************************ECHO.ECHO. & ECHO The DriverPacks Stand Alone Drivers installation is complete!ECHO. & ECHO The log file of this utility's progress is found in %windir%\dpinst.log::ECHO & Start /min sndrec32 /play /close %windir%\media\ding.wav IF "%OSbuild%"=="NT5" GOTO Timer IF "%KTD%"=="Y" GOTO TimerECHO Now cleaning up...cd %SYSTEMDRIVE%cd \IF EXIST "%SYSTEMDRIVE%\D\x86\*" DEL /F /S /Q "%SYSTEMDRIVE%\D\x86\*" >nulIF EXIST "%SYSTEMDRIVE%\D\x64\*" DEL /F /S /Q "%SYSTEMDRIVE%\D\x64\*" >nulIF EXIST "%SYSTEMDRIVE%\D\*" DEL /F /S /Q "%SYSTEMDRIVE%\D\*" >nulIF EXIST "%SYSTEMDRIVE%\DPInst.*" DEL /F /S /Q "%SYSTEMDRIVE%\DPInst.*" >nulIF EXIST "%SYSTEMDRIVE%\D" RD /S /Q "%SYSTEMDRIVE%\D\" >nul:TimerECHO. & ECHO This window will close itself in 30 seconds... & ECHO.For /l %%A in (1,1,30) do (<nul (SET/p z=#) & >nul ping 127.0.0.1 -n 2 ) )ECHO *********************************************************************:DonepopdendlocalEXITdel %0:Error1clsECHO ********************************************************************ECHO.ECHO %msg2% ECHO.ECHO Invalid Operating System Detected:ECHO.ECHO %prodname%ECHO Which uses %OSbuild% DriverPacksECHO Not currently supportedECHO.ECHO Please exit the program now!ECHO.ECHO ********************************************************************pauseexit:Error2clsECHO ********************************************************************ECHO.ECHO.ECHO %msg2% ECHO.ECHO.ECHO un7zip.exe is missing.ECHO.ECHO.ECHO Please exit the program now!ECHO.ECHO.ECHO ********************************************************************pauseexit:Error3clsECHO ********************************************************************ECHO.ECHO %msg2% ECHO.ECHO Invalid Operating System Detected:ECHO.ECHO %prodname% %ARCH%-bit OSECHO Installed on %PROCESSOR_ARCHITECTURE% processorECHO Not currently supportedECHO.ECHO Please exit the program now!ECHO.ECHO ********************************************************************pauseexit:usageecho %0 is an batch program to automate theecho installation of drivers on any Windows system.echo Usage is %0 {/?!/h!/H} (only one switch used at a time)echo /? or /h or /H will bring up this guide.echo /S will enable "Silent" mode which will not prompt for options but willecho execute the batch with whatever options are set as default.pauseexit:Elevate::Credit to JohnGray http://www.sevenforu...and-prompt.html:: try to write a zero-byte file to a system directory:: IF successful, we are in Elevated mode and delete the file:: IF unsuccessful, avoid the "Access is denied" messageSETlocal:: arbitrary choice of system directory and filenameSET tst="%windir%\$del_me$":: the first brackets are required to avoid getting the message,:: even though 2 is redirected to nul. no, I don't know why.(type nul>%tst%) 2>nul && (del %tst% & SET elev=t) || (SET elev=)IF defined elev (GOTO PROCESSOR) else ("%cur%\bin\elevate.cmd" "%pd%\DP_Install_Tool.cmd")endlocal Edited March 29, 2012 by Mr_Smartepants Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted March 29, 2012 Share Posted March 29, 2012 Welcome MR_Smartepants Which would you recommend pnputil or DrvInst?I was thinking that if W7TRunOnce found a driver folder it could install all the drivers, but since you said drvinst only install those that are needed then im tempted to use drivinst Quote Link to comment Share on other sites More sharing options...
Mr_Smartepants Posted March 29, 2012 Share Posted March 29, 2012 (edited) Well really it depends on what the user wants to do. DISM is the only one for offline images.pnputil and dpinst are both for online (running) images but have different functions.pnputil can be used to both add and remove drivers from the online driverstore (whether they're needed or not).dpinst is used only to add drivers for hardware currently connected to the PC. (not efficient for external devices like printers etc. that need to be powered on)dpinst can't be used to remove drivers though.Ideally all three would be implemented for each of their unique strengths. I see W7T as a toolbox, you wouldn't want to be missing a screwdriver and have to resort to using a hammer. The user could indicate what folder they want the drivers forced (pnputil) and also a much larger folder to use if the system needs it (dpinst). Edited March 29, 2012 by Mr_Smartepants Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.