Re: After enabling driver, restart system
- From: "Stephan Wolf [MVP]" <stewo68@xxxxxxxxxxx>
- Date: 1 Sep 2006 07:08:38 -0700
Some comments here:
First of all, an application that reads the device status only once
during/after system startup is for sure from the stone age and not Plug
and Play aware. So my first and recommended advice is to fix the app,
not the world around it.
Second, I don't get why it would help if you reinstall the driver.
(Although it could be done.)
Stephan
---
Kiddo wrote:
Hi Stephan and Doron,
Thank you very much for your valuable help. I'm very new in the area of
driver development and i'm trying to learn as much as i can during my free
time.
The reason why i need to restart system after enabling the driver is because
i have this application that will detect whether the driver is enable or
disable only after a restart. So it just happen that after i enable the
driver, i cannot get the application to run because it detected the driver as
its previous stage (which is disable). Hence, i need to do a restart after i
enable the driver in order to run that application.
1) I have try writing an API to use UpdateDriverForPlugAndPlayDevices() to
re-install the driver but i'm not sure where to locate the HardwareId of the
devices. Can i get this ID from Device Manager -> Properties -> Hareware ID?
2) I have checkup on some Driver INF Files information from Microsoft.com
and it mention a Reboot= or Restart= directive. Can this help me to solve my
problem?
Regards,
Kiddo
"Stephan Wolf [MVP]" wrote:
Doron Holan [MS] wrote:
windows requests a restart on disable because your driver does not stop
properly. this is really what you want? why? it is a horrible experience.
and then to require a restart on enable is even worse from a user experience
perspective. you might be able to require a restart by writing a device
coinstaller and setting the appropriate flag (sorry don't know what that is
offhand).
The flag is DI_NEEDREBOOT. See also
http://msdn.microsoft.com/library/
> Win32 and COM Development
> Windows Driver Kit
> Device Installation
> Design Guide
> Device Installation Overview
> Device Installations Requiring a Reboot
However, as Doron said, the above page reads "This should not be done
unless absolutely necessary".
Stephan
.
- Follow-Ups:
- Re: After enabling driver, restart system
- From: Doron Holan [MS]
- Re: After enabling driver, restart system
- Prev by Date: Re: Strange issue with NDISPROT xmit and the network performance counter
- Next by Date: Re: NDIS Intermediate (passthru) communicates with second driver
- Previous by thread: Re: Valider un driver pour une carte PCI
- Next by thread: Re: After enabling driver, restart system
- Index(es):
Relevant Pages
|