Topic: Device Installer  (Read 247 times)

0 Members and 1 Guest are viewing this topic.

Device Installer
« on: August 16, 2017, 12:18:49 AM »

trashy

  • Code Baker
  • Chef
  • ***
  • Location: RedNeck County
  • Date Registered: Feb 2013
  • Posts: 179
Plugin finished get it here http://theoven.org/index.php?topic=2196.msg23751#msg23751

This finishes off the mess I'm working on here.
 http://theoven.org/index.php?topic=2087.msg23182#msg23182

Same tools HWPnP PnPUtil same cmd lines already being used.
This puts everything in one place for installing integrated drivers.
You'll see the stuff on the right mostly dealing with basic display install
Is it really necessary or would that space best be used for something else.
Any Suggestions

Here's the exe
* Install Devices.7z (750.2 kB - downloaded 39 times.)

Here's the code
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <ScrollBarsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Install Devices", 615, 504, 192, 124)
$Label1 = GUICtrlCreateLabel("HWPnP", 8, 8, 48, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Force All", 24, 40, 75, 25)
$Button2 = GUICtrlCreateButton("Force USB", 120, 40, 75, 25)
$Button3 = GUICtrlCreateButton("Install All", 220, 40, 75, 25)
$Label2 = GUICtrlCreateLabel("Force Install All", 25, 24, 80, 17)
$Label3 = GUICtrlCreateLabel("Force Install USB", 118, 24, 86, 17)
$Label4 = GUICtrlCreateLabel("Install Devices", 220, 24, 73, 17)
$PnPUtil = GUICtrlCreateLabel("PnPUtil", 8, 80, 55, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("PnpUtil All", 32, 104, 52, 17)
$Label6 = GUICtrlCreateLabel("PnpUtil Net", 220, 104, 58, 17)
$Button4 = GUICtrlCreateButton("Install All", 24, 120, 75, 25)
$Button5 = GUICtrlCreateButton("Install Net", 220, 120, 75, 25)
$Edit1 = GUICtrlCreateEdit("", 8, 168, 601, 289)
GUICtrlSetData(-1, "")
$Close = GUICtrlCreateButton("Close", 280, 464, 75, 25)
$Label7 = GUICtrlCreateLabel("PE 7", 420, 8, 58, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button6 = GUICtrlCreateButton("ATI", 400, 40, 75, 25)
$Button7 = GUICtrlCreateButton("INTEL", 400, 80, 75, 25)
$Button8 = GUICtrlCreateButton("NVIDIA", 400, 120, 75, 25)
$Label9 = GUICtrlCreateLabel("Install Basic ATI", 390, 24, 128, 17)
$Label10 = GUICtrlCreateLabel("Install Basic Intel", 390, 64, 128, 17)
$Label11 = GUICtrlCreateLabel("Install Basic Nvidia", 390, 106, 128, 17)
$Label8 = GUICtrlCreateLabel("PE 8", 520, 8, 58, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button9 = GUICtrlCreateButton("Basic Display", 500, 40, 75, 25)
$Button10 = GUICtrlCreateButton("Renew USB", 500, 80, 75, 25)
$Label2 = GUICtrlCreateLabel("Install Basic display", 500, 24, 128, 17)
$Label13 = GUICtrlCreateLabel("Renew USB3", 500, 64, 128, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
      Case $GUI_EVENT_CLOSE, $Close
         Exit
      Case $Button1
         RunWait(@SystemDir & "\HwPnp.exe +all -storage\removable -storage\volume -USB\ROOT +USB\ /log /p /u /d+ /s /rs")
      Case $Button2
         RunWait(@SystemDir & "\HWPnp.exe -all -STORAGE\VOLUME +USB\ +USBSTOR\ /a /u /log /p /d /s /rs")
      Case $Button3
         RunWait(@SystemDir & "\HWPnp.exe +all /p /d /log")
      Case $Button4
         Global $output = Run(@ComSpec & ' /c pnputil.exe -i -a %SystemRoot%\inf\*.inf', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
      Case $Button5
         Global $output = Run(@SystemDir & " /c pnputil.exe -i -a %SystemRoot%\inf\net*.inf", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
      Case $Button6
         Global $output = Run(@SystemDir & "\cmd.exe /c drvload.exe %SystemRoot%\System32\DriverStore\FileRepository\atiilhag.inf_amd64_neutral_0a660e899f5038a2\atiilhag.inf && <nul (set/p z=#) & >nul ping 127.0.0.1 -n 2", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
      Case $Button7
         Global $output = Run(@SystemDir & "\cmd.exe /c drvload.exe %SystemRoot%\System32\DriverStore\FileRepository\igdlh.inf_amd64_neutral_54a12b57f547d08e\igdlh.inf && <nul (set/p z=#) & >nul ping 127.0.0.1 -n 2", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
      Case $Button8
         Global $output = Run(@SystemDir & "\cmd.exe /c drvload.exe %SystemRoot%\System32\DriverStore\FileRepository\nv_lh.inf_amd64_neutral_bc69f20e3115af59\nv_LH.inf && <nul (set/p z=#) & >nul ping 127.0.0.1 -n 2", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
      Case $Button9
         Global $output = Run(@SystemDir & "\cmd.exe /c drvload.exe %SystemRoot%\inf\basicdisplay.inf %SystemRoot%\inf\basicrender.inf %SystemRoot%\inf\c_display.inf %SystemRoot%\inf\display.inf %SystemRoot%\inf\displayoverride.inf >nul & <nul (set/p z=#) & >nul ping 127.0.0.1 -n 2", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
      Case $Button9
         Global $output = Run(@SystemDir & " /c \RenewUSB3.cmd", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
         _CatchMe()
   EndSwitch
WEnd

Func _CatchMe()
   $progout = ""
   $progcatch = ""
   While 1
      $progout &= StdoutRead($output)
      If $progout <> $progcatch Then
         GUICtrlSetData($Edit1, $progout)
         _GUICtrlEdit_Scroll($Edit1, $SB_BOTTOM)
         $progcatch = $progout
      EndIf
      If @error Then ExitLoop
   WEnd
EndFunc   ;==>_CatchMe
« Last Edit: August 19, 2017, 09:22:08 PM by trashy »

 

Powered by EzPortal