Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Got it.  In-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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Hi Guys,

I was thinking about how we could go about making the driver installs a bit quicker, and I have a rough idea that I'm not sure would work, so I'm just gonna throw it out there.

Currently (Correct me if I'm wrong) it appears that when you run the driver installer from a USB stick, it asks you if you want to discard drivers for other windows versions, then it copies the drivers across to C:\D\ and goes through each driver, one by one, checking if the device is present.

Even on a quick machine with an SSD, this still takes a good 5-10 mins, including the time it takes to copy the drivers from the usb stick to the HDD.

The question and suggestion I want to ask, is...

Why can't we cache all the device ID's that we have a driver for, to a file on the usb stick, then run a program to determine the device ID's on the PC, and only copy across the drivers that are required?

I understand why the drivers can't be installed direct from the usb. If it updates the usb controller driver, the usb stick will stop working and will mess up the install.

I know there are programs out there to determine the device ID's of the current hardware, so why can't those ID's simply be compared to a list, instead of going through all drivers, one by one?

Have I misunderstood something, or is there something I just don't get?

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

I like the idea (it's been brought up before).
It would require that the DriverPacks contain "index" files (like a database) for each contents.
Then we'd have to poll the system for a HWID list and compare it to the index and build an array of matching paths to drivers.
Then extract only the matched drivers.

This would require that we also repackage all the DriverPacks without using the "solid archive" option.  This would create DriverPacks packages that are much larger in size.

In theory, that should be much quicker but would require a LOT of scanning/comparison to build the array which may take even longer than just extracting all the drivers at once.

I'm not saying that we won't do it, only it would require a lot of coding just to make a 'proof-of-concept'.
We'll keep that in our "to-do" list. smile

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

I'm doing testing in VMs right now...I'll upload this tonight if all goes well.
Here's what I have so far:


:: Changelog:
:: v130423 v3.0
:: Remerged codebases (briefly forked during simultaneous development).
:: Sound effect script removed from bin folder...SAD now creates it dynamically.  (SteveDun)
:: SAD now calls UAC Check for NT6 OS's dynamically (replaces the Elevate commands in bin folder) (SteveDun)
:: Now fully works when added to windows ISO's. (SteveDun)
:: Corrected error's in Cleaning Phase.  (SteveDun)
:: Modified code to support commandline switches using either slash '/' or dash '-' (example: script.cmd -s) (Erik Hansen)
:: Modified extraction code to minimize extraction windows. (Erik Hansen)
:: Added code to count extraction progress in title bar. (Erik Hansen)
:: Cleaned up displayed text to center in window. (Erik Hansen)

:: v130420 v3.0 (Erik Hansen)
:: Fixed bug in :Elevate section where commandline switches were not passed to utility when run as a normal user.
:: Fixed bug where utility would try to delete itself after complete.
:: Minor fixes to :Cleaningphase section and :Usage verbiage.

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Looking good....thanks mr_smartepants.
I have a friends lappy here to try it on when you are ready to post it.  wink

Last edited by SteveDun (2013-04-24 03:11:52)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

mr_smartepants wrote:

I like the idea (it's been brought up before).
It would require that the DriverPacks contain "index" files (like a database) for each contents.

I actually started to code this up (in VBS - don't hate).

* Recursively walk the uncompressed DP directory structure (don't need it compressed if you're only copying select drivers)
* For each .inf, parse out the HWIDs and driver locations.
* Do a quicksort and delete the dupes.

What I ended up with was a tab-delimited file that looks like:

8086&154D&7B118086    x64\Server\L\Intel\1\Winx64\NDIS62    ixn62x64.inf    74
8086&1557    x64\Server\L\Intel\1\Win64\NDIS62    ixn6264.inf    61
8086&1A38    x64\Vista\L\Intel\4\NDIS61    qd160x64.inf    51
8086&1C00    x64\All\M\Intel\5    cougide.inf    40
8086&1C01    x64\Win7\M\Intel\5    couide2.inf    34
8086&1C02    x64\All\M\Intel\3    iaAHCIC.inf    95

Fields:

1 = HWID
2 = relative path
3 = inf file name
4 = line number in .inf

The last two fields are for debugging.

The whole thing takes roughly 20 seconds. This is with 5 packs on an SSD  - about 1 GB and 4,500 files.

I wrote a separate script that reads the entire index into an array. It then uses WMI to retrieve HWIDS and do a binary search of the array. That part takes all of a second per this log file.

4/23/2013 12:05:42 PM Loading Index
4/23/2013 12:05:42 PM Index loaded
4/23/2013 12:05:42 PM Get driver failed for 10EC&8168&84321043 Realtek PCIe GBE Family Controller
...
4/23/2013 12:05:42 PM Starting copy
4/23/2013 12:05:42 PM tools\Robocopy dpacks\x64\All\C\Intel\1 \dpacks-sel\x64\All\C\Intel\1 /s /r:0
4/23/2013 12:05:42 PM tools\Robocopy dpacks\x64\Win7\C\Intel\1 \dpacks-sel\x64\Win7\C\Intel\1 /s /r:0
...
4/23/2013 12:05:43 PM Copy done

I got stuck at this point as I didn't really understand how to use this with dpinst.

Maybe someone smarter than me *cough* could take this concept and actually make it work.

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Hi !

@ Mr_Smartepants & StevenDun

I tried new v3 r130421 and it works very WELL.

Thanx again & again for your hard work.

So I'm ready to test the new release.


I've a little suggestion about TouchPad HID.

Is it possible to add a portion of code to check what kind of machine (Laptop or Desktop) DriverPacks are installing on?

If it's a Desktop, no TouchPad drivers kept and if it's a Laptop is detected...keep them.

What do you think?

Last edited by Ken@fri (2013-04-24 05:08:02)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Ken@fri,
Thats why there is a option to delete or keep them in the script.  Of course if silent it will auto leave it but that might change with mr_smartepants new version to be released soon (I dont know).

(Battery)
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{72631E54-78A4-11D0-BCF7-00AA00B7B32A}\0000" && echo Laptop found!

or

(Portable Battery)
WMIC SystemEnclosure GET ChassisTypes
WMIC ComputerSystem GET PCSystemType

would work for lappys.  wink  It looks for the battery value in the reg entry in the first example.  This would not work on image restore though just to let you know for that reg entry isnt included in images usually.  The second example gets its info from the SMBIOS tables off the motherboard which is the method I would prefer for some systems might not have the reg entry like from a image restore.

@ mr_smartepants this would be a good addon if ya will to only leave behind touchpad/HID if lappy present.

Last edited by SteveDun (2013-04-24 05:37:50)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Ken@fri wrote:

Is it possible to add a portion of code to check what kind of machine (Laptop or Desktop) DriverPacks are installing on?

If it's a Desktop, no TouchPad drivers kept and if it's a Laptop is detected...keep them.

Well that would be fine if the "touchpad-HID" Third Party DriverPack included only drivers for laptops.  However that Third Party DriverPack includes drivers for mice and keyboards also.

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

DanInWV wrote:

I actually started to code this up (in VBS - don't hate).

The whole thing takes roughly 20 seconds. This is with 5 packs on an SSD  - about 1 GB and 4,500 files.

I got stuck at this point as I didn't really understand how to use this with dpinst.

Well now THAT is very encouraging! smile
To be honest, once a match is made, just moving the encapselating folder to a temp dir then pointing dpinst to that temp dir would be the easiest method.
Post the code you have in code boxes and one of us will run with it.

BTW, I don't hate VBS, it's just not my forte (like a left-handed hammer). wink

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

i wrote a program a couple years ago to pull the hwids out of the infs i spent several weeks on it and never did get 100% success on listing the HWIDs. Some were always missing because of differences in the way the INF files were layed out. especially where variables were used.

the current version of that is used by mr_smartepants when he publishes a new release. It populates the "included drivers" field on the download pages. Kickarse also has a tool for that that is published here on our forum.

you are not allowed to delete duplicate HWIDS... that definitely will fail.

I think you are mistaking a copy for what is actually extraction from the archives.

Method 2 or M2 as we call it extracts the 7zip archives to c:\d that does take a minute.
    (however since i am doing an unattended install
     i don't care if it takes two minutes or four minutes
     since i am not actually there... i am doing something else... 
     (UNATTENDED) tongue.)

Method 1 or M1 as we refer to it is pre-extracted so there is no copy or extraction.
it would simply run straight from the thumb drive.
- Test with an M1 source and see how long it takes... smile

When we headed down this road before we had many obsticals. not the least of which was exceeding the maximum number of elements in an array. (it would silently truncate input). a couple of other projects have set out on this same mission. They also have space here at DriverPacks.net. What we ended up doing in the short term was to split the stream in the packs themselves. In this way you can extract the inf files as a single stream. (our solid archive is actually two solid archives one with infs and one with all the other stuff). this makes gettitng the infs very fast big_smile. the rest is very buggy. your theory is solid, and if our OS was not windows would have easily succeeded years ago.  Again a good idea tried many times by several projects. . .

I think with the onset of cheap fast thumb storage its just easier to run an M1 (pre extracted) SAD off the thumb.

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

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

I'm currently chasing a bug in the :Elevate section (and elsewhere).  The bug is in how the variable %0 is used.
When the SAD script is called from a command line, then %0 populates as a fully qualified path with name.ext (C:\SAD\DP_Install_Tool.cmd).  But when the SAD script is double-clicked, the :Elevate .vbs script fails because %0 only populates with the name.ext, not the path (DP_Install_Tool.cmd).
This can be solved by substituting %0 with %~dpnx0 (DrivePathName.eXtension) which has a more consistent behavior.
To illustrate this behavior, create a test.cmd file with the following code:

@ECHO off

ECHO Path with '0'    : %0
ECHO Path with 'dp0'  : %~dp0
ECHO Path with 'dpnx0': %~dpnx0
PAUSE

Run from command line:

I:\target>test.cmd
Path with '0'    : test.cmd
Path with 'dp0'  : I:\target\
Path with 'dpnx0': I:\target\test.cmd

When double-clicked:

Path with '0'    : "I:\target\test.cmd"
Path with 'dp0'  : I:\target\
Path with 'dpnx0': I:\target\test.cmd

I'm still busy testing M1 and M2 in both XP and Win7...but I'm close!

Jeff is right about the DriverPacks archive streams.  When I build the final DriverPacks, I use the tool here: http://forum.driverpacks.net/viewtopic.php?id=4789
I don't think the testing packs are built the same way (solid packs).

@DanInWV, please post your sample code so we can see what's going on.

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

I thought i was already using recommended settings.
  Should i be rebuilding the packs as i go with that script? 



I don't know if it helps, but here's an error i found testing v2.7 of SAD2.

Windows Script Host

Script:  C:\Documents and Settings\Owner\Desktop\SAD2-130408_v2.7\bin\tada.vbs
Line:   4
Char:   1
Error:   0x8004503A
Code:   8004503A
Source:   (null)

It was one where the installed driver from Realtek has the same PnPid as the Analog Devices chip that laptop has.
Long story short, audio doesn't work on it yet.  Mayhap that is the source of the error.



Anyway, I think you guys are great!  Take a bow.  cool  cool

Last edited by TechDud (2013-04-24 17:27:36)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

oVoice.SpeakStream oSpFileStream......it cant speak the tone if no or not the correct sound card driver installed.  wink

solution for mr_smartepants to add to his script to correct this error is no sound card driver is installed...

IF NOT EXIST "%temp%\tada.vbs" (
ECHO Set oVoice = CreateObject^("SAPI.SpVoice"^) > "%temp%\tada.vbs"
ECHO Set oSpFileStream = CreateObject^("SAPI.SpFileStream"^) >> "%temp%\tada.vbs"
ECHO oSpFileStream.Open "%windir%\Media\tada.wav" >> "%temp%\tada.vbs"
ECHO On Error Resume Next >> "%temp%\tada.vbs"                                       <---- The correction if error to continue
ECHO oVoice.SpeakStream oSpFileStream >> "%temp%\tada.vbs"
ECHO oSpFileStream.Close >> "%temp%\tada.vbs"
START /W %windir%\System32\wscript.exe "%temp%\tada.vbs"
DEL /F /Q "%temp%\tada.vbs"
) >nul

Tested with sound card driver enabled and disabled......no more error's.  wink

Last edited by SteveDun (2013-04-24 19:07:05)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Here's the latest RC SAD3-130423
http://www.mediafire.com/?q52c11zg41tysvv
Tested on XP and Win7-x64 using both method-1 and method-2.
Whew!  Done for now...

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

SteveDun wrote:

Ken@fri,
Thats why there is a option to delete or keep them in the script.  Of course if silent it will auto leave it but that might change with mr_smartepants new version to be released soon (I dont know).

(Battery)
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{72631E54-78A4-11D0-BCF7-00AA00B7B32A}\0000" && echo Laptop found!

or

(Portable Battery)
WMIC SystemEnclosure GET ChassisTypes
WMIC ComputerSystem GET PCSystemType

would work for lappys.  wink  It looks for the battery value in the reg entry in the first example.  This would not work on image restore though just to let you know for that reg entry isnt included in images usually.  The second example gets its info from the SMBIOS tables off the motherboard which is the method I would prefer for some systems might not have the reg entry like from a image restore.

@ mr_smartepants this would be a good addon if ya will to only leave behind touchpad/HID if lappy present.


mr_smartepants wrote:

Well that would be fine if the "touchpad-HID" Third Party DriverPack included only drivers for laptops.  However that Third Party DriverPack includes drivers for mice and keyboards also.


No problem.

And anyway, the work done on the Driverpacks is SIMPLY FANTASTIC, AMAZING!

Thanx.

Last edited by Ken@fri (2013-04-24 18:46:54)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

@mr_smartepants,
I only added this line to correct tada.vbs if an error occured...

  ECHO>>"%O_TADA%" On Error Resume Next

Here is the corrected package...

http://www1.datafilehost.com/d/005ab235

That is all I added.  I did nothing else and it works great in xp....goin to test win 7 tomorrow.
That dang sound effect has been more of a pain then anything else I think.  lol
Good nite and thanks.

Last edited by SteveDun (2013-04-24 19:45:31)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Cool, grabbing now.
You know, one of the great tools I use to do line-by-line code comparison is WinMerge.  http://winmerge.org/
It'll spot the difference between a space and a tab, as well as between a short-dash and long-dash which depending on the font used look the same.
Speaking of fonts, I prefer the free Adobe SourceCodePro.  http://sourceforge.net/projects/sourcecodepro.adobe/

I have two text editors of choice.  NotePad2 (with code folding) and SublimeText2.
http://xhmikosr.github.io/notepad2-mod/
http://www.sublimetext.com/2

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Thanks for sharing mr_smartepants......great tools to add to my toolbox.  wink

I did notice a issue with the script but changing name of SAD3 folder to SAD3 only with no version at the end of the name of the SAD3 folder works perfect.  Instead of changing script and readme file I would just recommend changing the name of the folder to SAD3 only so it works with adding to windows ISO's.  This is the only glich I can see.  Other then changing name to SAD3 I would say it is final.

Last edited by SteveDun (2013-04-25 10:33:35)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

I added some code to pull the OS info from WMIC if the registry isn't loaded yet.  Using WMIC is slower, but more compatible.
The only problem IIRC is that in most cases, WMI isn't available during PE setup, so I'm not sure how useful that will be.
In my tests, pulling the info via WMI took 15 ms but the reg query only took 5 ms.

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Hi guys, found a little bug in SAD3-130423.

If running with no parameters, the variable %CLEAN% is never set to N, so the clean always happens regardless of what the user chooses.

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

Hi!

I've made some tests with SAD3-130423 fixed by SteveDun.

Every time I use the switches (/S or -S  -no problem with /SR or -SR), at firstlogon, I have a message asking me to reboot my computer.

Any idea?



EDIT:

After fresh install on HP ProBook 4510s, the followings TouchPad drivers appear in Add/Modify programs CPL at the same time:

  • Dell Touchpad (from ALPS ELECTRIC CO., LTD)

  • ETDWare PS/2-X86 10.7.13.1_WHQL (from ELAN Microelectronic Corp.)

  • Synaptics Pointing Device Drivers(from Synaptics Incorporated)

Last edited by Ken@fri (2013-04-27 04:33:28)

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

I'll look into both reports and upload a newer version tonight if needed.

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: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

@mr_smartepants

Thanx.

I'll waitin' 4.

Re: Stand Alone Driverpack utility for all OS (XP, 2k3, 2k8, Vista, Win7)

thatwill wrote:

Hi guys, found a little bug in SAD3-130423.

If running with no parameters, the variable %CLEAN% is never set to N, so the clean always happens regardless of what the user chooses.

Now fixed in my working copy.

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