MSFN Forum: Suppressing New Hardware Window - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Suppressing New Hardware Window Rate Topic: -----

#1 User is offline   JDS300 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 19-December 05

Posted 04 January 2006 - 04:27 PM

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:


#2 User is offline   Jazkal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 590
  • Joined: 16-January 04

Posted 04 January 2006 - 04:48 PM

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".

#3 User is offline   Sonic 

  • Sonic
  • Group: Patrons
  • Posts: 1,600
  • Joined: 04-December 03

Posted 04 January 2006 - 04:49 PM

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

This post has been edited by sonic: 04 January 2006 - 04:50 PM


#4 User is offline   JDS300 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 19-December 05

Posted 04 January 2006 - 08:30 PM

View PostJazkal, on Jan 4 2006, 05:48 PM, said:

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.

#5 User is offline   Jazkal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 590
  • Joined: 16-January 04

Posted 04 January 2006 - 09:04 PM

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.

#6 User is offline   JDS300 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 19-December 05

Posted 04 January 2006 - 09:07 PM

View PostJazkal, on Jan 4 2006, 10:04 PM, said:

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.

#7 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 04 January 2006 - 09:43 PM

View PostJazkal, on Jan 5 2006, 08:48 AM, said:

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.

This post has been edited by MHz: 05 January 2006 - 06:41 AM


#8 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,615
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 04 January 2006 - 11:02 PM

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

MC.

#9 User is offline   jcarle 

  • MSFN Master
  • Group: Developers
  • Posts: 2,569
  • Joined: 14-August 04

Posted 04 January 2006 - 11:30 PM

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.

#10 User is offline   Jazkal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 590
  • Joined: 16-January 04

Posted 04 January 2006 - 11:32 PM

View PostMHz, on Jan 4 2006, 10:43 PM, said:

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.


View PostMAVERICKS CHOICE, on Jan 5 2006, 12:02 AM, said:

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.

#11 User is offline   Sonic 

  • Sonic
  • Group: Patrons
  • Posts: 1,600
  • Joined: 04-December 03

Posted 05 January 2006 - 05:42 AM

JDS300: your disc is nlited ?

#12 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 05 January 2006 - 07:03 AM

View PostJazkal, on Jan 5 2006, 03:32 PM, said:

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


#13 User is offline   JDS300 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 19-December 05

Posted 05 January 2006 - 08:06 AM

View Postsonic, on Jan 5 2006, 06:42 AM, said:

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

#14 User is offline   MHz 

  • SendToA3X v1.7
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,634
  • Joined: 02-August 04

Posted 05 January 2006 - 08:32 AM

View PostJDS300, on Jan 6 2006, 12:06 AM, said:

View Postsonic, on Jan 5 2006, 06:42 AM, said:

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


#15 User is offline   JDS300 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 19-December 05

Posted 05 January 2006 - 09:17 AM

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

#16 User is offline   darkovo 

  • Group: Members
  • Posts: 4
  • Joined: 01-November 05

Posted 24 January 2006 - 11:03 AM

I have a the same issue with New Hardware Found message and have never used AutoIT so will have a look but has this been introduced by a new patch to XP? I can't remember it coming up last year!! Maybe cause I was using XP SP1 as my main test bed and finally moved up to XP SP2.

Anyone know if it is a patch, so I could install this patch/set of patches after the drivers have installed!!!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy