Solved

Delete registry key

Posted on 2012-03-16
7
310 Views
Last Modified: 2012-03-22
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?
0
Comment
Question by:MissNicola
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 37731040
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37731292
What  version of windows?
0
 

Author Comment

by:MissNicola
ID: 37731494
Vista Ultimate
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37731503
It could be a permission issue. Does it work if you run the app as admin?
0
 

Author Comment

by:MissNicola
ID: 37731531
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
 

Accepted Solution

by:
MissNicola earned 0 total points
ID: 37732640
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
 

Author Closing Comment

by:MissNicola
ID: 37751422
Found the solution
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question