Sign in to follow this  
sathenzar

C++ OpenReGKey...

Recommended Posts

Hey, I want to be able to add my program into my registry. I can't remember how I did this it was somthing like OpenRegKey or somthing. Could someone please help me out and tell me what the function is to add a key into the registry? Thanks.

Share this post


Link to post
Share on other sites
1. This question has nothing to do with C++
2. You cannot put "a program" in the registry
3. Goto msdn.microsoft.com and search for RegOpenKey.

Share this post


Link to post
Share on other sites
1. Yes it does have to do with C++, as that's the language I'm programming it in, 2. I ment put it's path in the registry in the "RunOnce" folder. 3, already did it sadi no results found.

Share this post


Link to post
Share on other sites
Don't know if this is what you are looking for but try looking up RegistryDataExchange.

You may also want RegOpenKeyEx, that is probally what you are looking for, look it up in MSDN. Or just look under

MSDN Home > MSDN Library > Win32 and COM Development > System Services > Windows System Information > Windows System Information > Registry > Registry Reference > Registry Functions

Hope that helps.

Share this post


Link to post
Share on other sites
I know but it confuses me to no end. Can someone please write me a small example code (deosn't have to be great) to help me out? I'm stuck. I want to use RegCreateValueEx and RegSetValuesEx to put a reg string into the registry into the folder RunOnce, then have the setvalue function set the string value to text.txt if possible, thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this