Re: After enabling driver, restart system



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



.



Relevant Pages

  • Re: word 2007 app crash
    ... they won't be updating the driver. ... recover your infomration and restart." ... 12 crash is listed for the word must close event. ... Fault Module Version: 61.63.249.0 ...
    (microsoft.public.word.application.errors)
  • Re: word 2007 app crash
    ... they won't be updating the driver. ... 12 crash is listed for the word must close event. ... solution and restart program", the command is accepted and crash ... Fault Module Version: 61.63.249.0 ...
    (microsoft.public.word.application.errors)
  • Re: After enabling driver, restart system
    ... stop the app and then disable the device, ... I don't get why it would help if you reinstall the driver. ... The reason why i need to restart system after enabling the driver is ... > Device Installation Overview ...
    (microsoft.public.development.device.drivers)
  • RE: Blank screen on login
    ... I have a Dell Inspiron 9100 with Windows XP Home SP2. ... driver for some reason, especially after a long time being shut down. ... Dell's original solution to this problem was to restart in Safe mode (they ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: word 2007 app crash
    ... So the solution presented of not setting the HP printer as the default but to use another driver - only selecting the HP when you need to print to it is the work around. ... > recover your infomration and restart." ... > 12 crash is listed for the word must close event. ... > Fault Module Version: 61.63.249.0 ...
    (microsoft.public.word.application.errors)