Tip

RegDelNull deletes undeletable Windows Registry keys

Windows administrators rely on the simplest and most common tools to get a job done for one simple reason -- because they work. For instance, REGEDIT isn't a sophisticated program, but if all you need to do is make one quick change to the Windows Registry, it will do the job just fine.

However, there are times when, because of a problem with the key you're working with, REGEDIT won't let you make that one quick change. One instance of this is when you try to delete a Registry key that has an embedded null character in its name.

(An embedded null is a character with a binary value of zero -- not something you can type from the keyboard most of the time, but you can certainly create it programmatically.) An embedded null can wreak havoc with Registry editors, since most of them are not programmed to recognize nulls in key names.

Some "undeletable" Registry entries are merely entries that have null characters. (The inability to delete them conventionally seems to be a quirk of the Win32 API, the programming interface used by most Windows applications. After all, the Native API used by the Windows kernel internally does recognize null characters in Registry entries.)

If you're facing this problem, take a look at

Requires Free Membership to View

RegDelNull,a utility written by Mark Russinovich of Sysinternals, a Web site for freeware, utilities, technical information and source code related to Windows NT/2000/XP/2003. This command-line utility lets you delete Registry entries with embedded nulls.

To use it, pass a Registry path as a command parameter (such as HKLM for HKEY_LOCAL_MACHINE), then provide an –s switch to tell the program to recursively search all Registry entries beneath it. As it finds each Registry entry with an embedded null character, it will prompt you to delete it. Each time the program finds a matching Registry entry, it prints the name with an asterisk (*) to denote where the null character is.

 


Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!

 


More information from SearchComputing.com


This was first published in January 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.