Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm creating a .reg file that will delete certain subkeys. So, just for an example, say I want to delete the 'Count' subkey, which is located here:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist

There are two subkeys in the user assist folder that look like this:

{5E39430943 etc}

Inside that, lies the 'Count' subkey. So the structure is like this:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist
 {5E39430943 etc}
  Count

I'm not 100% sure, but I think the second key MIGHT be a variable, that is, different on each computer.

So how would my registry file look if I wanted to delete that subkey but there was a variable parent key above?

Thanks in advance.

share|improve this question
    
Follow the instructions in this KB from Microsoft support.microsoft.com/kb/310516 –  NoLifeKing Aug 5 '13 at 8:38

1 Answer 1

I found that it's not a variable and that if you simply type in the key you want to create in the .reg file e.g

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist

Enclosing it in [] so it looks like this:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist]

It will create the key.

To delete the key, there should be a minus before the key, like this:

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist]

Hope this helps someone else.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.