Page 1 of 1

LOGGED does not work

Posted: Fri Nov 06, 2015 2:26 pm
by InstallAware@Jelich.info
Hi Support Team,

My MSI script starts in the following way:
- Comment: Native Code Setup Engine 32 bit-64 bit Installer Project
- ForceDirectories C:\ProgramData\Company\Product\Log (my own PlugIn)
- set variable LOGGED to C:\ProgramData\Company\Product\Log\Product v1.2.3.4 Setup.log
- Write into Text File $LOGGED$ from value Start Install of Product $VERSION$ at $DATE$ $TIME$ (at end of file)
- Define Region: Check Application Requirements
- ...

The log file is not created.

In case I add the /l= argument to the command line the log is written.

Do I miss something or is this a bug?

Best regards
Michael

Re: LOGGED does not work

Posted: Mon Nov 09, 2015 9:54 am
by FrancescoT
Dear Michael,

no, it's not a bug.

As reported with the IA documentation;

"With the Windows Installer engine, logged execution will create a log file and record both the internal state of the installation (along with all variable values) and the native Windows Installer log inside a plain text file. Since all changes are pending until Apply Changes is called, the log will be created only after Apply Changes has been called."

Due the fact that you are initializing the LOGGED pre-defined variable once the setup Runtime has started, the log will be created only at Apply Changes execution.

Regards

Re: LOGGED does not work

Posted: Tue Nov 10, 2015 2:55 pm
by InstallAware@Jelich.info
Dear Francesco,

Thank you for your answer. I can now create a log file, but it looks bad in case I use the WRITE TO command as found in the docu or anywhere in the forum.

I have prepared a sample project to get you reproducing my problem. Please open the attached project. It is a plain 'Native Setup' created from the Template tab card added by some MSI code (line 2-4 and the "Write into Text File $LOGGED$" actions/commands).

When the setup is executed with the write-commands commented out, the log file looks good (Log without WRITE TO.TXT), even if it seems that something is missing (myah...).
When the setup is executed with the write commands active, the log file looks bad (Log with WRITE TO.TXT).
A comparison using Beyond Compare shows the difference (GuckstDu.png).

Obviously I should better have had the subject given the text "WRITE into Text File destroys the log" ... ;-)

What do I miss / wrong?

Best regards
Michael

Re: LOGGED does not work

Posted: Thu Nov 12, 2015 1:41 pm
by FrancescoT
Dear Michael,

I have been able to replicate the issue.

I suppose this is caused by the different "encoding format" used to write the file (the one used by the log itself and those one used by the "Write to Text file" command).

I'll send a note to our dev team about the issue.

Regards