Edit INI File Error

Got a problem you cannot solve? Try here.
SebSpiers
Posts: 38
Joined: Tue Dec 20, 2016 7:14 am
Location: Tewkesbury, UK

Edit INI File Error

Postby SebSpiers » Fri Jan 06, 2017 4:30 am

Hi,

I'm trying to edit an INI file using the Edit INI File function.

Unfortunately I am getting this error, which I am seeing often across various features (#frustrating).

Image

The code I'm using is as following and looks to be correct in terms of use having looked at the documentation:

Code: Select all

Edit INI File C:\eWAM\ini\init.ini, [Project] IsLDAPUsed=$LDAP$


The INI file is also correctly formatted.

Any ideas?
Attachments
Capture.PNG
Capture.PNG (5.36 KiB) Viewed 3448 times
I'm not a developer, I just want to install things...

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Edit INI File Error

Postby FrancescoT » Mon Jan 09, 2017 10:41 am

Dear SebSpiers,

without knowing which is the exact context where you are trying to use the command, it's quite impossible to say which is the cause of your issue.

For what concerns the "Edit INI File" command specifically, please consider that this is a Windows Installer Command (PURPLE COMMANDS). The execution of any Windows Installer command, it's by default deferred to "Apply Install" execution. For example, you may have sequenced "incorrectly" the command in your script logic.

If you have any chance to post a a very "VERY" minimal project that replicates the issue, I'll try to have a look.

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

SebSpiers
Posts: 38
Joined: Tue Dec 20, 2016 7:14 am
Location: Tewkesbury, UK

Re: Edit INI File Error

Postby SebSpiers » Mon Jan 09, 2017 11:53 am

So I cannot execute this anywhere within my script? It must be at a certain point during the script?
I'm not a developer, I just want to install things...

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Edit INI File Error

Postby FrancescoT » Mon Jan 09, 2017 1:33 pm

Dear SebSpiers,

as I have already said, if the setup is based on Windows Installer Engine, PURPLE COMMANDS are not executed immediately but deferred to Apply Install. This is not due an IA limitation ...it's the Windows Installer Engine that works in this way.

So this means that you can use the "Edit INI File" command at any time in your script, but the INI file will be modified only once the Apply Install statement gets executed.

Finally and if you want to execute the command immediately, you may take advantage of the built-in InstallAware Native Engine.
This specific argument has been widely discussed on our forum. At any rate, please have a look at the following link.
https://www.installaware.com/forums/viewtopic.php?f=2&t=10499&hilit=Set+Variable+NATIVE_ENGINE+to+TRUE

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

SebSpiers
Posts: 38
Joined: Tue Dec 20, 2016 7:14 am
Location: Tewkesbury, UK

Re: Edit INI File Error

Postby SebSpiers » Tue Jan 10, 2017 6:43 am

FrancescoT wrote:if the setup is based on Windows Installer Engine, PURPLE COMMANDS are not executed immediately but deferred to Apply Install. This is not due an IA limitation ...it's the Windows Installer Engine that works in this way.

So this means that you can use the "Edit INI File" command at any time in your script, but the INI file will be modified only once the Apply Install statement gets executed.


OK, so this doesn't explain the errors I've been getting, which is both a good thing and a bad thing I guess.

I'm going to try my project on another machine shortly, to see if the cause of my problem is machine specific, especially as it seems to be recurring with different functions.

Thanks for your help.
I'm not a developer, I just want to install things...


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 67 guests