Windows Registry is a kind of database of windows where all the operating system related information is available. All the user preferences, configuration, software, device driver and hardware related information can be found here. You can access Windows Registry using by typing regedit.exe in Run dialog box (Windows + R).

In this post we will discuss one of the use of Windows Registry.

 

How you can register your program in Windows Registry to start it automatically?

 

Windows loads programs to start in the following order

1) Program listed in the Local Machine hive

2) Current User hive

3) Win.ini Run= and Load = lines

4) Start Up folder.

 

To add or remove programs in the Registry

1 ) Open Windows Registry.

2) Go to any of following  

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run

OR

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \ Services

OR

HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run

OR

HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \ Services

3) Add a new String Value and name it anything you like.

4) For the value data, enter the path and executable for the program you want to run.

5) By adding the value to the HKEY_CURRENT_USER hive instead allows the program to start only when that user is logged on.

6) If you add the value to the RunOnce key the program will run once and be removed from the key by Windows. 

7) Done