Solved

Registry access denied (VB.net)

Posted on 2012-04-09
2
389 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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now