Re: delreg section in INF not truly deleting registry entry



It seems the service had some type of hold on the key. I originally assumed
this could not be the case as the delreg directive is called out in and
uninstall section which also uninstalls the service. Then when I saw the
key removed from regedit it seemed to confirm that the service was not
holding the key. This was wrong. If I set the flag to stop the service in
the delservice section I can remove the key. I can't do this in practice
with this particular service though. Anyway, now that I know what is going
on I have a way around it. This is still weird though...don't know why
opening and viewing the key with regedit changed the behavior....that
doesn't really make sense to me still.

Bill M.

"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message
news:uW0TQNGDIHA.5044@xxxxxxxxxxxxxxxxxxxxxxx
Intuitively I would have felt the same way, i.e. if some process has a
registry key open then the key might not be deleteable, even though
there's no intentional locking built into the registry.

However, if you reread the original posting, you'll see that the actual
problem is exactly the opposite. Any ideas of how that came about?


"Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote in message
news:e6RGtWFDIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
Maybe regedit blocks the attempts of other processes to delete its
current-under-cursor key?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

"Bill McKenzie" <bkmckenzie@xxxxxxxxxxxxx> wrote in message
news:ehfQ5%23EDIHA.5044@xxxxxxxxxxxxxxxxxxxxxxx
I have a heisenbug I could use help on.

I have service that creates several registry keys. The service has an
associated INF file which has a DefaultUninstall section which is called
by
our product's installer when removing the service. The DefaultUninstall
section calls out a delreg section which deletes about 20 keys from the
registry. All but one of these keys gets deleted correctly.

Now for the heisenberg portion of the bug. The installer prompts the
user
for a reboot at then end of the removal process. If I pull up regedit
before saying yes to the reboot, the key in question is indeed not in
the
registry any longer and is not when the system comes back from reboot.
If I
do not pull up regedit and just reboot, the key is still present when
the
system comes back from reboot. Obviously, regedit is causing the change
to
be permanent in some way.

Is there some lazy write problem here? Is there a way from the INF I
can
flush or commit the reg changes?

Thanks.

Bill M.






.



Relevant Pages

  • Re: Error Message re Administrator
    ... > the Registry and I can now open Tools/Internet Options. ... If so, uncheck it. ... In Regedit, navigate to this key: ... Exit regedit and reboot. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Stopping software from starting when Windows starts?
    ... the registry is loaded off the hard drive early on... ... change to msconfig and then reboot. ... >> install inadverdently selecte option to load ... If you don't know how regedit works don't do this. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: UAC sucks. Ask us once, then dont ask again
    ... regedit, he mentioned "any change to the registry". ... statement - that you get the UAC prompt for "any change to the ... and be prompted for a reboot. ...
    (microsoft.public.windows.vista.general)
  • Re: delreg section in INF not truly deleting registry entry
    ... Maybe regedit blocks the attempts of other processes to delete its ... I have service that creates several registry keys. ... for a reboot at then end of the removal process. ... flush or commit the reg changes? ...
    (microsoft.public.development.device.drivers)
  • Re: Run, cmd not working
    ... what other trojans may be affecting my regedit / cmd prompts? ... the removal by editing the registry using ERD5.0 ... I get a command prompt window if I run "command"  (that is something new to ... What do you see when you run CMD? ...
    (microsoft.public.windowsxp.help_and_support)