Hi!
I'm currently writing a dynamic device driver for Win9x/ME that utilizes the
windows registry to become accessible to some win32 applications. The problem
is that if you restart the computer without exiting windows (e.g. by reseting
the computer) the driver doesn't get a chanse to clean up in the registry.
The information will thus remain in the registry in the next windows session,
and win32 applications will believe there's resources available that aren't
actually available, since the driver isn't even loaded.
So; how can I get rid of registry keys I've added from the driver even if
the computer is reseted? My best idea so far is to add a runonce-value that
is removed when the driver is unloaded, but remains if windows isn't
terminated properly. But I don't want to distribute a win32 program whose
only purpose is to clean the registry. Is there any other way to accomplish
it? Is it, for instance, possible to do something like this (conceptual
example only):
HKLM
|- Software
|--- Microsoft
|----- Windows
|------- CurrentVersion
|--------- RunOnce
|----------- CleanUpResource1 = "regedit -remove HKLM/Hardware/bla/bla"
i.e. utilize an existing application to do the cleanup.
The driver is designed for Windows 95/98/ME.
Please help!
Nille