Delete registry key

Hello all,

I am trying to delete a registry key that is under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\  using My.Computer.Registry.CurrentUser.DeleteSubKey(mykey) but it doesn't work.
Any ideas?
MissNicolaAsked:
Who is Participating?
 
MissNicolaConnect With a Mentor Author Commented:
I found the error. It was because I was using the "HKEY_CURRENT_USER\" in my path, and also because I was trying to delete subkeys instead of values.
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
CodeCruiserCommented:
What  version of windows?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
MissNicolaAuthor Commented:
Vista Ultimate
0
 
CodeCruiserCommented:
It could be a permission issue. Does it work if you run the app as admin?
0
 
MissNicolaAuthor Commented:
I think the problem is caused because I'm setting the wrong path because I get an error "No value exists with that name." The path is specified above and the entry exists.
Any ideas how to set the path correctly?
0
 
MissNicolaAuthor Commented:
Found the solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.