Solved

Code to add registry key value in vb.net

Posted on 2010-09-17
4
754 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
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
senthil_sivanath earned 250 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 250 total points
ID: 33707219
0
 

Author Comment

by:futurebuilders
ID: 33719985
Got Solution
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

20 Experts available now in Live!

Get 1:1 Help Now