We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

editing .INI with input from users

hello,

i am currently trying to change some values in an .INI file, however that needs to be done with the input from the user.
in the installer i included an extra dialog just for that purpose.
on that dialog i have added a combobox and a edit box as well as a button.
adding value's to the combobox is realy easy and the edit box as well since it gets the input from the user.

this is how i want the function to work from the user perspective:

1) Choose value from combobox.
2) enter a value in the edit box.
3) press confirm button.
4) done.

this is how i want the function to work from my perspective:

1) choose value in the combobox.
2) enter a value in the edit box.
3) press confirm button.
4) confirm button retrieves both input values.
5) function to change the selected values in the .INI file with the retrieved data.
6) save and close the .INI file ( if needed )

however i have a couple of questions to get this idea working.

1) there is a custom action to extract the value from the combobox bud it seems there is none for an edit box. is this correct?
2) how can i use the value retrieved from the combobox to change the selected value in the .INI file? i would like to use the "text file update" function for this since i can search for the selected part that needs to be changed. bud how can i implement it? do i insert the retrieved data call from the combobox in the replace box? "property|Value1#Text1"as described in the documentation?
also is it possible to specify more precisely what needs te be changed? like the line(s) it needs to edit?
3) the same as point 2 bud then for an edit box.
F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

Re: editing .INI with input from users

i have put some time into trying to figure out how to get it working and i am making good progress. however there is something i just don't seem to get working.
i now have combobox filled with some values from which the user can select one, if he selected one he presses a button called "confirm values" that button initiates an custom action event ( extractcombox.... i left the condition field open). i made a text file update function in order to replace my selected text with the value/text from the combobox. bud i am not able to get that part working.
i looked it up in the documentation bud i can't fully figure out how to implement it. what i got now is the following:

in the text file update function i selected replace and in the replace field i filled in the following:
[AI_machine_type_DATA]

(machine_type is my indentifier)

bud i dont know how to implement this part in order to get the user selected value/text to replace the text i selected:
Value1#Text1|Value2 etc...

to make it real short the value/text chosen by the user needs to replace my selected value/text.

thanks in advance
F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

Re: editing .INI with input from users

if i set one of the values as selected it will change it in the ini file, bud not if i choose another one, how is this possible???
it is realy frustrating since this is already costing one and a half day and still no result.
F.J
Posts: 8
Joined: Tue Apr 14, 2015 10:19 am

Re: editing .INI with input from users

anybody :?:
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: editing .INI with input from users

Hi,

Sorry for the delayed reply. We had a lot of work to do in the last days and that is why we couldn't reply to you earlier.

From your explanations, I noticed that you use the "[AI_machine_type_DATA]" property to replace the value from the INI file. However, please note that this is a private property and its new value will not be passed from the UI to the Install stage.

Can you use a public property instead (only upper-case letters) and see if it works? If the problem persists, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”