Solved

Registry access denied (VB.net)

Posted on 2012-04-09
2
393 Views
Last Modified: 2012-04-10
Hi ,

I have an application that write on registry.

Until Yesterday all right, today I format my PC and I install Visual Basic 2010 (express) In the past I have used only Visual Basic 2010 ultimate.

After installed windwos 7 and Visual studio I open my application and seem work but for some reasons don't write in to registry.

Here the unmodified code that until yesterday work, but after format and reintall all don't work.

//

   Dim RegistryKey As Microsoft.Win32.RegistryKey

        RegistryKey = GetRegistryKey(KeyRoot)

        Return ModSupBase.ToStr(RegistryKey.OpenSubKey(Key, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree, Security.AccessControl.RegistryRights.FullControl).GetValue(Value))
//

There is possible that with 'Express' edition is not possible write in to registry ??

How can I solve ?
0
Comment
Question by:luca345
2 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 37826336
I think you can write registry with express version.
It may be permission related issue:
- Before formattting. Did you use the same version of Windows 7 (enterprise, home, etc) as you currently installed?
- Are you running the program as administrator user?
- Can you provide full exception details? (message and stack trace)
0
 

Author Closing Comment

by:luca345
ID: 37826473
Yes , I have already solved.

My vb after install don't rus as administrator.

Now I have changed the shortcut with run 'with administrator'

Thank you anyway !
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 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