asif0012
Posts: 51
Joined: Tue Nov 22, 2022 6:30 pm

Console Logs from .NET Executable Not Captured in AI Log File

Hello,

I am using Advanced Installer, version 20.8, Enterprise Edition. I have a .NET 6 executable file that needs to be executed from the AI installer. When running the executable directly in Windows Command Prompt, it displays console logs. However, when I execute it through the AI installer using the "Launch File" custom action, these console logs do not appear in the AI-generated log file.

This command is provided to generate the AI logs from the AI exe: /L*V "test.log".

Could you please advise if there is a way to capture the console logs of the .NET executable in the AI log file?

Best Regards,
Asif
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Console Logs from .NET Executable Not Captured in AI Log File

Hello Asif,

In our How to create a .NET Custom Action article, we can see that for logging purposes, the Session.Log is used.

I see,however, that you are mentioning an executable, so perhaps you are using a different approach here?

If so, then I'm afraid I am not aware how your EXE could add its' results to the MSI log file.

For script type custom actions, this kind of works out of the box. For DLL files, you can see the approach above. However, for EXE files I'm not even sure this works, to be honest.

That being said, perhaps you could try rewriting your custom action as showcased in the article using our special .NET Custom Action type.

Hope this helps somehow!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”