473,387 Members | 1,678 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,387 software developers and data experts.

Working with WIndows Registry

I am trying to write to the registry and the objects that are suppose to be
handling this function are not working. Here is what is happening.

I am issuing the following commands:
RegistryKey reg;
reg = Registry.CurrentUser.CreateSubKey("Software\\SofTe k
Software\\SSILicense\\Settings");

reg = Registry.CurrentUser.OpenSubKey("Software\\mykey\\ mysubkey\\Settings",
true);

reg.SetValue("DBPath", "c:\\temp");

when I execute these lines, the function does write to the registry,
however, it does not write to HKEY_Current_User. Its writing to HKEY_USER.
There are no entries at all in CurrentUser like the command suggests that
its writing to.

Can anyone help me with this as its been a real pain. I do this sort of
thing in Delphi everyday and have never had any problems. Can C# not work
with the registry? NOTE: I've also tried writing to other keys such as
HKEY_LOCAL_MACHINE but it doesn't write to the registry at all when I use
it.

Its not an authorization issue as I'm currently logged in as ADMINISTRATOR
while running these tests...

Thanks,

glenn

Jul 21 '05 #1
0 1259

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

Similar topics

0
by: glenn | last post by:
I am trying to write to the registry and the objects that are suppose to be handling this function are not working. Here is what is happening. I am issuing the following commands: RegistryKey...
0
by: glenn | last post by:
I am trying to write to the registry and the objects that are suppose to be handling this function are not working. Here is what is happening. I am issuing the following commands: RegistryKey...
4
by: JohnB111 | last post by:
Hi Environment: Windows XPPRO SP2 IIS 5.1 AVG Anti Virus (Not script Blocking) The following code used to work perfectly on my local development machine and still does on my web server.
1
by: chitra g | last post by:
Hi, I tried all the options below but did not work. Your suggestions please.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.