Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Code to add registry key value in vb.net

Posted on 2010-09-17
4
Medium Priority
?
764 Views
Last Modified: 2012-05-10
1)Application checks if registry key exists – “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<Interface GUID>\tcpAckFrequency”  the interface GUID is known by there being a key for DHCPipAddress key with a value other than nothing (doesn’t exist) or 0.0.0.0.
2)If not add a Dword(32bit) key called TcpAckFrequency as a hex value "1"


PLease see the above requirement and provide the sample code if you have.

Thanks in davance
0
Comment
Question by:futurebuilders
[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
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
senthil_sivanath earned 1000 total points
ID: 33704783
You have to 3 operations
1. Reading registry
2. Changing value of key
3. Adding a new registry

sample code for all the three operations can be found from the following link

http://knol.google.com/k/omar-abid/how-to-use-registry-keys-with-vb-net/3s798vka23618/8#
0
 

Author Comment

by:futurebuilders
ID: 33707135
Below code is giving error as "Requested registry access is not allowed."


reg = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{03CBA9E5-BAC9-48B4-834B-3BBA552236E7}", True)
            Dim strKey As String
            strKey = reg.GetValue("AddressType")


Please provide the solution

Thanks
0
 
LVL 12

Assisted Solution

by:Mohamed Abowarda
Mohamed Abowarda earned 1000 total points
ID: 33707219
0
 

Author Comment

by:futurebuilders
ID: 33719985
Got Solution
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

730 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