Question Trying to delete null registry key

Nov 26, 2005
15,188
401
126
Been having issues with my Zx sound card so I installed an old Creative X-Fi Titanium. Upon the software install it crashed my rig and created a registry key I can't delete: even after trying to delete the software and device via device manager.

I came across a docs.microsoft page, https://docs.microsoft.com/en-us/sysinternals/downloads/regdelnull#using-regdelnull and agreed to the sysinternal software. I'm not sure if I'm understanding the directions correctly.

Open up cmd prompt
regdelnull (path of the registry key to delete) [-s]

and it keeps failing. Am I comprehending that right?

nother link: https://support.microsoft.com/en-us...ertain-registry-keys-error-while-deleting-key
 

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
Use -s instead of [-s] after the registry key path. If you are entering the exact key path, you probably don't need the -s.

Also, it looks like there is both a 32 bit version of the program and 64 bit version in the archive. If you are running a 64 bit OS you probably need to run regdelnull64 instead of regdelnull.

Finally, if it still won't run, you might need to run it from an elevated command prompt to give it administrative rights.
 
  • Like
Reactions: BTRY B 529th FA BN
Nov 26, 2005
15,188
401
126
I've tried the regdelnull64 variation with the key and the -s and I get in return "regdelnull64 is not recognized as an internal or external command, operable program or batch file"

Elevated rights, too.
 

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
Huh, it executes runs just fine on my system. What specific command line are you entering in the command prompt? Is it a 32 or 64 bit system?
 
Nov 26, 2005
15,188
401
126
Window 10, 64b Pro, latest update.

I open up cmd prompt:

C:\Windows\System32>regdelnull64 Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_etc.etc.etc. and that's pretty much it

EDIT: Do you have Ransomware protection enabled? Controlled folder access. I'm wondering if that might have stopped it and I didn't realize it
 
Last edited:

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
Yes, I'm running the premium version of Malwarebytes which includes active ransomware protection. You might want to disable whatever you are running, though, while you try to do this as a precaution.

Have you tried just running it as regdelnull64 HKLM -s in a command prompt window? On my system, this just searches through the entire HKLM registry branch looking for any registry keys with null characters and asks if you want to delete them one at a time. If it works, just make sure to answer "n" to any keys it finds other than the one you want to delete so you don't accidentally disable your system.
 
Nov 26, 2005
15,188
401
126
Yes, I'm running the premium version of Malwarebytes which includes active ransomware protection. You might want to disable whatever you are running, though, while you try to do this as a precaution.

Have you tried just running it as regdelnull64 HKLM -s in a command prompt window? On my system, this just searches through the entire HKLM registry branch looking for any registry keys with null characters and asks if you want to delete them one at a time. If it works, just make sure to answer "n" to any keys it finds other than the one you want to delete so you don't accidentally disable your system.

Tried that and I keep getting the same "regdelnull64 is not recognized as an internal or external command, operable program or batch file"
 

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
Tried that and I keep getting the same "regdelnull64 is not recognized as an internal or external command, operable program or batch file"

There has to be something wrong with the executable files then. Both of them work for me just fine on both Win7 Pro and Win10 Pro 1909. As a test, I also just downloaded them, unarchived them to the desktop of my laptop (also running Win10 Pro 64 v1909), opened a command window, navigated to the desktop, ran REGDELNULL64 -s. Worked without a problem.

Have you tried to re-download them again? Or, to download them on another system if you have access to them?

There is one thing - if you are not mispelling the command (I know, not likely) and since you had a system crash, what you are describing could be a symptom of a damaged file system. It might be worth running a CHKDSK /F test just to be sure. I had something like that happen once last year to my primary system after a crash and in the end had to do a repair install of Win7 to fix it when everything else failed.
 
Last edited:
  • Like
Reactions: BTRY B 529th FA BN
Nov 26, 2005
15,188
401
126
There has to be something wrong with the executable files then. Both of them work for me just fine on both Win7 Pro and Win10 Pro 1909. As a test, I also just downloaded them, unarchived them to the desktop of my laptop (also running Win10 Pro 64 v1909), opened a command window, navigated to the desktop, ran REGDELNULL64 -s. Worked without a problem.

Have you tried to re-download them again? Or, to download them on another system if you have access to them?

There is one thing - if you are not mispelling the command (I know, not likely) and since you had a system crash, what you are describing could be a symptom of a damaged file system. It might be worth running a CHKDSK /F test just to be sure. I had something like that happen once last year to my primary system after a crash and in the end had to do a repair install of Win7 to fix it when everything else failed.

I've basically just left them in the folder on desktop, but I never navigated to the desktop through cmd prompt.

Ok, I'll give that a try first.

Ok, so it accepted the command when I navigated to the folder with the executable in it and it liked HKLM -s. It ran for a second and the scan completed. Seemed kinda short. Didn't find anything. I tried both the 32 and 64 executable. It didn't like the full string to the registry key for the old sound card.

I ran the CHKDSK /F and it didn't find anything but it took like 2-3 seconds also.

It's odd that I cannot uninstall the device via device manager nor uninstall it and delete the drivers via device manager when it clearly crashes device manager when trying to do so.
 

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
It is weird that it is not finding the key. That search when run on mine actually finds one, but it is a Microsoft registry key associated with a Microsoft application and I'm not going to mess with it.

Your original command of REGDELNULL64 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_etc.etc.etc ought to work for the specific key if you leave out the "COMPUTER", enter the exact key path, and leave off the "-s".

If that doesn't work, you might have to resort to a Windows repair disc to do an offline registry edit to try and remove the key.

EDIT: I don't know if it would help, but you could try the free version of Resplendence Software's Registrar Registry Manager to see if it will allow you to directly edit the key. You can try to use it to edit the key properties for that particular key to see if you can change it to something else or delete it entirely.
 
Last edited:
  • Like
Reactions: BTRY B 529th FA BN
Nov 26, 2005
15,188
401
126
I think it would work if the ampersand "&" symbol wasn't in the string. For some reason it keeps stopping at that point saying it's not recognizable. I tried backing the string up to PCI and it just completed without doing anything. Maybe it's not a null entry?
 

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
That tool definitely finds null character entries, as it found one on my system, so you could be right since it didn't find anything on yours.

Maybe the registry itself has some sort of corruption issue. You can try a Windows Automatic Repair (which always seems to end up in a boot loop for me), or it might just be worth doing a repair install of Windows 10 within your existing Windows install given how much time you have spent trying to fix this. Of course, there is no guarantee it will fix this problem, though.
 
  • Like
Reactions: BTRY B 529th FA BN

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
Maybe the registry itself has some sort of corruption issue.
I thought that this might be the case, when I first read this thread. Use to happen all the time in Win9x when it crashed, but less likely under NT-based OSes with NTFS, with journalling for the registry files, etc.

There might be a command for "rebuilding" the registry, in NT, like there was for Win9x.
 
  • Like
Reactions: BTRY B 529th FA BN

Steltek

Diamond Member
Mar 29, 2001
3,309
1,046
136
I thought that this might be the case, when I first read this thread. Use to happen all the time in Win9x when it crashed, but less likely under NT-based OSes with NTFS, with journalling for the registry files, etc.

There might be a command for "rebuilding" the registry, in NT, like there was for Win9x.

I don't think there is a way to repair the registry in Windows, outside Windows Automatic Repair (which I don't think has ever worked once for me - it seems to be a very good tool if you are a fan of boot loops, though) or 3rd party tools. Win9x had SCANREG, but that didn't come forward to Win2000.
 
  • Like
Reactions: BTRY B 529th FA BN