Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
good day experts, i just want to ask if it is possible to use the application name to save in registry after installation? i have a code which save some info in registry.
here is my code:
VB

appName = "HRMS" --default app name
SaveSetting(appName, "Database Name", "text", txtdbName.Text)
SaveSetting(appName, "Instance Name", "text", txtInstanceName.Text)
SaveSetting(appName, "Server Name", "text", txtServerName.Text)
SaveSetting(appName, "User ID", "text", txtUserId.Text)
SaveSetting(appName, "Password", "text", txtPassword.Text)
SaveSetting(appName, "IP Address", "text", txtIPAddress.Text)

Posted

1 solution

It is quite possible (you can easily find registry classes in .NET FCL), but contamination of the registry is quite a bad idea. You should better store the application information in the area on the disk specially dedicated for this purpose, per user account, of for all users. From .NET FCL, you should find appropriate "special folder". Please see my past answer:
which is better : use of registery in order to store setting or use of Settings class[^].

See also my answer to this question: How to find my programs directory[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900