Hello, I have been wondering how to keep a value even after a program ends. An example could be a countdown of days on a trial of a product. It must be able to not be changed by the user. How would I do this?
TheBeast32
54
Posting Whiz in Training
Recommended Answers
Jump to PostSeveral ways
- save values to a file on program exit and read on program start
- save values in the registry
- save values in the program *.exe file
All you really need to do is save the installation date in a hidden file somewhere then read it each …
Jump to Post>save values to a file on program exit and read on program start
Coupled with encryption and a good tampering check, I'd prefer this one.>save values in the registry
Which adds a whole new layer of complexity to your application. Best to avoid the registry.>save values …
All 7 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
TheBeast32
54
Posting Whiz in Training
Narue
5,707
Bad Cop
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
TheBeast32
54
Posting Whiz in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
TheBeast32
54
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.