473,405 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Registry modification

regKey = regKey.OpenSubKey("....");
regKey.SetValue("...", "value");

this code doesn't work

registry modification not allow in .Net??

how should i do?

Nov 17 '05 #1
1 1565
BigAbility <km*****@msn.com> wrote:
regKey = regKey.OpenSubKey("....");
regKey.SetValue("...", "value");

this code doesn't work

registry modification not allow in .Net??

how should i do?


Firstly, when asking a question it's helpful to give as much
information as possible: a short but complete program is always useful
(see http://www.pobox.com/~skeet/csharp/complete.html for what I meanby
that) but even if you just provide a couple of lines of code, "this
code doesn't work" is far from helpful. Obviously you have more
information about in what way it doesn't work - why not tell us?

As it happens, in this case you only need to read the docs to find out
why it's not working. You're calling RegistryKey.OpenSubKey(string),
the docs for which say:

<quote>
Retrieves a subkey as read-only.
</quote>

If you want a writable key, use RegistryKey.OpenSubkey (name, true)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matt Brandes | last post by:
I am looking for a solution that would allow me to recursively backup a given registry key that I could then use to import into another machine. The problem that I keep having is the inability to...
2
by: russ | last post by:
I'm a very noobie to VB.NET, just went through the Microsoft Intro class. I'm trying to write a simple app that connects to a remote PC and makes a modification to...
6
by: JOSII | last post by:
Getting a string of boolean value into and out of the registry is no problem. Here's the problem: Although you can place an object into the registry and retreive it, I need to place an ArrayList...
13
by: ts-dev | last post by:
Is it possible to prevent modification of a python file once its been deployed? File permissions of the OS could be used..but that doesn't seem very secure. The root of my question is verifying...
0
by: Bernie Hunt | last post by:
Is there a way to modify a registry key in HKey Local Machine? I have a number of programs that store data in the registry, but always in HKey Current User. Anyone know how to read and write...
2
by: Unpopular | last post by:
void directory::modification()//??????????? { clrscr(); cout<< "\n\t @@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@ @ @ @@@@@@ "; cout<< "\n\t=====@ @ @ @ @ @ @@...
7
by: RoryClapham | last post by:
Is there anyway to restrict registry value modification to only allow a certain program to update it? Cheers, Rory
6
by: sd | last post by:
hello I need to keep my app entry under HKEY_LOCAL_MACHINE\Software\MyApp. (to support for all users).I need to update one key under MYApp. When I attempt to set value for this key...
0
by: Steve House | last post by:
I'm relatively new to VB 2005/2008 having done most of my work in VB6 and VBA. I'd like to deploy a VB 2008 project that doesn't need to be installed other than the controls in the GAC and the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.