954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to create a registry?

Hi hope i am writing in right section of the forum trying to create a registry for my C program which has an .exe . want to work on windows start. The program is a kind of firewall program closes ports and opens them only if they are opened from inside. And I want this to work for windows xp so thats why i am writing here any help would be welcomed.

johnroach1985
Junior Poster
138 posts since Apr 2004
Reputation Points: 11
Solved Threads: 0
 

you will probably get better response on the C/C++ board.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 
Hi hope i am writing in right section of the forum trying to create a registry (key?) for my C program which has an .exe . want to work (launch?) on windows start. The program is a kind of firewall program closes ports and opens them only if they are opened from inside. And I want this to work for windows xp so thats why i am writing here any help would be welcomed.

If my assumptions are true, you will need to place your entry in:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

If you want it work only for you,

Or

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

If you want it works for everyone.

The Registry reference is here .

If the amount of info overwhelms you, please take into account you will only need three functions for your required task:

RegCreateKeyEx()
RegSetValueEx()
RegCloseKey()

Hope this helps.

Alvein
Junior Poster
104 posts since Jul 2005
Reputation Points: 12
Solved Threads: 4
 

Moved to C++

Zachery
The Geek Father
Team Colleague
894 posts since Nov 2003
Reputation Points: 96
Solved Threads: 21
 

First of all I am sorry for posting at wrong place taught it was mostly about windows.And thanks to all i think i got it.

johnroach1985
Junior Poster
138 posts since Apr 2004
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You