inciardi Posted August 22, 2006 Posted August 22, 2006 I looked for answers on how to suppress the Found New Hardware Wizard dialog, but found little that worked. So I wrote a little VBS script that uses the taskkill command to kill windows where windowtitle eq Found New Hardware Wizard. I found this approach to be preferable to all the others tried to this point.So I wanted to post it for what its worth. If you have a new hardware wizard giving you grief and new to kill it, this may be what you seek.The script is written to take two inputs, one mandatory and one optional. The mandatory input is for a timeout value (e.g., /TimeOut:20). In other words, the amount of time, in seconds, the thing will run. The second input, the /Name:[yourtexthere], is optional and can be used to help you track when you dispatched this script. This info is written into the WizKilla.vbs log file. For example, lets say when installing the WLAN driver the Found New Hardware Wizard is giving you grief. Simply dispatch the WizKilla.vbs immediately before launching your unattended driver install. Use the following syntax: cscript.exe //nologo wizkilla.vbs /Timeout:20 /Name:WLAN---- Begin WizKilla.vbs -----'-----------------------------------------------------------------------------' This script Loops a set number of times based on user supplied input value' Where each loop is eqaul to 1 second in duration.' During each loop a taskkill command is executed to kill the window(s)' titled 'Found New Hardware Wizard''' Date: 08.21.06' Author: Bruce Inciardi' Revision: original'-----------------------------------------------------------------------------strComputer = "."Const ForAppending = 8Set oArgs = wscript.ArgumentsSet colNamedArguments = WScript.Arguments.NamedstrName = colNamedArguments.Item("Name")strTimeout = colNamedArguments.Item("Timeout")Set WshNetwork = WScript.CreateObject("WScript.Network")Set WshShell = WScript.CreateObject("WScript.Shell")compname = WshNetwork.ComputerNameset FSO = CreateObject("Scripting.FileSystemObject")strLogFile = "\LOGS\" & Split(WScript.ScriptName, ".")(0) & ".log"pathtologfile = WshShell.ExpandEnvironmentStrings _ ("%SystemRoot%" & strlogfile)If FSO.FileExists(PathToLogFile) Then '' Wscript.Echo "File exist." Set objLogFile = FSO.OpenTextFile(pathtologfile, ForAppending)Else '' Wscript.Echo "File does not exist." Set objLogFile = FSO.CreateTextFile(pathtologfile, TRUE) End IfobjLogFile.WriteLine(Now & ": " & WScript.ScriptFullName & " Started." & vbCrLf)objLogFile.WriteLine("Current Computer Name: " & compname)objLogFile.WriteLine("Log File/Path: " & pathtologfile)objLogFile.WriteLine("Script loops 'x' times based on user provided input and kills 'New Hardware Found Wizard' dialogs." & vbCrLf)If Not colNamedArguments.Exists("TimeOut") Then objLogFile.WriteLine("Input in error") objLogFile.WriteLine("Correct Usage:") objLogFile.WriteLine("cscript WizKilla.vbs /TimeOut:10 /Name:" & Chr(34) & "Intel WLAN" & Chr(34)) Wscript.quit(0)End If iTimeout = strTimeout iTimeout=CInt(strTimeout) objLogFile.WriteLine("Launched with parms: /Timeout:" & strTimeout & " /Name:" & strName & vbCrLf) Wscript.Echo "Shhhh, be vewy qwiet..." Wscript.Echo "...I'm hunting Found New Hardware Wizard Dialogs."iLoop = 0Do Until iLoop > iTimeout iLoop=iLoop+1 WScript.Sleep 1000 If iLoop > iTimeout Then Exit Do Else ' "Perform taskkill cmd here" killacmd = "taskkill /FI " & Chr(34) & "WINDOWTITLE eq Found New Hardware Wizard" & Chr(34) Set oExecObject = WshShell.Exec("%comspec% /c " & killacmd) Do Until oExecObject.StdOut.AtEndOfStream strLine = oExecObject.StdOut.ReadLine() if (Instr(strLine,"INFO:")<>0) Or (Instr(strLine,"SUCCESS:")<>0) Then If Instr(strLine,"SUCCESS:")<>0 Then Wscript.Echo "Got One!" objLogFile.WriteLine(Now & ": (" & iLoop & ") " & strLine) End If Loop End IfLoop objLogFile.WriteLine("Script Completed; Timeoutvalue reached" & vbCrLf)objLogFile.WriteLine(Now & ":" & vbTab & WScript.ScriptFullName & " Ended." & vbCrLf)---- End WizKilla.vbs -----Hope this helps someone.Bruce
rebsbox Posted October 31, 2006 Posted October 31, 2006 Just come across this, it turns out that it thinks usbstor.sys is unsigned -the one I had mismatched the one listed in usbstor.inf - just copied them from a good setup dir
alastor Posted March 4, 2009 Posted March 4, 2009 I have a problem with the New Hardware Wizard, and read through this, but was not able to find the file in regedit that I need to get to. When I get into [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows there is no folder for "DriverSearching" at all. The only Folders I see are: InstallerIPSecSaferSystemWiredL2Similarly, when I go into [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT the only folder I see is "Terminal Services"There is no "DriverSigning" presentThe problem I am getting is that everytime I boot my computer the Found New Hardware Wizard comes up, and when I try to run it, it just gets stuck. I end up cancelling it, but would prefer that I not need to do this anymore. Could anyone tell me if these missing folders have something to do with the Wizard malfunctioning?Thanks!
Bilou_Gateux Posted March 15, 2009 Posted March 15, 2009 You can create the new key and add some data.REG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\DriverSearching /v DontSearchWindowsUpdate /t REG_DWORD /d 1 /fREG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\DriverSearching /v DontPromptForWindowsUpdate /t REG_DWORD /d 1 /fREG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\DriverSearching /v DontSearchCD /t REG_DWORD /d 1 /fREG ADD HKLM\SOFTWARE\Policies\Microsoft\Windows\DriverSearching /v DontSearchFloppies /t REG_DWORD /d 1 /f
CRK Posted October 22, 2009 Posted October 22, 2009 (edited) i'm having this situation as explained here:http://www.msfn.org/board/new-hardware-wiz...pid-888585.htmland here: http://www.msfn.org/board/stop-found-new-h...pid-884196.htmlall i need is to kill the window: found new hardware wizard..ok.. my cuestion is how can i implement a VB script or auto it compiled exe to kill this windows that appears 3 times at T-25 of unattended SP3 pro install if a click cancel 3 times the windows dissapear and installation keep going normally.. sometimes i have to click Alt+ tab for the windows to show up because it looks like they remain in the background of the installation preventing to continue.all i can find is comments about implementing auto it to install programs.. that's not what i need.. many people say do this this...etc just ideas but don't explain exactly what to do..i found searching this script for auto it that's is supposed to kill the window also... bug i guess it missing some command to wait for 25 minutes then look for the window 3 or 4 times to kill it..here it's:this is AutoIT3 script that I use to get rid of those "New HardwareFound" windows.Save it as e.g. close_popup.au3, download autoit and compile to exe.It will run in the background waiting for specified windows andclosing them. You can stop it by using /QUIT.Just change 'Found New Hardware Wizard' to the title of your window,and 'Welcome' to any text of the popup.You can change the name of the script window ('KillHWiz') but it's notneccessary.There is also a auto it dll that you can use through Win32API or ruby/dl.HTH,J.----8<--------------------If $CmdLine[0] = 1 and $CmdLine[1] = '/QUIT' ThenWinClose('KillHWiz')ElseAutoItWinSetTitle('KillHWiz')While 1=1WinWait ( 'Found New Hardware Wizard', 'Welcome' )WinClose ( 'Found New Hardware Wizard', 'Welcome' )WEndSource: http://www.mombu.com/programming/ruby/t-do...es-1308554.htmlplease any inputs are welcome.My Best Regards Edited October 22, 2009 by CRK
Martin H Posted December 13, 2009 Posted December 13, 2009 On WinXP, then the 'Found new hardware' wizard will still be shown even though there are a driver available if the driver is either unsigned, or is only a compatible ID match and not a direct hardware ID match, so the wizard is shown for prompting if the end-user has a better driver available than this...
isidro Posted December 7, 2016 Posted December 7, 2016 (edited) Thanks to CRK suggestion I made a better AutoIt3 script https://www.autoitscript.com/site/autoit/downloads/ which would continue with all New Hardware Wizard windows accepting non signed drivers, Cancelling WinXP CD prompts and skipping multiple options (connect to internet, etc), so as to get Mouse and Keyboard detected and installed. The compiled autoit script EXE should be copied to the "Start" (within "Start Menu") folder to be automatically executed. The script strings MUST be adapted to the local windows language. And probably some Alt-LETTER combinations too. My sample works in SPANISH WinXP. Hope it helps somebody else, after having mouse and keyboard functioning, script must be deleted (or moved to other folder): $asistente= "Asistente para hardware nuevo encontrado" ;"Found New Hardware Wizard" $instalacion= "Instalación de hardware" $archivos= "Archivos necesarios" $cambio= "Cambio de configuración del sistema" while 1 sleep(200) if WinExists( $cambio) then WinActivate( $cambio) sleep(200) Send("!n") ; (press Alt-n) endif if WinExists( $instalacion) then WinActivate( $instalacion) sleep(200) $text=WinGetText( $instalacion) if StringInStr( $text, "El software que está instalando para este hardware") then ;"The software..." Send("!c") endIf ; MsgBox($MB_OK, "Autoit Status", $text & stringinstr( $text, "está"), 2 ) ; sleep(2000) endif if WinExists($archivos) then WinActivate($archivos) sleep(200) $text=WinGetText( $archivos) if StringInStr( $text, "Se necesita el archivo") then ControlClick( "Archivos necesarios", "", "[ID:2]" ) endIf endif if WinExists( $asistente) then WinActivate( $asistente) sleep( 200) $text=WinGetText( $asistente) if StringInStr( $text, "Desea que Windows se conecte a Windows Update") then ;"Can Windows connect to Windows Update to search for software?" ; ControlCommand( $asistente, "", "[ID:8104]", "Check", "") sleep(150) ; ControlClick( $asistente, "", "[ID:12324]") Send("!n") sleep(100) Send("!t") sleep(250) endif $text=WinGetText( $asistente) if StringInStr( $text, "Este asistente le ayudará a instalar software para:") then ;"This wizard" sleep(150) Send("!t") sleep(250) endif $text=WinGetText( $asistente) if StringInStr( $text, "No se puede instalar este hardware") then ;"Cannot Install this Hardware" ControlCommand( $asistente, "", "[ID:1030]", "UnCheck", "") sleep(200) ;ControlClick( $asistente, "", "[ID:12325]") Send("{ENTER}") sleep(200) endif $text=WinGetText( $asistente) if StringInStr( $text, "desea que haga el asistente?") then ;"What do you want the wizard to do?" ControlCommand( $asistente, "", "[ID:1049]", "Check", "") sleep(200) ControlClick( $asistente, "", "[ID:12324]") sleep(200) endif $text=WinGetText( $asistente) if StringInStr( $text, "Se recomienda que se conecte a Internet para que el asistente") then ControlCommand( $asistente, "", "[ID:1065]", "Check", "") sleep(200) ControlClick( $asistente, "", "[ID:12324]") sleep(200) endif $text=WinGetText( $asistente) if StringInStr( $text, "Finalizar para cerrar") then ;"Click Finish to close the wizard." ControlClick( $asistente, "", "[ID:12325]") sleep(250) endif endif wend Edited December 7, 2016 by isidro
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now