-
January 18th, 2012, 01:14 PM
#1
working with Windows Registry
hi
I am developing a program that needs auto start at windows startup. For that I need to add Registry entries. Also the program needs to read some registry keys. What are the functions i need to do these.. Simply I need to
check if the startup key already exists
add a new key if it doesn't exist
read a key values
Somebody please help me. I found a lot of functions in MSDN site. But I didn't find the required functions..
thanks
ashik thomas
-
January 18th, 2012, 01:34 PM
#2
Re: working with Windows Registry
Why would you do that?
http://www.sevenforums.com/tutorials...ms-change.html
Go to the part where it says "METHOD TWO". Just put the executable in the StartUp directory.
-
January 18th, 2012, 01:37 PM
#3
Re: working with Windows Registry
Here you go... http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Unless you have an aversion to using classes, I suggest you use the ATL CRegKey class (all you need to do to use it is include <atlbase.h>).
-
January 18th, 2012, 01:41 PM
#4
Re: working with Windows Registry
Originally Posted by YourSurrogateGod
Why would you do that?
Because using the Run or RunOnce key in the registry is a valid way to start an app. These keys provide other options that simply copying the app into the startup folder doesn't provide such as starting up the app when the machine starts, for all users or single user, or only start the app once (runonce).
-
January 18th, 2012, 02:32 PM
#5
Re: working with Windows Registry
Originally Posted by Arjay
Because using the Run or RunOnce key in the registry is a valid way to start an app. These keys provide other options that simply copying the app into the startup folder doesn't provide such as starting up the app when the machine starts, for all users or single user, or only start the app once (runonce).
That makes sense if you need the extra options. Based on the OP, the Startup directory would work just fine (no special parameters were mentioned as a pre-req).
-
January 18th, 2012, 03:39 PM
#6
Re: working with Windows Registry
Originally Posted by YourSurrogateGod
That makes sense if you need the extra options. Based on the OP, the Startup directory would work just fine (no special parameters were mentioned as a pre-req).
It depends by what the OP meant by "needs auto start on windows startup". Does that mean on machine startup or user logon?
-
January 18th, 2012, 03:46 PM
#7
Re: working with Windows Registry
Originally Posted by Arjay
It depends by what the OP meant by "needs auto start on windows startup". Does that mean on machine startup or user logon?
You just have to love interpreting other people's specifications and requirements
-
January 18th, 2012, 03:57 PM
#8
Re: working with Windows Registry
Originally Posted by YourSurrogateGod
You just have to love interpreting other people's specifications and requirements
Not really - what I'm saying is that I can't interpret what the OP means by what was written - it just isn't clear.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|