http://sourceforge.net/projects/autodri … =directory

From what I understand, they aren't supposed to redistribute the packs.

2

(8 replies, posted in 3rd Party Vista / 7 DriverPacks)

Found an FTP with these ftp://94.31.243.65/Operatyng%20Systems/Drivers%20Pack's/DriverPrinterSamLab/Drivers/

I've been having issues with the script. It keeps dropping the network share when it launches the VBS script.

I'm thinking it might be best to switch to an executable that elevates the script, such as http://code.kliu.org/misc/elevate/

I've taken a bit of time to add UNC (network path) and UAC (elevation) support to this tool.

DP_Install_Tool.cmd

@Echo off
set pd=%~dp0
pushd %~dp0
set cur=%cd%
cls
 :: Originally written by Jeff Herre AKA OverFlow, rewritten by Erik Hansen AKA Mr_Smartepants. rev 11.02.13
 :: 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.DriverPacks.net  
TITLE DriverPacks.net Stand Alone Driver Updater v2.0 & Color 9f

Set 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-check
FOR /F "tokens=2*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentBuildNumber') DO SET build=%%B
if /I "%build%"=="2600" set OSbuild=NT5
if /I "%build%"=="6000" set OSbuild=NT6
if /I "%build%"=="6001" set OSbuild=NT6
if /I "%build%"=="6002" set OSbuild=NT6
if /I "%build%"=="7600" set OSbuild=NT6
if /I "%build%"=="7601" set OSbuild=NT6
FOR /F "tokens=2*" %%A IN ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName') DO SET prodname=%%B
Echo. & Echo Locating the DriverPacks...
Set "M=0"
IF "%OSbuild%"=="NT6" goto Elevate

:PROCESSOR
:: Detect Processor type on running system
if /I "%PROCESSOR_ARCHITECTURE%"=="x86" set "DPLoc=%cur%\%OSbuild%\x86"
if /I "%PROCESSOR_ARCHITECTURE%"=="IA64" set "DPLoc=%cur%\%OSbuild%\x64" 
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" set "DPLoc=%cur%\%OSbuild%\x64"
if /I "%PROCESSOR_ARCHITECTURE%"=="x64" set "DPLoc=%cur%\%OSbuild%\x64"
if /I "%PROCESSOR_ARCHITEW6432%"=="IA64" set "DPLoc=%cur%\%OSbuild%\x64"
if /I "%PROCESSOR_ARCHITEW6432%"=="x64" set "DPLoc=%cur%\%OSbuild%\x64"
if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" set "DPLoc=%cur%\%OSbuild%\x64"

::Check for XP-64
IF "%OSbuild%"=="NT5" goto Method5
IF "%OSbuild%"=="NT6" goto Method6
goto Error1

:Method5
::Double check for XP-64
if /I [%PROCESSOR_ARCHITECTURE%] NEQ [x86] goto Error1
IF 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
  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 ??? & Echo. & Pause & GoTo Done

:Method6

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 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 "DPLoc=%%i:\OEM" & Set "M=2"
:: IF Exist "%%i:\$OEM$\$1\D\"   SET "DPLoc=%%i:\$OEM$\$1" & Set "M=1" & %%i
:: IF "%M%">="1" GoTo Found)
 Echo. & Echo Strange... The DriverPacks were not found ??? :( & Echo. & Pause & GoTo Done

:Found
IF not Exist "%cur%\bin\un7zip.exe" GoTo Error2

:Message2
cls
echo      ********************************************************************
echo.
echo                             %msg2%      
echo.
echo                  Operating System Architecture Detected:
echo                        %prodname% %PROCESSOR_ARCHITECTURE%
echo.
echo                   DriverPacks will be installed from 
echo                 %DPLoc%
echo.
echo               If this is NOT correct, exit the program now!
echo.
echo      ********************************************************************
pause
cls
Set DPFL=%SystemDrive%\DPsFnshr.ini

:Method1
IF "%M%"=="1" (
  Echo. & Echo Preparing the DriverPacks files. Method 1 was found. & Echo.
 IF NOT "%DPLoc%"==%SystemDrive% Echo Copying Driverpacks files & XCOPY "%DPLoc%\." %SystemDrive%\ /E /H >>%LOG
 Echo [Settings]			 	>  %DPFL%
 Echo DPsRoot     = "%DPLoc%"			>> %DPFL%
 Echo DPsRootDel  = "false"			>> %DPFL%
 Echo debug       = "true"			>> %DPFL%
 CD %DPLoc%\D
              )

:Method2
IF "%M%"=="2" (
  Echo. & Echo Preparing the DriverPacks now. Method 2 was found. & Echo.
 Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%DPLoc%\DP*.7z" %SystemDrive%\D\
 COPY /Y "%DPLoc%\DPInst.*" 			%SystemDrive%\D\ >>%LOG%
  IF "%OSbuild%"=="NT6" goto Begin
  COPY /Y "%DPLoc%\*.ins" 			%SystemDrive%\   >>%LOG%
 Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%cur%\bin\*.7z" 	%SystemDrive%\
 %SystemDrive% & cd %SystemDrive%\D
Echo [Settings]			 	>  %DPFL%
 Echo DPsRoot     = "%SystemDrive%"		>> %DPFL%
 Echo DPsRootDel  = "true"			>> %DPFL%
 Echo debug       = "true"			>> %DPFL%
              )

Echo KTD         = "false"			>> %DPFL%
Echo KTDlocation = "%SystemRoot%\DriverPacks"	>> %DPFL%
Echo logLocation = "%SystemRoot%"		>> %DPFL%

:Begin
 %SystemDrive% & cd %SystemDrive%\D
cls
echo      *********************************************************************
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 it's job...
echo.
echo.
echo      *********************************************************************
Start "MicroSoft Driver Installer Tool Running" /wait /separate /realtime /min CMD /C DPInst.exe /c /s
:: Alternative method for NT6
::  IF "%OSbuild%"=="NT5" goto Finisher
:: pnputil -a -i %SystemDrive%\D\*\*.inf
  IF "%OSbuild%"=="NT6" goto LOG-file

:Finisher
  Echo. & Echo Running the DriverPacks.net Finisher now! & Echo.
%SystemDrive% & cd\ & Start /wait /separate /high "" DPsFnshr.exe

:LOG-file
 :: Log and Attended output section
IF /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 F:\WINDOWS\DPINST.log') DO (
   If [%%G]==[Successfull] IF [%%H]==[installation] Echo %%G %%H %%I >>%LOG%)
 )
 : Final Message
cls
echo      *********************************************************************
echo.
 Echo.  & Echo The DriverPacks Stand Alone Drivers installation is complete!
 Echo.  & Echo The log file of this utility's progress is found in <drive>:\Windows\dpinst.log
 ::Echo  & Start /min sndrec32 /play /close %windir%\media\ding.wav
   IF "%OSbuild%"=="NT5" goto Timer
 Echo Now cleaning up...
 cd %SYSTEMDRIVE%
 DEL /F /S /Q "%SYSTEMDRIVE%\D\*"
 DEL /F /S /Q "%SYSTEMDRIVE%\D\x86\*"
 DEL /F /S /Q "%SYSTEMDRIVE%\D\x64\*"
 RD /S /Q "%SYSTEMDRIVE%\D\"
 :Timer
 Echo.  & 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      *********************************************************************

:Done
popd
EXIT

:Error1
cls
echo      ********************************************************************
echo.
echo                             %msg2%      
echo.
echo                  Invalid Operating System Detected:
echo.
echo                       %prodname%
echo                    Which is uses %OSbuild% DriverPacks
echo                    Not currently supported
echo.
echo                     Please exit the program now!
echo.
echo      ********************************************************************
pause
exit
:Error2
cls
echo      ********************************************************************
echo.
echo.
echo                             %msg2%      
echo.
echo.
echo                        un7zip.exe is missing.
echo.
echo.
echo                     Please exit the program now!
echo.
echo.
echo      ********************************************************************
pause
exit

:Elevate
::Credit to JohnGray http://www.sevenforums.com/general-discussion/118408-programmatic-way-bat-file-determining-if-elevated-command-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" message
setlocal
:: arbitrary choice of system directory and filename
set 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

bin\elevate.cmd

:: //***************************************************************************
:: // ***** Script Header *****
:: // =======================================================
:: // Elevation PowerToys for Windows Vista v1.1 (04/29/2008)
:: // =======================================================
:: //
:: // File:      Elevate.cmd
:: //
:: // Additional files required:  Elevate.vbs
:: //
:: // Purpose:   To provide a command line method of launching applications that
:: //            prompt for elevation (Run as Administrator) on Windows Vista.
:: //
:: // Usage:     elevate.cmd application <application arguments>
:: //
:: // Version:   1.0.0
:: // Date :     01/02/2007
:: //
:: // History:
:: // 1.0.0   01/02/2007  Created initial version.
:: //
:: // ***** End Header *****
:: //***************************************************************************

:: @setlocal
@echo off
pushd %~dp0
set cur=%cd%
cls
:: Pass raw command line agruments and first argument to Elevate.vbs
:: through environment variables.
set ELEVATE_CMDLINE=%*
set ELEVATE_APP=%1

start wscript //nologo "%~dpn0.vbs" %*

bin\elevate.vbs

' //***************************************************************************
' // ***** Script Header *****
' // =======================================================
' // Elevation PowerToys for Windows Vista v1.1 (04/29/2008)
' // =======================================================
' //
' // File:      Elevate.vbs
' //
' // Additional files required:  Elevate.cmd
' //
' // Purpose:   To provide a command line method of launching applications that
' //            prompt for elevation (Run as Administrator) on Windows Vista.
' //
' // Usage:     (Not used directly.  Launched from Elevate.cmd.)
' //
' // Version:   1.0.1
' // Date :     01/03/2007
' //
' // History:
' // 1.0.0   01/02/2007  Created initial version.
' // 1.0.1   01/03/2007  Added detailed usage output.
' //
' // ***** End Header *****
' //***************************************************************************


Set objShell = CreateObject("Shell.Application")
Set objWshShell = WScript.CreateObject("WScript.Shell")
Set objWshProcessEnv = objWshShell.Environment("PROCESS")

' Get raw command line agruments and first argument from Elevate.cmd passed
' in through environment variables.
strCommandLine = objWshProcessEnv("ELEVATE_CMDLINE")
strApplication = objWshProcessEnv("ELEVATE_APP")
strArguments = Right(strCommandLine, (Len(strCommandLine) - Len(strApplication)))

If (WScript.Arguments.Count >= 1) Then
    strFlag = WScript.Arguments(0)
    If (strFlag = "") OR (strFlag="help") OR (strFlag="/h") OR (strFlag="\h") OR (strFlag="-h") _
        OR (strFlag = "\?") OR (strFlag = "/?") OR (strFlag = "-?") OR (strFlag="h") _
        OR (strFlag = "?") Then
        DisplayUsage
        WScript.Quit
    Else
        objShell.ShellExecute strApplication, strArguments, "", "runas"
    End If
Else
    DisplayUsage
    WScript.Quit
End If


Sub DisplayUsage

    WScript.Echo "Elevate - Elevation Command Line Tool for Windows Vista" & vbCrLf & _
                 "" & vbCrLf & _
                 "Purpose:" & vbCrLf & _
                 "--------" & vbCrLf & _
                 "To launch applications that prompt for elevation (i.e. Run as Administrator)" & vbCrLf & _
                 "from the command line, a script, or the Run box." & vbCrLf & _
                 "" & vbCrLf & _
                 "Usage:   " & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate application <arguments>" & vbCrLf & _
                 "" & vbCrLf & _
                 "" & vbCrLf & _
                 "Sample usage:" & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate notepad ""C:\Windows\win.ini""" & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate cmd /k cd ""C:\Program Files""" & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate powershell -NoExit -Command Set-Location 'C:\Windows'" & vbCrLf & _
                 "" & vbCrLf & _
                 "" & vbCrLf & _
                 "Usage with scripts: When using the elevate command with scripts such as" & vbCrLf & _
                 "Windows Script Host or Windows PowerShell scripts, you should specify" & vbCrLf & _
                 "the script host executable (i.e., wscript, cscript, powershell) as the " & vbCrLf & _
                 "application." & vbCrLf & _
                 "" & vbCrLf & _
                 "Sample usage with scripts:" & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate wscript ""C:\windows\system32\slmgr.vbs"" –dli" & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate powershell -NoExit -Command & 'C:\Temp\Test.ps1'" & vbCrLf & _
                 "" & vbCrLf & _
                 "" & vbCrLf & _
                 "The elevate command consists of the following files:" & vbCrLf & _
                 "" & vbCrLf & _
                 "    elevate.cmd" & vbCrLf & _
                 "    elevate.vbs" & vbCrLf

End Sub

I've tested it on Vista 64-bit from a flash drive and from a network share, with and without UAC. Works fine.



*Edit* I think the following line needs changed:

Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%DPLoc%\DP*.7z" %SystemDrive%\D\

I had a machine I tested on where 7zip stopped unpacking one file (for no apparent reason). I killed the process, but because of the way that line is set up it didn't move on to the next pack. I'm not too good with batch programming, but maybe something along the following:

for %%f in (%DPLoc%\DP*.7z) do Start /wait /separate /high "" "%cur%\bin\un7zip.exe" "%%f.7z" %SystemDrive%\D\

I think it would be easier to recover if a separate instance of un7zip was launched for each 7z archive.

I think you need to report that http://forum.driverpacks.net/viewforum.php?id=34 (the Vista/7 chipset forum).

mr_smartepants wrote:

OK, I've worked in a few improvements to the code.
Now checks for UNC paths and displays error if found.
Added NT6 Method 1 routine (uses xcopy instead of copy).
A few other refinements.  More to come...

You can use pushd/popd. It will automatically map a network drive.

Check out the full post I made at WSUSOffline (the same one as the elevation script): http://forums.wsusoffline.net/viewtopic … =381#p1512

pushd %~dp0
set cur=%cd%

at the beginning of the script will change the command prompt to the current directory (and if it's a network share, it will map it to a drive first). Setting "cur" to %cd% will set the cur variable to the current directory AFTER the pushd has been performed.

At the end of the script put in a popd and it will close the network share (or do nothing if not over the network).

A few things

First, your tool should be in the Vista and 7 tools forums - it's definitely the best standalone tool, but took a while to find.

Second, there's a VBS script available to elevate a batch file (from Microsoft). Here's what I posted at the WSUSOffline forum about it

*edit* I recall that under Vista and 7 with UAC turned on WSUSo didn't work unless you right-clicked and chose "Run as Administrator". Well, I came across that problem in a previous project and I modified a script to elevate the command prompt (so when you double-click on the .cmd or .bat file it will pop up a UAC window then run the script and all sub-scripts elevated. I also made another script which disables UAC. Once I find them (have google desktop indexing my hard drives right now because I don't remember where it is) I can post them with instructions on integrating them into WSUSo. That should make it a little more user friendly.

*edit2* I may or may not still have the files I was looking for, I might have them at work, or Google Desktop might pick them up after I installed an add-on that searches inside rar files. If I can't find it, here's what I based that work on:
http://technet.microsoft.com/en-us/maga … ation.aspx
Right near the top, there's a link to http://download.microsoft.com/download/ … 008_06.exe
I used the elevate.cmd and elevate.js
I also referred to the older version of the article http://technet.microsoft.com/en-us/maga … light.aspx
I recall it being a decent amount of work, but I did get it to eventually work automatically and transparently



Got the code for elevation (took forever to find)

Here's the elevate.vbs script: http://pastebin.com/A0sKKj60

And here's the code from elevate.cmd (which calls elevate.vbs):

:: //***************************************************************************
:: // ***** Script Header *****
:: //
:: // File:      Elevate.cmd
:: //
:: // Additional files required:  Elevate.vbs
:: //
:: // Purpose:   To provide a command line method of launching applications that
:: //            prompt for elevation (Run as Administrator) on Windows Vista.
:: //
:: // Usage:     elevate.cmd application <application arguments>
:: //
:: // Version:   1.0.0
:: // Date :     01/02/2007
:: //
:: // History:
:: // 1.0.0   01/02/2007  Created initial version.
:: //
:: // ***** End Header *****
:: //***************************************************************************


@echo off

:: Pass raw command line agruments and first argument to Elevate.vbs
:: through environment variables.
set ELEVATE_CMDLINE=%*
set ELEVATE_APP=%1

start wscript //nologo "elevate.vbs" %*

You should be able to just put the following into update.cmd:

set ELEVATE_CMDLINE=%*
set ELEVATE_APP=%1
start wscript //nologo "cmd\elevate.vbs" %*

Although I'm not sure how important the environment variables are.

Third, I always put an autorun.inf in the DP_Install_Tool.cmd folder (in case I burn it to a disc):

[autorun]
OPEN=DP_Install_Tool.cmd

I have read the rules and guidelines, and I still think your post is harsh. I am providing reasonable feedback. You may take my feedback and improve the software you enjoy working on, or you may disregard it completely. It doesn't bother me either way.

Just to reiterate:
Download page for DriverPacks Base (and page for Applications) does not specify that it's for 200/XP/2003 only
Main page of DriverPacks Base lists the supported operating systems, but it doesn't stand out (suggest changing text color to red)


Even if you could put some text on the application or download page that says something like "This is for Windows 2000, XP, and 2003 ONLY! Please visit the forums if you are using Vista or Windows 7" I think that would make it a lot clearer.

I would also suggest putting something on the Driverpack list that says something like "Using 2000/XP/2003? Click Here to download DriverPacks Base, which can download all driver packs automatically."

Here's a bit of an update:

Panasonic Toughbook CF-29

Using driver pack, the following were not installed:

Modem (Agere AC'97, 8086/24c6)
Sound (Sigmatel C-Major, 8086/24C5)
Video (Intel 82852/82855 Gm/GME, 8086/3582)
Hotkey driver (Device ID: ACPI\MAT0019\2&DABA3FF&0)

I thought I would make a post about this since searching has turned up relatively little. I downloaded the most resent DriverPacks Base; while the Update Checker section works (shows the latest driver packs and allows you to download them), it doesn't specify that the driver packs listed are XP only. In fact, the only place it's clear that the Driverpack Base is for XP only is on the first page, in the middle of a bunch of other packs.

It might seem obvious to someone that works with it constantly, but as someone who randomly downloaded it, it was a bit confusing.

I might suggest possibly changing "Start" on the start section to something like "DriverPacks XP Base" in bold red, if not renaming it to "DriverPacks XP Base" to prevent confusion about Vista and 7 compatibility.

I've read through the FAQ, and I posted anyways because I'm not requesting any drivers, I'm giving an alternate source with hard to find drivers that I thought you might appreciate - even if you make a policy of not getting drivers from third parties.

I don't recall the hardware that didn't install, as it was two months ago and my boss's laptop, but I do remember some input and motherboard related drivers missing.

I tried using the XP DriverPacks on a Panasonic Toughbook and a couple devices didn't have drivers.

After quite a bit of searching, I found a website that has drivers for quite a few Toughbook models.

Wasn't sure where to post this, but it might be worth it for someone to go through them all and get the drivers in the other driver packs.

http://h18000.www1.hp.com/support/files … 17320.html

Contains all of HP's and Compaq's (to my knowledge) SCSI controller drivers for Windows 2003. All cards were designed for servers (hence only Server 2003), but they should work fine in XP.