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

Re: Registry Cleanup by Peter

Peter
Tue Feb 15 15:39:29 CST 2005

why are you using the registry for this?

-p

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nille" <Nille@discussions.microsoft.com> wrote in message
news:1AB590CA-A21B-47CC-9CB9-CDA3E596BE6C@microsoft.com...
> 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



Re: Registry Cleanup by Nille

Nille
Tue Feb 15 16:01:02 CST 2005

I'm making a virtual serial port driver and e.g. HyperTerminal require
certain registry entries. This is where the problem arise: if the entries
remain in the registry, HyperTerminal will believe that the ports exist.
That's not good...

"Peter Wieland [MSFT]" wrote:

> why are you using the registry for this?
>
> -p
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Nille" <Nille@discussions.microsoft.com> wrote in message
> news:1AB590CA-A21B-47CC-9CB9-CDA3E596BE6C@microsoft.com...
> > 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
>
>
>

Re: Registry Cleanup by thatsalok

thatsalok
Wed Feb 16 03:12:12 CST 2005

add one more entry of time stamp in registry and check for entry for
timestamp every time window loaded/restarted

--

With Regards
Alok Gupta
Visit me at http://alok.bizhat.com

"I think this will Help"


"Nille" <Nille@discussions.microsoft.com> wrote in message
news:75655F26-A6FB-4004-A19E-EFCC878781A1@microsoft.com...
> I'm making a virtual serial port driver and e.g. HyperTerminal require
> certain registry entries. This is where the problem arise: if the entries
> remain in the registry, HyperTerminal will believe that the ports exist.
> That's not good...
>
> "Peter Wieland [MSFT]" wrote:
>
> > why are you using the registry for this?
> >
> > -p
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > "Nille" <Nille@discussions.microsoft.com> wrote in message
> > news:1AB590CA-A21B-47CC-9CB9-CDA3E596BE6C@microsoft.com...
> > > 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
> >
> >
> >