Page 1 of 1

Assign a value to a variable permanently during initial run

PostPosted: April 6th, 2009, 8:24 am
by sekar1
Hi,

I am developing an application for file processing using delphi. Is it possible to assign a value for a variable permanently after closing the application also?

Here is the description of the problem.

When the Delphi exe runs first time in any (New) machine, it needs user to input some variables and store it inside the application. When the users close and reopen the application, the already input variables should remain the same (with already input value) and user need not input the value to the variable once again.
If any possibilities are there, please let me know.
At present I am providing input values each time I run the exe (used the input box in the form create event). I want to avoid that.

Thanks,
Sekar

Re: Assign a value to a variable permanently during initial run

PostPosted: April 6th, 2009, 11:07 am
by Kambiz
Use the Windows Registry for saving/retrieving your values.

See TRegistry class for more information.

Re: Assign a value to a variable permanently during initial run

PostPosted: April 7th, 2009, 6:46 pm
by geowink
I would use an INI file. You can find how to use that in Help or ask here if you have problems.

George