Hello,
I've been reading this newsgroup for some time and have found all of you
very helpful and knowledgable. So, first and foremost, thank you for all your
help you've provided and don't even realize it! Secondly, here's my
question...
I haven't seen this addressed so maybe it's common knowledge, and I'm just a
moron, but here goes:
How do I add a key to the registry during runtime?
Here's the scenario:
The opens the program, it checks for a value in the registry. If the value
is not there, it prompts the user to register. After the user registers, I
need the program to store the created value in the appropriate key. That way,
the next time the program is run, the user will not be prompted for
registration again.
The key to be created is called "Auth" and it is in the following directory:
HKEY_LOCAL_MACHINE\Software\AppName
I know that SaveSetting will create a value, but it won't create it in a
specified directory.
Thank You All So Much for any help you can provide, and I'm looking forward
to hearing from you. Thanks!
Jonathan 5 1024
Use the Registry Class under the Microsoft.Win32 namespace. Here are couple
of samples: http://www.freevbcode.com/ShowCode.asp?ID=4487 http://www.freevbcode.com/ShowCode.Asp?ID=174 http://www.codeproject.com/vb/net/registry_with_vb.asp
hope that helps..
Imran.
"MVaughn" <MV*****@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com... Hello,
I've been reading this newsgroup for some time and have found all of you very helpful and knowledgable. So, first and foremost, thank you for all your help you've provided and don't even realize it! Secondly, here's my question...
I haven't seen this addressed so maybe it's common knowledge, and I'm just a moron, but here goes:
How do I add a key to the registry during runtime?
Here's the scenario: The opens the program, it checks for a value in the registry. If the value is not there, it prompts the user to register. After the user registers, I need the program to store the created value in the appropriate key. That way, the next time the program is run, the user will not be prompted for registration again.
The key to be created is called "Auth" and it is in the following directory: HKEY_LOCAL_MACHINE\Software\AppName
I know that SaveSetting will create a value, but it won't create it in a specified directory.
Thank You All So Much for any help you can provide, and I'm looking forward to hearing from you. Thanks!
Jonathan
Imran...you are my HERO!!
I've been looking and looking, but in ignorance...didn't know where to look.
Thank you SO MUCH! It worked like a charm. I kept getting an error and
couldn't figure out why. Turns out, when I was opening my Subkey, I didn't
realize I had to set it to writeable by setting a value to True.
Thank you again! I've been pulling my hair out with this for three days!
Jonathan
"Imran Koradia" wrote: Use the Registry Class under the Microsoft.Win32 namespace. Here are couple of samples: http://www.freevbcode.com/ShowCode.asp?ID=4487 http://www.freevbcode.com/ShowCode.Asp?ID=174 http://www.codeproject.com/vb/net/registry_with_vb.asp
hope that helps.. Imran.
"MVaughn" <MV*****@discussions.microsoft.com> wrote in message news:69**********************************@microsof t.com... Hello,
I've been reading this newsgroup for some time and have found all of you very helpful and knowledgable. So, first and foremost, thank you for all your help you've provided and don't even realize it! Secondly, here's my question...
I haven't seen this addressed so maybe it's common knowledge, and I'm just a moron, but here goes:
How do I add a key to the registry during runtime?
Here's the scenario: The opens the program, it checks for a value in the registry. If the value is not there, it prompts the user to register. After the user registers, I need the program to store the created value in the appropriate key. That way, the next time the program is run, the user will not be prompted for registration again.
The key to be created is called "Auth" and it is in the following directory: HKEY_LOCAL_MACHINE\Software\AppName
I know that SaveSetting will create a value, but it won't create it in a specified directory.
Thank You All So Much for any help you can provide, and I'm looking forward to hearing from you. Thanks!
Jonathan
> Thank you again! I've been pulling my hair out with this for three days!
Glad that worked out for you :)
Try not to kill yourself next time!
"MVaughn" <MV*****@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com... Imran...you are my HERO!!
I've been looking and looking, but in ignorance...didn't know where to look. Thank you SO MUCH! It worked like a charm. I kept getting an error and couldn't figure out why. Turns out, when I was opening my Subkey, I didn't realize I had to set it to writeable by setting a value to True.
Thank you again! I've been pulling my hair out with this for three days!
Jonathan
"Imran Koradia" wrote:
Use the Registry Class under the Microsoft.Win32 namespace. Here are couple of samples: http://www.freevbcode.com/ShowCode.asp?ID=4487 http://www.freevbcode.com/ShowCode.Asp?ID=174 http://www.codeproject.com/vb/net/registry_with_vb.asp
hope that helps.. Imran.
"MVaughn" <MV*****@discussions.microsoft.com> wrote in message news:69**********************************@microsof t.com... > Hello, > > I've been reading this newsgroup for some time and have found all of > you > very helpful and knowledgable. So, first and foremost, thank you for > all > your > help you've provided and don't even realize it! Secondly, here's my > question... > > I haven't seen this addressed so maybe it's common knowledge, and I'm > just > a > moron, but here goes: > > How do I add a key to the registry during runtime? > > Here's the scenario: > The opens the program, it checks for a value in the registry. If the > value > is not there, it prompts the user to register. After the user > registers, I > need the program to store the created value in the appropriate key. > That > way, > the next time the program is run, the user will not be prompted for > registration again. > > The key to be created is called "Auth" and it is in the following > directory: > HKEY_LOCAL_MACHINE\Software\AppName > > I know that SaveSetting will create a value, but it won't create it in > a > specified directory. > > Thank You All So Much for any help you can provide, and I'm looking > forward > to hearing from you. Thanks! > > Jonathan
"Christopher Kurtis Koeber" wrote: Try not to kill yourself next time!
Lol...roger that! I was almost ready to kill something! (Namely the computer
by sailing it out the front door) Thanks Again everyone for all the help this
group has provided This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Omer Ahmad |
last post by:
Hi All,
I've been working with python for about 6 months now, and have been
very impressed with the size and scope of the libraries. I have,
however, run into a bit of a problem.
I...
|
by: vighnesh |
last post by:
Hi All
I have to develop an application, which has to scan the windows registry and
fix the bugs if any.
Please let me know whether it is possible to develop that application in
VB.NET/C#.NET?...
|
by: Al Kaufman |
last post by:
I have a simple console app that uses:
regSubKey = <some registry key>
Dim reg As RegistryKey = Registry.ClassesRoot.OpenSubKey(regSubKey)
Dim path As String
path = CStr(reg.GetValue(""))
|
by: Ravi |
last post by:
Hi,
Could any one please tell me if there's any way to set the value of a
particular registry key equal to that of another registry key that's already
present in the registry.
Thank you.
...
|
by: Mark Findlay |
last post by:
When programming reads of the Windows Registry, do the registry keys and
values need to be localized for international use?
For example, do I need to convert the key name...
|
by: bazzer |
last post by:
hey,
im trying to access a microsoft access database from an ASP.NET web
application in visual basic 2003.NET. i get the following error when i
try running it:
Server Error in...
|
by: Parv |
last post by:
I am working in a domain environment. I am on a client machine and
wants to edit registery of domain server. I am currently in a Domain
user account and member of Domain administrators on the...
|
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...
|
by: tmsprowl |
last post by:
Greetings!
I was wondering if someone could help me with a problem I'm having.
My department is just one of many within my organization. My
organization has control over the network domain,...
|
by: Newbie Coder |
last post by:
Hello Newsgroup Readers
I would like to know how to go & do the following:
I have a certain registry key that has sub values
Example:
Key1 http://www.microsoft.com
Key2 ...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
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
|
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...
|
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...
|
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,...
|
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...
| |