Jump to content

Suppressing New Hardware Window


Recommended Posts

How can I suppress the New Hardware Wizard window in XP Pro SP2? There are a few of my drivers that will not run when the New Hardware Wizard window is present, so I need a way to stop it from popping up, or a way to close it when it opens.

Any ideas? I did see a Registry Key for XP Embedded, but it did not work on XP Pro. :no:

Link to comment
Share on other sites


I don't see that problem on my XP installs. But I do use an AutoIt script to get past those dialogs on 2003.

This is my AutoIt 2.6 script for Windows 2003:

BEGIN:
Sleep, 5000
IfWinExist, Confirm File Replace, , Goto, CONFIRM
IfWinExist, Found New Hardware Wizard, Cannot Install this Hardware, Goto, NOINSTALL
IfWinExist, Found New Hardware Wizard, The wizard has finished, Goto, FINISHED
IfWinExist, Found New Hardware Wizard, Completing the Found, Goto, QUICK
IfWinExist, Found New Hardware Wizard, Welcome to, Goto, NORMAL
Sleep, 10000
Goto, START

START:
IfWinExist, Confirm File Replace, , Goto, CONFIRM
IfWinExist, Found New Hardware Wizard, Cannot Install this Hardware, Goto, NOINSTALL
IfWinExist, Found New Hardware Wizard, The wizard has finished, Goto, FINISHED
IfWinExist, Found New Hardware Wizard, Completing the Found, Goto, QUICK
IfWinExist, Found New Hardware Wizard, Welcome to, Goto, NORMAL
Goto, EXIT

NORMAL:
WinActivate, Found New Hardware Wizard
WinWaitActive, Found New Hardware Wizard
Send, !n
Goto, BEGIN

CONFIRM:
WinActivate, Confirm File Replace
WinWaitActive, Confirm File Replace
Send, !a
Goto, BEGIN

FINISHED:
WinWaitActive, Found New Hardware Wizard, The wizard has finished
Send, {ENTER}
Goto, BEGIN

NOINSTALL:
WinWaitActive, Found New Hardware Wizard, Cannot Install this Hardware
Send, {TAB 2}{ENTER}
Goto, BEGIN

QUICK:
WinActivate, Found New Hardware Wizard, Completing the Found
WinWaitActive, Found New Hardware Wizard, Completing the Found
Send, {ENTER}
Goto, BEGIN

EXIT:
Exit

I have not tested this on XP, it may have to be "tweaked".

Link to comment
Share on other sites

Your disc is nLited no ? if yes it's known problem, and at this time I don't know if exist a solution ... to avoid this problem I have used some registry tweaks

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DriverSearching]
"DontSearchWindowsUpdate"=dword:00000001
"DontPromptForWindowsUpdate"=dword:00000001
"DontSearchCD"=dword:00000001
"DontSearchFloppies"=dword:00000001

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\Driver Signing]
"BehaviorOnFailedVerify"=dword:00000000

[HKEY_USERS\.DEFAULT\Software\Policies\Microsoft\Windows NT\Driver Signing]
"BehaviorOnFailedVerify"=dword:00000000

without any success :no:

If anyone has the solution come on ! because popup appears when have mouse & keyboard usb so we can't confirm install because there no classic mouse & keyb ...

Edited by sonic
Link to comment
Share on other sites

I don't see that problem on my XP installs. But I do use an AutoIt script to get past those dialogs on 2003.

How would I use this AutoIt script along with a cmd file? Is it something that always runs checking for those options? I've got a few Windows that seem to pop up a few seconds after the majority of them.

Link to comment
Share on other sites

I run it in the RUN section of the registry from my own custom master script, and then delete the entry right before I reboot the machine for the last time. To run it from a batch file, I think you have to use a WAIT command, not sure on that, haven't used batch as my master engine in a while.

The autoit script basicly loops inside itself, because some of my machines have differing numbers of new hardware popup dialogs. And once it stops detecting the dialogs, it exits, and allows the rest of the script to continue.

Link to comment
Share on other sites

I run it in the RUN section of the registry from my own custom master script, and then delete the entry right before I reboot the machine for the last time. To run it from a batch file, I think you have to use a WAIT command, not sure on that, haven't used batch as my master engine in a while.

The autoit script basicly loops inside itself, because some of my machines have differing numbers of new hardware popup dialogs. And once it stops detecting the dialogs, it exits, and allows the rest of the script to continue.

Guess I'll have to look at AutoIT. I'm launching my scripts via RunOnce on boot, so I could just include the AutoIT script as well.

Link to comment
Share on other sites

I don't see that problem on my XP installs. But I do use an AutoIt script to get past those dialogs on 2003.

This is my AutoIt 2.6 script for Windows 2003:

I have not tested this on XP, it may have to be "tweaked".

Jazkal, I made an AutoIt 3 conversion of your script. Try to emulate your goto methods and this is the result. I did not try to improve, but to just simply convert. :)

For $i = 1 To 2
While 1
Sleep(5000)
If WinExists('Confirm File Replace') Then
WinActivate('Confirm File Replace')
WinWaitActive('Confirm File Replace')
Send('!a')
Exit
EndIf
If WinExists('Found New Hardware Wizard', 'Cannot Install this Hardware') Then
WinWaitActive('Found New Hardware Wizard', 'Cannot Install this Hardware')
Send('{TAB 2}{ENTER}')
ContinueLoop
EndIf
If WinExists('Found New Hardware Wizard', 'The wizard has finished') Then
WinWaitActive('Found New Hardware Wizard', 'The wizard has finished')
Send('{ENTER}')
ContinueLoop
EndIf
If WinExists('Found New Hardware Wizard', 'Completing the Found') Then
WinActivate('Found New Hardware Wizard', 'Completing the Found')
WinWaitActive('Found New Hardware Wizard', 'Completing the Found')
Send('{ENTER}')
ContinueLoop
EndIf
If WinExists('Found New Hardware Wizard', 'Welcome to') Then
WinActivate('Found New Hardware Wizard')
WinWaitActive('Found New Hardware Wizard')
Send('!n')
ContinueLoop
EndIf
Sleep(10000)
ExitLoop
WEnd
Next

Exit

Edit: Added a For loop to enable a second run of loop. Thanks Jazkal.

Edited by MHz
Link to comment
Share on other sites

I think I know what problem he's talking about. After SP2, there's a new question it asks when you install new drivers, something about going online or not to search for drivers. That new question screws up some of the older drivers install.

I would suggest you go online to download newer drivers for your hardware.

Link to comment
Share on other sites

Jazkal, I made an AutoIt 3 conversion of your script. Try to emulate your goto methods and this is the result. I did not try to improve, but to just simply convert. :)

MHz, I've been meaning to convert all my v2.6 scripts over to v3, just haven't made the time to do it. One thing I think is missing from the script is a loop. That code looks like it will run through once and then exit. You want it to run through, and then check to see if there is another dialog that comes up.

Look I'm not having this problem, but when are you dudes running this script?

MC.

MC, I run this from a master script which is run from the RUN registry entry on first login desktop load. I wait for it to exit out (after multiple New Hardware Wizards come up), and then continue on from there.

Link to comment
Share on other sites

MHz, I've been meaning to convert all my v2.6 scripts over to v3, just haven't made the time to do it. One thing I think is missing from the script is a loop. That code looks like it will run through once and then exit. You want it to run through, and then check to see if there is another dialog that comes up.

Thanks for seeing the difference. Seems your interpretation of v3 is alittle better of my interpretation of v2. Been awhile since I used v2.

Well, here is a timed loop version using v3. I used Select Case as all the If's were getting messy. The code below will loop for the setting of 1 minute.

$allowed = 60 * 1000
$time = TimerInit()
While $allowed > TimerDiff($time)
Select
Case WinExists('Confirm File Replace')
WinActivate('Confirm File Replace')
Case WinExists('Found New Hardware Wizard')
WinActivate('Found New Hardware Wizard')
Case Else
Sleep(5000)
ContinueLoop
EndSelect
Sleep(250)
Select
Case WinActive('Confirm File Replace')
Send('!a')
Case WinActive('Found New Hardware Wizard', 'Cannot Install this Hardware')
Send('{TAB 2}{ENTER}')
Case WinActive('Found New Hardware Wizard', 'The wizard has finished')
Send('{ENTER}')
Case WinActive('Found New Hardware Wizard', 'Completing the Found')
Send('{ENTER}')
Case WinActive('Found New Hardware Wizard', 'Welcome to')
Send('!n')
EndSelect
WEnd

Link to comment
Share on other sites

JDS300: your disc is nlited ?

No, it's not.

So this AutoIT script runs first, looking for an closing any Windows. It loops until it doesn't find anymore, then exits. After it exits, and the next part/next script runs.

Thats how that script runs, correct?

BTW, thank you all for the input, I thought I was going to be dead in the water! :thumbup

Link to comment
Share on other sites

JDS300: your disc is nlited ?

No, it's not.

So this AutoIT script runs first, looking for an closing any Windows. It loops until it doesn't find anymore, then exits. After it exits, and the next part/next script runs.

Thats how that script runs, correct?

BTW, thank you all for the input, I thought I was going to be dead in the water! :thumbup

What you can do is just add a HKCU RunOnce entry from a HKLM RunOnceEx entry. This will run the script only once for you and the RunOnce entry clears once executed.

I just tested this entry and works ok.

Example:

Set KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
Set RunOnce=HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce

REG ADD %KEY%\099 /V 1 /D "Reg Add %RunOnce% /v ScanWFP /d \"C:\Install\Compiled.exe\"" /f

Link to comment
Share on other sites

Awesome, thank you very much!

I am using the code that Jazkal posted, and for XP so far the only thing I've had to change was the following:

NORMAL:
WinActivate, Found New Hardware Wizard
WinWaitActive, Found New Hardware Wizard
Send, {TAB 2}{ENTER}
Goto, BEGIN

In W2k3, it was sending !n, and XP doesn't seem to know what to do with that. Replacing !n with {TAB 2}{ENTER} gets the Windows to close. Just incase anyone else is interested. :D

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...