uninstalling the device currently holding the page file

My Xen drivers disable the emulated pci disk and network drivers. I want
to be able to give the user the option of uninstall my drivers, but they
won’t uninstall as Windows (rightly, as far as it is concerned) think
that they are critical to the system.

If I right click on the driver and select ‘uninstall’, it appears to
uninstall but says a reboot must be done to complete the uninstall, but
when the system is rebooted the drivers are still there. I assume that
this behaviour is to save the user from rendering the system unbootable.

So what are my options?

Worst case, I could do the following:
. First phase of uninstall - disable the drivers in the registry and
then reboot (prompt the user before the disable though)
. Second phase of uninstall - actually do the uninstall as my xen
drivers will no longer be controlling the boot devices.

I’m not sure how I could accomplish this under WiX though, so something
a bit more straightforward would be nice.

Thanks

James

When you say your driver is still there do you mean that it still gets
loaded or that it is also re-installed as the driver for the boot
device?

Perhaps it would be better to have different pnp enumeration ids for
emulated v pv devices so that switching is simply a matter of having
the backend change what it presents to the guest?

Mark Roddy

On Sun, Mar 1, 2009 at 1:01 AM, James Harper
wrote:
> My Xen drivers disable the emulated pci disk and network drivers. I want
> to be able to give the user the option of uninstall my drivers, but they
> won’t uninstall as Windows (rightly, as far as it is concerned) think
> that they are critical to the system.
>
> If I right click on the driver and select ‘uninstall’, it appears to
> uninstall but says a reboot must be done to complete the uninstall, but
> when the system is rebooted the drivers are still there. I assume that
> this behaviour is to save the user from rendering the system unbootable.
>
> So what are my options?
>
> Worst case, I could do the following:
> . First phase of uninstall - disable the drivers in the registry and
> then reboot (prompt the user before the disable though)
> . Second phase of uninstall - actually do the uninstall as my xen
> drivers will no longer be controlling the boot devices.
>
> I’m not sure how I could accomplish this under WiX though, so something
> a bit more straightforward would be nice.
>
> Thanks
>
> James
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

>

When you say your driver is still there do you mean that it still gets
loaded or that it is also re-installed as the driver for the boot
device?

It is still there, and windows wants to install a driver for it (I get
the ‘found new hardware’ prompt).

Perhaps it would be better to have different pnp enumeration ids for
emulated v pv devices so that switching is simply a matter of having
the backend change what it presents to the guest?

There are indeed different. The emulated PCI device is a PCI id, while
mine is something like ‘xen/vbd’ or ‘xen/vif’.

I’m pretty sure now that I just can’t force windows to uninstall a
driver if windows thinks it is a critical driver. I will have to
investigate how I can get WiX to do a two stage uninstall, which I guess
would go something like:

  1. Write something into the registry to disable the drivers, whether
    that is just changing the start type to disabled or create a driver
    defined parameter
  2. Schedule a ‘runonce’ and reboot, the qemu emulated PCI drivers will
    take responsibility for booting the system.
  3. The runonce will kick off the rest of the uninstall

Anyone know how to do this with WiX?

Thanks

James

You can uninstall the drivers, but windows retains the association… Since the PCI card is present when the system boots up, it looks for a driver for it. This is something that bothers me about Xen, there’s no way to define the hardware configuration before powerup as for whether not there’s a PCI card present and further in what way the hard drives are attached to the system.