LOGGED does not work

Got a problem you cannot solve? Try here.
InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

LOGGED does not work

Postby InstallAware@Jelich.info » Fri Nov 06, 2015 2:26 pm

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

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

Re: LOGGED does not work

Postby FrancescoT » Mon Nov 09, 2015 9:54 am

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
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

InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

Re: LOGGED does not work

Postby InstallAware@Jelich.info » Tue Nov 10, 2015 2:55 pm

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
Attachments
Sample.zip
(404.53 KiB) Downloaded 296 times

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

Re: LOGGED does not work

Postby FrancescoT » Thu Nov 12, 2015 1:41 pm

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
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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 113 guests