Re: Perflib bug!
- From: "KM" <konstmor@xxxxxxxxxxxxxxxx>
- Date: Fri, 27 Oct 2006 09:56:53 -0700
Use ProcessExplorer tool from www.sysinternals.com.
It will show you all the objects used by a process including reg.keys.
Simple idea for you (I've done that long time ago so it definitely works).
You can still delete the key offline, meaning from another OS load.
Since the system is already deployed to the field you can automate the process:
(below I'll refer to the image you already have on the devices as "big image").
- Create a really small XPe image that would be able to use reg.exe (or regedit.exe) from CMD.
Set the image up so that it uses something like \Windows2 dir for the system folder (so that it doesn't interfere with
your main big image if laid out on the same drive).
- Set up the shell of the small XPe image so that it runs a few commands to load the big image's system reg hive and delete
the specified key (reg.exe supports all the commands you need).
- Deploy this image to the field via your current update transport (DUA? something else?).
- Update boot.ini on the disk (just replace it with a new downloaded boot.ini) so that it defaults to load that small XPe
image.
- Reboot the device.
- Small XPe image should be launched here and run in automated mode (e.g., CMD shell may call to a batch file) the
predefined set of commands to update the big image's hives. Then it should update boot.ini to use the big image's \WINDOWS in a
default ArcPath, and finally reboot.
Theoretically you don't even have to clean up the system and delete the small image afterwards. But if you want to it is also easy
to automate. You just have to add a self-deleting batch file call to the StartUp items of the big image. The batch file should
remove all the temporary files and folders.
License-wise you can use the same PID for the small XPe image because:
- the image is only used in the update, system recovery or repair process.
- the image existence is only temporary during the update.
Does this make sense?
--
=========
Regards,
KM
Yes, this key is definetly locked by another system component. So, it does
not matter which user that is trying to delete this key. Anyone who has an
idea how to get a list of registry handles used by a process? :-\
Would it work to load a driver just after the software hive has been loaded
and then delete this key? Is there anyone that has other ideas before I spend
more valuable time on this?
Thanks
"KM" wrote:
Per,
Unless the key is locked by another component (maybe the case if performance counters are on) you can log in as Local System
account
and run regedit there either in automatic mode or manually with GUI to delete the key (use "at /interactive" command).
--
=========
Regards,
KM
Hi Andy,
Thanks but this does not help since we need to supply a patch to fix this
issue for products that has already been shipped to customers.
Is there ANY way to delete this key programmatically? Which application is
using this key and therefore preventing it to be deleted while the system is
running?
"Andy Allred [MS]" wrote:
To delete it post FBA, you may need to boot to an offline OS, like WinPE
or something else, then load the hive offline to edit it. Please let us
know if this helps or not.
----
Andy
Check out the Embedded team blog: http://blogs.msdn.com/embedded/
This posting is provided "AS IS" with no warranties, and confers no rights.
Per Dunberg wrote:
How can I fix the .NET Framework performance counter problems on already
deployed systems?
More information,
http://blogs.msdn.com/astebner/archive/2004/08/13/214220.aspx
It is NOT possible to delete the registry key
(HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib\009\) while the
system is running. It fails with an error message "Cannot delete 009: Error
while deleting key."
.
- Follow-Ups:
- Re: Perflib bug!
- From: Per Dunberg
- Re: Perflib bug!
- References:
- Re: Perflib bug!
- From: Andy Allred [MS]
- Re: Perflib bug!
- From: KM
- Re: Perflib bug!
- Prev by Date: how to overwrite the registry value in administrator/user account
- Next by Date: Re: the command (netsh interface ip set address "local area connection" static ) gives syntax error
- Previous by thread: Re: Perflib bug!
- Next by thread: Re: Perflib bug!
- Index(es):
Relevant Pages
|