Solved

Registry access denied (VB.net)

Posted on 2012-04-09
2
397 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

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