Cannot create INI file with Dyanamic file name

Got a problem you cannot solve? Try here.
Post Reply
chintanpatel7
Posts: 21
Joined: Thu Feb 16, 2012 11:02 pm

Cannot create INI file with Dyanamic file name

Post by chintanpatel7 »

Hi, I am using InstallAware 2012 - Studio version.
In my project there is one requirement of get INI file name from user as text input and create dynamically INI file with that name.
I have tried to pass the variable in which the INI file name is stored but file is created with variable name instead of variable value.
Also in the INI file name text box, the help window says that variables are not supported in this.
Is there any alternate way for this?
Please check the attachments in sequence for more info.

Thanks.

Note: I have removed some part of attachments for security purpose..
Attachments
Screenshots.rar
File info:

1 - User enters INI id which is stored in variable.
2 - Variable is used to create full ini file name with .ini extension and stored full name in another variable
3 - Trying to give that variable as INI file name but as help shows it cannot be possible
4 - Created INI file with variable name instead of variable value...
(312.7 KiB) Downloaded 394 times
Last edited by chintanpatel7 on Mon Mar 12, 2012 11:15 pm, edited 1 time in total.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Cannot create INI file with Dyanamic file name

Post by FrancescoT »

Dear User,

can you please add a message box that shows the variable value for, INI and INIID, just after the code,

> Set Variable INI to $INIID$.ini

and before the call EDIT INI File

I would like to see what the variable value is at that point.

Let me know.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
chintanpatel7
Posts: 21
Joined: Thu Feb 16, 2012 11:02 pm

Re: Cannot create INI file with Dyanamic file name

Post by chintanpatel7 »

Hi,

First of all, thanks for the quick reply.
But I have already checked the variable values of $INIID$ and $INI$. They are showing correct values. The problem is values cannot reflect in file name.
Here I have attached screenshot of variable watch. Please refer it for the variable value information.

Thanks again..

Note: I have removed some part of attachment for security purpose.
Attachments
Variable watch of variables $INI$ and $INIID$
Variable watch of variables $INI$ and $INIID$
2.JPG (114.91 KiB) Viewed 6321 times
Place from where I have inserted INI Id.
Place from where I have inserted INI Id.
1.JPG (18.57 KiB) Viewed 6321 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Cannot create INI file with Dyanamic file name

Post by FrancescoT »

Dear User,

could you please replicate it in a simple project that you may send to me?

Of course I will have a look.

Please send in compressed format as zip, with all required file (if any). Please use folder location that I can easly replicate on my test machine.

If you want you can send it to: [email protected]

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
chintanpatel7
Posts: 21
Joined: Thu Feb 16, 2012 11:02 pm

Re: Cannot create INI file with Dyanamic file name

Post by chintanpatel7 »

Hi,

I have attached small version of my project which contains the only part in which I have a problem described earlier.
Please take a look on it. It will create installation folder Demo8 in C:\Program Files with the dummy ini file with wrong file name [$INI$].

Note: As this demo project is created in just 10-15 minutes with only one dialog so there are no installation standard followed in it.. :)

Thanks..
Attachments
Demo8.rar
Demo Project Folder
(2.87 MiB) Downloaded 379 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Cannot create INI file with Dyanamic file name

Post by FrancescoT »

Dear User,

will have a look at it, but please be patient.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Cannot create INI file with Dyanamic file name

Post by FrancescoT »

Dear User,

as described in InstallAware documentation:

INI File Name
Type the name of the INI file to edit. With the Windows Installer engine, you may not use any variables in this field, only string literals are allowed. With the Native Engine, variables are allowed.

To work you must do the following:

Set Variable NATIVE_ENGINE to TRUE
Edit INI File $TARGETDIR$\$INI$, [StartUp] EmbeddedLogo=0
Set Variable NATIVE_ENGINE to FALSE

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply