|
-
Apr 1st, 2023, 02:47 AM
#1
Thread Starter
Lively Member
[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?
-
Apr 2nd, 2023, 04:44 PM
#2
Re: What is the best way to persist application license information?
1. There might be better methods
2. Try HKey LocalMachine
3. ?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Apr 2nd, 2023, 10:00 PM
#3
Re: What is the best way to persist application license information?
 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.
-
Apr 10th, 2023, 10:11 PM
#4
New Member
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.
-
Apr 15th, 2023, 06:11 PM
#5
Thread Starter
Lively Member
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.
-
Apr 16th, 2023, 04:14 AM
#6
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.
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
Apr 16th, 2023, 07:03 PM
#7
Re: [RESOLVED] What is the best way to persist application license information?
A password protected database would be more secure…
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|