We have situations where the user selects "cancel" on the new hardware
wizard dialogs before the driver is completely installed (apparently they
get confused or something.) The driver files have been pre-installed using
SetupCopyOEMInf. This is a USB device and if they unplug and re-plug the
device in the wizard comes up again and works fine (at least on XP where I'm
testing.)

Is there a way to do this from a program? I can detect the device on the
bus and that it wasn't setup correctly. Now I want to "reinstall" the
device to set it up correctly. If I right click in the device manager it
displays the new hardware wizard. I want to do this from my application,
just cause the new hard found dialog to appear and again and do its normal
thing.

Any way to do this? Thanx!

Re: Display "New hardware" wizard on an orphanded device programmatically by Eliyas

Eliyas
Sun Aug 07 09:09:29 CDT 2005

After you find the device, call UpdateDriverForPlugAndPlayDevices on it.
Follow the devcon sample in the DDK.

--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx



Re: Display "New hardware" wizard on an orphanded device programmatically by Tim

Tim
Mon Aug 08 11:09:41 CDT 2005

Thanx! The problem is that the registry entry is not complete. So I don't
have a valid HardwareID in the registry. UpdateDriverForPlugAndPlayDevices
fails to find any devices for that hardware ID.


"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
news:ugFIcm1mFHA.320@TK2MSFTNGP09.phx.gbl...
> After you find the device, call UpdateDriverForPlugAndPlayDevices on it.
> Follow the devcon sample in the DDK.
>
> --
> --
> -Eliyas
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> http://www.microsoft.com/whdc/driver/default.mspx
> http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
>
>



Re: Display "New hardware" wizard on an orphanded device programmatically by Pavel

Pavel
Mon Aug 08 16:34:17 CDT 2005

"Tim" <tim@deltacompsys.com> wrote in message news:11ff0u8jqrkp487@corp.supernews.com...
> Thanx! The problem is that the registry entry is not complete.

What means - not complete? no Driver value?
--PA

> So I don't have a valid HardwareID in the registry. UpdateDriverForPlugAndPlayDevices fails to find any devices for that
> hardware ID.
>
>
> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message news:ugFIcm1mFHA.320@TK2MSFTNGP09.phx.gbl...
>> After you find the device, call UpdateDriverForPlugAndPlayDevices on it. Follow the devcon sample in the DDK.
>>
>> --
>> --
>> -Eliyas
>> This posting is provided "AS IS" with no warranties, and confers no rights.
>> http://www.microsoft.com/whdc/driver/default.mspx
>> http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
>>
>>
>
>



Re: Display "New hardware" wizard on an orphanded device programmatically by Eliyas

Eliyas
Tue Aug 09 00:15:13 CDT 2005

If update doesn't work, you can try removing the device and then scan for
hardware changes to cause the device to completely reinstalled.

http://support.microsoft.com/default.aspx?scid=kb;en-us;259697

--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/default.mspx
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx



"Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
news:O9bEzDGnFHA.3936@TK2MSFTNGP10.phx.gbl...
> "Tim" <tim@deltacompsys.com> wrote in message
> news:11ff0u8jqrkp487@corp.supernews.com...
>> Thanx! The problem is that the registry entry is not complete.
>
> What means - not complete? no Driver value?
> --PA
>
>> So I don't have a valid HardwareID in the registry.
>> UpdateDriverForPlugAndPlayDevices fails to find any devices for that
>> hardware ID.
>>
>>
>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>> news:ugFIcm1mFHA.320@TK2MSFTNGP09.phx.gbl...
>>> After you find the device, call UpdateDriverForPlugAndPlayDevices on it.
>>> Follow the devcon sample in the DDK.
>>>
>>> --
>>> --
>>> -Eliyas
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> http://www.microsoft.com/whdc/driver/default.mspx
>>> http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
>>>
>>>
>>
>>
>
>



Re: Display "New hardware" wizard on an orphanded device programmatically by Tim

Tim
Wed Aug 10 13:07:59 CDT 2005

During the installtion process several registry keys are created and
populated. If the installation process is stopped before finishing, the
registry keys are not all there and setup correctly. The information
missing depends upon when the installation was stopped. In some cases there
is only a class guid key. In every case when the installation is stopped
prematurely, there is no driver specified.

"Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
news:O9bEzDGnFHA.3936@TK2MSFTNGP10.phx.gbl...
> "Tim" <tim@deltacompsys.com> wrote in message
> news:11ff0u8jqrkp487@corp.supernews.com...
>> Thanx! The problem is that the registry entry is not complete.
>
> What means - not complete? no Driver value?
> --PA
>
>> So I don't have a valid HardwareID in the registry.
>> UpdateDriverForPlugAndPlayDevices fails to find any devices for that
>> hardware ID.
>>
>>
>> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> wrote in message
>> news:ugFIcm1mFHA.320@TK2MSFTNGP09.phx.gbl...
>>> After you find the device, call UpdateDriverForPlugAndPlayDevices on it.
>>> Follow the devcon sample in the DDK.
>>>
>>> --
>>> --
>>> -Eliyas
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> http://www.microsoft.com/whdc/driver/default.mspx
>>> http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx
>>>
>>>
>>
>>
>
>