PDA

View Full Version : Edit INI file with a Runtime variable



NewsArchive
01-05-2012, 02:41 AM
Hello Friedrich and all others,

I am following the rules and define the default directories for the binary
executables and the data files accordingly to Vista / Win7.

its C:\Program Files\MyStuff and

CSIDL_Common_Documents\MyStuff

Because the program does not necessarily run on Vista / W7 / W8K, the
admins often want to store it somewhere else. So I added 2 Define Wizard
Dialogs for %_SB_INSTALLDIR% and %MyDataFolder%.

At the end of the install process I write this %MyDataFolder% into the
appropriate INI. Fine so far.

My problem now: those admins usualy modify the entry field in this Wizard
Dialog by hand.

But _only_ when they click on "Change" (halt dieser Ă„ndern-Knopf) and
select the folder in the upcoming dialogue with point-and-click, the
variable %MyDataFolder% will be filled correctly.

Is there a way to read the manually modified value?

I hope I described it somehow understandable.

tia
Wolfgang





--
Wolfgang Orth

www.odata.de
www.kik-service.de

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It's five o'clock somewhere.....




Written with Operas News-/ Mailclient: http://www.opera.com/mail/

NewsArchive
01-06-2012, 01:47 AM
Hi Wolfgang,

I have attached a "quick-and-dirty" demo project. The %MYDATAFOLDER%
variable always holds the correct value (entered "by hand" or selected via
the "Browse" dialog).

Friedrich

NewsArchive
01-20-2012, 01:37 AM
Thank you, Friedrich!

Yes, your example does what I want - so did my own.... but I have had
integrated something else that distracted the program.

One more time: you can't fool SB! Its always me who is the fool!

--
Wolfgang Orth

www.odata.de
www.kik-service.de

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It's five o'clock somewhere.....




Written with Operas News-/ Mailclient: http://www.opera.com/mail/