S
H
A
R
E

Thursday, March 31, 2011

VB .net Save Program Setting in Registry

Set or Add value to registry:
        Application.UserAppDataRegistry.SetValue("key", "value")


Get or Load value from registry:
        Application.UserAppDataRegistry.GetValue("key")

value will saved into registry, and the location is "HKEY_CURRENT_USER\Software\" and path is "Developer\application name\version".
 This a sample:

HKEY_CURRENT_USER\Software\MyCompany\My VB.net program\1.0.0.0

2 comments:

Anonymous said...

This I need

Mark said...

Works well. Good stuff. Thanks

Post a Comment