Bill
Sun Oct 14 19:02:35 PDT 2007
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@community.nospam> wrote in message
news:uW0TQNGDIHA.5044@TK2MSFTNGP03.phx.gbl...
> 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@storagecraft.com> wrote in message
> news:e6RGtWFDIHA.1208@TK2MSFTNGP05.phx.gbl...
>> Maybe regedit blocks the attempts of other processes to delete its
>> current-under-cursor key?
>>
>> --
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> maxim@storagecraft.com
>>
http://www.storagecraft.com
>>
>> "Bill McKenzie" <bkmckenzie@sbcglobal.net> wrote in message
>> news:ehfQ5%23EDIHA.5044@TK2MSFTNGP03.phx.gbl...
>>> 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.
>>>
>>>
>>
>