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

I am about halfway done optimizing your code.  I trimmed about 15 lines by converging method5 and method6 and chopped the dpinst extraction routine from 20 down to 3 lines.
I should have some untested code ready in the next hour or so.

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

wow your not messing around today.  lol  Will check back in a couple hrs then.  Think I will wait till you are done with the script before doing anymore with autoit.  I and my neighbor will fully test it but we dont have the new win 8 8.1 nt 6.3 or MCE so I guess someone else will have to test for those OS's.  Thanks for the time you have put into this so far mr_smartepants.....let me guess, did your wife give you that nick name?  lol  wink

Win 8 8.1 build 9385 is avail. to select Microsoft partners now.  Looks like 9385 is the newest avail.  Still beta of course so I dont know if you really want to add it yet per say since the official release date isnt till aug or sept.

Last edited by SteveDun (2013-04-19 06:46:58)

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

Here's my optimized version of your codebase.  I have NOT tested it, but it passes code validation (love the new sublime-text!)
I have some more changes, but I'm not going to get any time until next week.
Total savings of just over 40 lines.
http://www.mediafire.com/?taq36yi73a8tqpm

Yeah, my wife calls me many names. wink

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

@ mr_smartepants....why does the script look for *.ins file in the nt5/x86/ folder for xp systems?  There is no such file located at the root of x86 folder.
error system cannot find file specified.

ok to not show the error above I added a IF EXIST and did the same for removing extra os drivers just so it doesnt say error system cannot find the specific file.
also added a if nt5 then to goto begin2 so not to try and delete the nt6 drivers which arent there for nt5 systems.

I have noticed since inserting a ping after the log file creation that it errors out saying cannot find specified file.  There for I take it the log isnt being created? Or is it looking for a log file that isnt created yet?  Everything I got working without errors.  The log is the only thing left but I am dumbfounded as to what the problem could be.  I need your help on that.  lol

Here is corrected cmd file only (with log error still....add a ping or a pause after it to see the error):

http://www1.datafilehost.com/d/4d89924e

Last edited by SteveDun (2013-04-19 15:32:46)

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

Create a blank file first?
  (possibly from the files of "a semi was trapped under a bridge .... a small child said 'let the air out of the tires'")

v2.7 worked on a inspiron 1525 using DP_Biometric, Display, HID, Webcam, & wHCI  all at once.
It even picked out the 'dell trackpad' instead of using the Alps generic driver (ICA026, I2G1Z marked under TP).
{DriverVer=1/25/2012, 7.1209.101.215} - {ACPI\PNP0F13\4&2F94427B&0}
I received that "cannot find *.ins" error too.  Testing with XPpro-sp3 this time.

Moving to v3.0 for testing.

Last edited by TechDud (2013-04-19 16:25:25)

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

It even picked out the 'dell trackpad' instead of using the Alps generic driver (ICA026, I2G1Z marked under TP).

This I like!

I received that "cannot find *.ins" error too.

This has now been corrected from my above cmd file only but still has a log issue but end user doesnt see it but still I dont like any error's.  lol  Need mr_smartepants to help with that one.

v3.0 has new devcon so let us know and thank you for testing.  wink

Last edited by SteveDun (2013-04-19 16:48:10)

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

SteveDun wrote:

@ mr_smartepants....why does the script look for *.ins file in the nt5/x86/ folder for xp systems?  There is no such file located at the root of x86 folder.
error system cannot find file specified.

ok to not show the error above I added a IF EXIST and did the same for removing extra os drivers just so it doesnt say error system cannot find the specific file.
also added a if nt5 then to goto begin2 so not to try and delete the nt6 drivers which arent there for nt5 systems.

Actually, on XP iso built with DriverPacks BASE then the .ins file does exist in the same directory as the DriverPacks.  But I was sloppy and your "if exist" fixes that.  Nice catch on the NT5 exception for folder-clean.

SteveDun wrote:

I have noticed since inserting a ping after the log file creation that it errors out saying cannot find specified file.  There for I take it the log isnt being created? Or is it looking for a log file that isnt created yet?  Everything I got working without errors.  The log is the only thing left but I am dumbfounded as to what the problem could be.  I need your help on that.  lol

Here is corrected cmd file only (with log error still....add a ping or a pause after it to see the error):
http://www1.datafilehost.com/d/4d89924e

OK, this next one should fix it.  I forgot to declare where the log file goes. sad
Gimme a minute to do a quick test and upload.

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

wow that was fast....thanks testing it now in xp sp3....will report back in a few.

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

LOL, I haven't uploaded anything yet! big_smile
Gimme a minute to do a quick test in XP MCE and upload.

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

yeah I realized after the fact that it was the same as before just in quotes....brain fart.  lol

dont ya love testing....fix it in a matter of seconds but then to test takes a bit.  lol

Last edited by SteveDun (2013-04-19 17:16:34)

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

Here's the corrected version.  I think I still have more fixes for the log section, but at least it works now.  Tested in MCE.
http://www.mediafire.com/?gsn8004eqqlc432

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

Had to update SAD3 below.

Last edited by SteveDun (2013-04-20 04:54:01)

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

@ mr_smartepants, SteveDun

First, BIG HUGE THANKS for the great work on this script cool
(And sorry for my english level)


I'm tryin' to install DriverPacks silently using /S or /SR switches from SetupComplete.cmd

My OS is Windows 7 Pro SP1 (x86) French & I make all my tests in VirtualBox v4.2.10 r84104




My SetupComplete.cmd content

@echo off

START %SystemDrive%\D\SAD2\DP_Install_Tool.cmd /S

or

@echo off

START %SystemDrive%\D\SAD2\DP_Install_Tool.cmd /SR



If I use mr_smartepants' v120520 ( manually or with switch /S), everything goes FINE (no error message, ALL files/sub-folders/folders are DELETED) cool




From SAD2.5 to SAD3.0 (SteveDun modds), run script manually goes fine.


But I have same error when I use /S & /SR switches : The commands file is not found (see below)

http://kenafri.upd.fr/DIVERS/DPacks/DP2.5-clenup_error_1.png

http://kenafri.upd.fr/DIVERS/DPacks/sad2.5_directories-Files.png



With SAD3.0 (v13.04.19) fixed by mr_smartepants, issue is a little bit different (same issue but different prompt location folder - see below)

http://kenafri.upd.fr/DIVERS/DPacks/SAD3_Finishing_Error_1.png

http://kenafri.upd.fr/DIVERS/DPacks/SAD3_directories-Files.png




No one else have same error? Any idea?




I also found a slight "bug" in the :Usage section

I replace line below

echo /? or /h or /H will bring up this guide.


with this one


echo "/?" or /h or /H will bring up this guide.

or this

echo /h or /H or /? will bring up this guide.

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

I am going to call it quits for the night.  My brain isnt working good now.  Will touch base with you tomarrow.

Last edited by SteveDun (2013-04-20 09:12:51)

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

I'm doing some testing now to make sure everything works after a few minor changes.
@Steve, keep in mind that I changed the filenames of the dpinst archives for easier extraction.  My filename mods are \bin\32\dpinst-NT5.7z (etc.)
Your latest archive changed them back which broke the script.

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

Yeah I realize that now.....guess I used the wrong one.  sad

Sorry, here is corrected SAD3 version:

http://www1.datafilehost.com/d/513b60a1

Make sure to read instructions.  It works now even if used in Microsoft ISO's.  No more batch file cannot be found when in cleanup phase.
The only issue I know of now is that the log creation only inserts min. info. which I know mr_smartepants is working on.  This is a small limitation for the moment which has no effect on the installs or script. 
By the way mr_smartepants, I tried to stay true to your form of scripting so it is more uniformed.
Thanks for your work on this project mr_smartepants.....your my hero.  lol  smile

Last edited by SteveDun (2013-04-20 17:04:21)

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

I'm chasing a bug where the commandline switches aren't being passed through the elevate function when run under normal user.  I'll have something soon.

On logging...how much more info does everyone want?  At the moment it only logs successful driver installs.  I'm open to suggestions.

Done!
http://www.mediafire.com/?nm81bymr6zxdaag

:: Changelog:
:: 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.

:: v130419 v3.0 (Erik Hansen)
:: Fixed file copy error for *.ins file.
:: Added code to skip NT6 folder cleanup for NT5 systems.
:: Fixed Log file missing error.

:: v130418 v3.0 (Erik Hansen)
:: Merged codebase between Erik Hansen and SteveDun
:: Merged many separate functions to save compute space.
:: Pruned excess conditional statements to speed processing.
:: General-level code optimization

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

mr_smartepants wrote:

I'm chasing a bug where the commandline switches aren't being passed through the elevate function when run under normal user.  I'll have something soon.

Yeah there is a bug in that one for the silent install switches.  Cant be use yet in a windows OS ISO for it crashes with 4 windows open while using a setupcomplete.cmd for win7.

Here is my modified version if you want to look at it (100% works now with all options):

http://www1.datafilehost.com/d/7d48f6e8

Change Log:
:: Script now calls UAC for NT6 OS's (replaces the Elevate commands)
:: Now fully works when added to windows ISO's.
:: Corrected error's in Cleaning Phase when added to windows ISO where it says batch file cannot be found.

Tested in win xp and win 7 (from within windows ISO's and stand alone).

Last edited by SteveDun (2013-04-21 05:41:04)

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

Hmm, interesting take on an old problem.  I like how it doesn't depend on the scripts being present in the \bin folder and just builds them dynamically.

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

:checkPrivileges
MKDIR "%windir%\OEAdminCheck"
IF '%errorlevel%' == '0' (
RMDIR "%windir%\OEAdminCheck" & GOTO gotPrivileges
) ELSE ( GOTO getPrivileges )
:getPrivileges
CLS
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute %0, "", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
EXIT /B
:gotPrivileges
IF EXIST "%temp%\OEgetPrivileges.vbs" ( DEL /F /Q "%temp%\OEgetPrivileges.vbs" ) >nul
GOTO Processor

wink
This method works on vista-win8
The sound effect can also be done the same way for it is small....now the restore point creation is another story.
Sorry I was so tired yesterday evening my brain stopped working.  lol

Last edited by SteveDun (2013-04-21 07:36:33)

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

I like it.  My only concern is that this method won't work under NT5. 
I'm not a big vbs scripter, but won't ShellExecuteEx() do the same thing but with NT5 compatibility?
http://msdn.microsoft.com/en-gb/library … s.85).aspx

I'd love to be able to extend the "runas" function to NT5.

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

Change log:
:: Sound effect removed from bin folder...script now creates it.
:: Script now creates UAC Check for NT6 OS's (replaces the Elevate commands in bin folder)
:: Now fully works when added to windows ISO's.


Here is my tested version...updated:

http://www1.datafilehost.com/d/131134e2

Tested on win xp pro sp3 and win 7 sp1 (stand alone and within windows ISO).

Last edited by SteveDun (2013-04-21 17:50:11)

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

I have used the UAC vbs script from post 220 on several tests but I removed the check portion of the vbs script to force it to execute on xp pro sp3 and it ask for username and password in order to execute a program.....password must be setup before it will work.  So on xp users with no password it will fail of course thus another reason for the check in the beginning.  But it does work in xp, I used it to open notepad.exe for example and after I enter in my username and password it opened right up.  It lists users for that machine to choose from but you must know their password to execute your program.

Think I am done with the script so going to start playing with the autoit in my spare time now.

Last edited by SteveDun (2013-04-21 18:41:21)

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

Nice work. 
So we have "code freeze" now?
Cool, now I can get to work on some serious code optimization.
I've noticed some functionality duplication so I'm going to try moving some sections into call-able functions.
I hope to have something by tonight but if not then by the end of the week.

I'll add a check for NT5 to see if it's being called during setup or from a working desktop.  If it's run from setup then no user/password call is needed because the system is already in an elevated state.

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

Sounds good.  Bed time now.  lol  Good night.   smile

I have a request...lol
Can you make it to where during the extraction process of driverpacks and such are min so not to have a lot of windows that keep popping up for each driverpack....user could still open/expand it from the taskbar if needed to watch extraction if they want.  So main window only shows all the time.  Just a request.  lol

In the sound effect section in DP_Install_Tool.cmd script (tada.vbs creation) find...
ECHO oSpFileStream.Open "C:\Windows\Media\tada.wav" >> "%temp%\tada.vbs"
and replace with this...
ECHO oSpFileStream.Open "%windir%\Media\tada.wav" >> "%temp%\tada.vbs"

This is to correct it if users arent using C:\ for their operating system drive which some dont.

Last edited by SteveDun (2013-04-21 19:05:27)