Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
May 29, 2021, 09:24:37 AM
Home
Forum Rules
Active Topics
Login
Register
Plugin World
»
General Plugins
»
Questions and Support
»
Driver Import Testing
« previous
next »
Print
Pages: [
1
]
Topic: Driver Import Testing (Read 1694 times)
Driver Import Testing
«
on:
February 18, 2014, 03:22:38 PM »
trashy
Code Baker
Chef
The Oven will always be my first Home
Location: RedNeck County
Date Registered: Feb 2013
Posts: 179
Long time no see. Between work and a busted computer haven't been around in quite a while.
Now to top it off, found out couple months ago I have dense cataracts on both eyes.
Already lost 80% of vision in my left eye. No insurance and surgery is $4.000 an eye.
Put together a new au3 script for importing drivers, Works OK as is, but I got a problem.
When box 5 or 6 is checked I need all the rest to be disabled. I've setup 15 to 20 computers,
friends & family, some with multiple partitions and OS's. This program will give me the option
to select the partition and drivers I want to Import. I could also add more driver options
keyboard, mouse, USB etc... Any suggestions.
Look at the end of the script, the last 2 if then statements or any other problems you might see.
Any help would be greatly appreciated.
Look at the reply below for current script I' using now
Code:
[Select]
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.10.2
Author: Trashy
#ce ----------------------------------------------------------------------------
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
; Local $hGUI = GUICreate("Driver Import", 400, 200)
$hGUI = GUICreate("Driver Import", 400, 200, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS), $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
GUISetBkColor (0xA6CAF0)
$widthCell = 250
GUICtrlCreateLabel("Select the drivers you want to Import", 10, 20, $widthCell)
GUICtrlCreateLabel("Click Import when process completes Click Install", 10, 40, $widthCell)
$1 = GUICtrlCreateCheckbox("Network", 10, 80)
$2 = GUICtrlCreateCheckbox("Video", 200, 80)
$3 = GUICtrlCreateCheckbox("Audio", 10, 100)
$4 = GUICtrlCreateCheckbox("Other", 200, 100)
GUICtrlSetState($4, $GUI_DISABLE + $GUI_UNCHECKED)
$5 = GUICtrlCreateCheckbox("All NonMS", 10, 120)
$6 = GUICtrlCreateCheckbox("All Drivers", 200, 120)
GUICtrlSetState($6, $GUI_DISABLE + $GUI_UNCHECKED)
Local $iB1 = GUICtrlCreateButton("Import Drivers", 65, 170, 85, 25)
Local $iB2 = GUICtrlCreateButton("Install Drivers", 155, 170, 85, 25)
Local $iB3 = GUICtrlCreateButton("Exit", 245, 170, 85, 25)
GUISetState(@SW_SHOW, $hGUI)
While 1
Switch GUIGetMsg()
Case $iB1
RunWait("RunScanner.exe /t 10 /cp /sd /ac /m+ /y ddc.exe b /target:" & EnvGet("SYSTEMDRIVE") & "\driverbackup")
Case $iB2
ExitLoop
Case $GUI_EVENT_CLOSE, $iB3
Exit
EndSwitch
WEnd
If GUICtrlRead($1) = $GUI_CHECKED Then
DirCreate(EnvGet("SYSTEMDRIVE") & "\driverbackup\Install")
DirMove(@HOMEDRIVE & "\driverbackup\Net\", @HOMEDRIVE & "\driverbackup\Install\", 1)
EndIf
If GUICtrlRead($2) = $GUI_CHECKED Then
DirCreate(EnvGet("SYSTEMDRIVE") & "\driverbackup\Install")
DirMove(@HOMEDRIVE & "\driverbackup\Display\", @HOMEDRIVE & "\driverbackup\Install\", 1)
EndIf
If GUICtrlRead($3) = $GUI_CHECKED Then
DirCreate(EnvGet("SYSTEMDRIVE") & "\driverbackup\Install")
DirMove(@HOMEDRIVE & "\driverbackup\MEDIA\", @HOMEDRIVE & "\driverbackup\Install\", 1)
EndIf
If GUICtrlRead($4) = $GUI_CHECKED Then
EndIf
If GUICtrlRead($1) or ($2) or ($3) or ($4) = $GUI_CHECKED Then
RunWait("Dpinst.exe /path " & EnvGet("SYSTEMDRIVE") & "\driverbackup\Install")
EndIf
If GUICtrlRead($5) = $GUI_CHECKED Then
GUICtrlSetState(($1) & ($2) & ($3) & ($4) & ($6), $GUI_DISABLE + $GUI_UNCHECKED)
RunWait("Dpinst.exe /path " & EnvGet("SYSTEMDRIVE") & "\driverbackup")
EndIf
If GUICtrlRead($6) = $GUI_CHECKED Then
GUICtrlSetState(($1) & ($2) & ($3) & ($4) & ($5), $GUI_DISABLE + $GUI_UNCHECKED)
EndIf
EndFunc
DirRemove(EnvGet("SYSTEMDRIVE") & "\driverbackup", 1)
«
Last Edit: February 19, 2014, 12:49:51 PM by trashy
»
Re: Driver Import Testing
«
Reply #1 on:
February 19, 2014, 04:56:33 AM »
trashy
Code Baker
Chef
The Oven will always be my first Home
Location: RedNeck County
Date Registered: Feb 2013
Posts: 179
Current script works good but I would still like some input on other drivers to add. Using DoubleDriver command line tool.
It gives me a nice folder structure that makes it easy to select drivers to Import. The only problem is it only backs up nonMS drivers
so I can't import all drivers. Besides that can be very time consuming. Thought about using Smart Driver Backup for this option.
Code:
[Select]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region
$Form1 = GUICreate("Driver Import", 400, 200, 1000, 70, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS), $WS_EX_TOPMOST)
GUISetBkColor (0xA6CAF0)
$widthCell = 250
GUICtrlCreateLabel("Select the drivers you want to Import", 10, 20, $widthCell)
GUICtrlCreateLabel("Click Import when process completes Click Install", 10, 40, $widthCell)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Checkbox1 = GUICtrlCreateCheckbox("Network", 10, 80, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox1Click")
$Checkbox2 = GUICtrlCreateCheckbox("Video", 200, 80, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox2Click")
$Checkbox3 = GUICtrlCreateCheckbox("Audio", 10, 100, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox3Click")
$Checkbox4 = GUICtrlCreateCheckbox("Other", 200, 100, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox4Click")
$Checkbox5 = GUICtrlCreateCheckbox("All NonMS", 10, 120, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox5Click")
$Checkbox6 = GUICtrlCreateCheckbox("All Drivers", 200, 120, 97, 17)
GUICtrlSetOnEvent(-1, "Checkbox6Click")
$Import = GUICtrlCreateButton("Import Drivers", 65, 170, 85, 25)
GUICtrlSetOnEvent($Import, "ImportClick")
$Install = GUICtrlCreateButton("Install Drivers", 155, 170, 85, 25)
GUICtrlSetOnEvent($Install, "InstallClick")
$Exit = GUICtrlCreateButton("Exit", 245, 170, 85, 25)
GUICtrlSetOnEvent($Exit, "ExitClick")
GUISetState(@SW_SHOW)
#EndRegion
While 1
Sleep(100)
WEnd
Func ImportClick()
If GUICtrlRead($Checkbox1) or ($Checkbox2) or ($Checkbox3) or ($Checkbox4) = $GUI_CHECKED Then
RunWait("RunScanner.exe /t 10 /cp /sd /ac /m+ /y ddc.exe b /target:" & EnvGet("SYSTEMDRIVE") & "\driverbackup")
DirCreate(EnvGet("SYSTEMDRIVE") & "\driverbackup\Install")
EndIf
If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
DirMove(@HOMEDRIVE & "\driverbackup\Net\", @HOMEDRIVE & "\driverbackup\Install\", 1)
EndIf
If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
DirMove(@HOMEDRIVE & "\driverbackup\Display\", @HOMEDRIVE & "\driverbackup\Install\", 1)
EndIf
If GUICtrlRead($Checkbox3) = $GUI_CHECKED Then
DirMove(@HOMEDRIVE & "\driverbackup\MEDIA\", @HOMEDRIVE & "\driverbackup\Install\", 1)
EndIf
EndFunc
Func InstallClick()
If GUICtrlRead($Checkbox1) or ($Checkbox2) or ($Checkbox3) or ($Checkbox4) = $GUI_CHECKED Then
RunWait("Dpinst.exe /path " & EnvGet("SYSTEMDRIVE") & "\driverbackup\Install\")
EndIf
If GUICtrlRead($Checkbox5 = $GUI_CHECKED) Then
RunWait("Dpinst.exe /path " & EnvGet("SYSTEMDRIVE") & "\driverbackup\")
EndIf
EndFunc
Func ExitClick()
Exit
EndFunc
Func Checkbox1Click()
If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
EndIf
EndFunc
Func Checkbox2Click()
If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
EndIf
EndFunc
Func Checkbox3Click()
If GUICtrlRead($Checkbox3) = $GUI_CHECKED Then
EndIf
EndFunc
Func Checkbox4Click()
If GUICtrlRead($Checkbox4) = $GUI_CHECKED Then
EndIf
EndFunc
Func Checkbox5Click()
If GUICtrlRead($Checkbox5) = $GUI_CHECKED Then
GUICtrlSetState($Checkbox1, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox2, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox3, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox4, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox6, $GUI_DISABLE + $GUI_UNCHECKED)
Else
GUICtrlSetState($Checkbox1, $GUI_ENABLE)
GUICtrlSetState($Checkbox2, $GUI_ENABLE)
GUICtrlSetState($Checkbox3, $GUI_ENABLE)
GUICtrlSetState($Checkbox4, $GUI_ENABLE)
GUICtrlSetState($Checkbox6, $GUI_ENABLE)
EndIf
EndFunc
Func Checkbox6Click()
If GUICtrlRead($Checkbox6) = $GUI_CHECKED Then
GUICtrlSetState($Checkbox1, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox2, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox3, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox4, $GUI_DISABLE + $GUI_UNCHECKED)
GUICtrlSetState($Checkbox5, $GUI_DISABLE + $GUI_UNCHECKED)
Else
GUICtrlSetState($Checkbox1, $GUI_ENABLE)
GUICtrlSetState($Checkbox2, $GUI_ENABLE)
GUICtrlSetState($Checkbox3, $GUI_ENABLE)
GUICtrlSetState($Checkbox4, $GUI_ENABLE)
GUICtrlSetState($Checkbox5, $GUI_ENABLE)
EndIf
EndFunc
Func Form1Close()
Exit
EndFunc
«
Last Edit: February 19, 2014, 01:01:44 PM by trashy
»
Print
Pages: [
1
]
« previous
next »
Plugin World
»
General Plugins
»
Questions and Support
»
Driver Import Testing
Powered by
EzPortal