[RESOLVED] What is the best way to persist application license information?
For a VB.Net Windows Forms application, targeting Framework 4.8, I need to persist license data that must be effective application-wide, and remain so permanently (unless and until it is modified by the application itself). In other words, the data must be consistent regardless of which user is running the application, and it must survive the application being uninstalled and then re-installed.
Due to both the application's architecture and its likely usage patterns, it's important that the license data NOT be stored in the application's database. What I'm unsure about is:
1. My guess is that the Windows registry would be the storage location of choice, but I'm open to other suggestions.
2. If the data is stored in the registry, I would need to avoid those branches that apply to specific users, but I'm not sure which branch or other location would be best for application-wide data.
3. Are Interaction.SaveSetting() and Interaction.GetSetting() the preferred methods for writing and reading registry data, or would some other choice be better?
Re: What is the best way to persist application license information?
1. There might be better methods
2. Try HKey LocalMachine
3. ?
Re: What is the best way to persist application license information?
Quote:
Originally Posted by
silverblatt
3. Are Interaction.SaveSetting() and Interaction.GetSetting() the preferred methods for writing and reading registry data, or would some other choice be better?
Those are holdovers from VB6. .NET has dedicated types for working with the Registry. You can find examples with a web search.
Re: What is the best way to persist application license information?
I think registry HKEY_LOCAL_MACHINE\Software\Your_App_name would work well. But it needs admin rights to write data to that location.
Re: What is the best way to persist application license information?
Rather than messing with the Registry, I ended up storing the date in hidden, read-only, system files in C:\ProgramData\[application_name], and that's working well.
Re: [RESOLVED] What is the best way to persist application license information?
There are no such things in practice as either hidden or read-only files. Hidden files are very easily found and the read-only attribute can just as easily be removed.
Re: [RESOLVED] What is the best way to persist application license information?
A password protected database would be more secureā¦