Sign up to the jQuery Grid Subscription list.

Add registry key and delete it with

Original post by Natural_Orange at

The question:

My program has an option for running at startup.
I need a way to add a registry key to:
And Remove it as well.

I've looked in to some other stuff but it seems way to complicated for what i need.

The accepted answer by Moayad Mardini:

To add a value to that key :

My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", YourProgramName, YourProgramPath, Microsoft.Win32.RegistryValueKind.String)

Then to delete it :

My.Computer.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue(YourProgramName)

Hope this helps


Related Ads