MichaelD
Posts: 43
Joined: Tue Jan 12, 2016 10:32 am

Option to log output from custom actions

Mon Feb 08, 2016 1:45 pm

Hi

It would be very helpful to have an option to log the output from custom actions.
I think every developer needs the output of stdout and stderr to debug problems of the custom actions that occured at the customer.
It is really cumbersome to convert each custom action to an inline powershell script which redirects output to a log file for every command.

Kind regards,
Michael

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Option to log output from custom actions

Tue Feb 09, 2016 2:14 pm

Hello Michael,

We'll consider your suggestion for adding this feature, but for the moment there are not immediate plans. Thank you for your suggestion.
Until we will add this improvement you can log within your custom action. By the way, is there any reason why you are not already logging within the custom action?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MichaelD
Posts: 43
Joined: Tue Jan 12, 2016 10:32 am

Re: Option to log output from custom actions

Tue Feb 09, 2016 2:21 pm

Hi Dan,

would be great to have this as option in the future.

When using Launch file custom action for example I can not redirect the output via command line options.
When using Powershell inline script I have to do this because of some powershell limitations:
Start-Transcript -Path $env:temp\foo.log
try {
& foo.exe 2>&1 | Out-Host
} catch {
$_ | Out-String
throw
} finally {
Stop-Transcript
}

So having an option to redirect all output streams to a file would be much easier.

Kind regards,
Michael

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Option to log output from custom actions

Wed Feb 10, 2016 11:35 am

Hi Michael,

Thank you for the feedback. I will forward these details to the dev team.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

abubkr168
Posts: 1
Joined: Wed Mar 02, 2016 8:12 am

Re: Option to log output from custom actions

Wed Mar 02, 2016 8:14 am

When using Launch file custom action for example I can not redirect the output via command line options.
When using Powershell inline script I have to do this because of some powershell limitations:



james

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Option to log output from custom actions

Wed Mar 02, 2016 9:20 am

Hello James and welcome to Advanced Installer forums,

We already have this on our TODO list and it will be available in a future version of Advanced Installer. Thank you for your suggestion.

Once this option will be available, I will let you know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

jeanny
Posts: 7
Joined: Mon Feb 25, 2019 10:21 pm

Re: Option to log output from custom actions

Wed Mar 06, 2019 7:25 pm

I'm requesting this feature as well. Logging output from custom action is critical to troubleshoot installation issues.

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Option to log output from custom actions

Thu Mar 07, 2019 10:01 am

Hello Jeanny,

You can activate extended debug logging for custom actions by setting the AI_DEBUGLOG property to “1” during install time. The functionality is available for both EXE and MSI packages:

Code: Select all

msiexec.exe /i "D:\Sample.msi" AI_DEBUGLOG=1 /L*V "D:\example.log"

Code: Select all

"D:\Sample.exe" AI_DEBUGLOG=1 /L*V "D:\example.log"
Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

alco
Posts: 79
Joined: Thu Nov 18, 2010 5:02 pm

Re: Option to log output from custom actions

Tue Mar 28, 2023 1:18 am

Is this already possible in 20.2.1 version? I need to get the output from a .cmd on a 'Launch File' custom action. Output redirection like the one below doesn't seem to work.
File to launch: swcef.cmd
Command line: >>[MsiLogFileLocation] 2>&1
Working directory: [APPDIR]

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Option to log output from custom actions

Wed Mar 29, 2023 3:24 pm

Hello Albert,

That might be failing because the property's value is not available during the deferred stage.

With the following configuration, the output is added to the .TXT file:
Screenshot_102.png
Screenshot_102.png (69.6KiB)Viewed 30909 times
Screenshot_103.png
Screenshot_103.png (15.12KiB)Viewed 30909 times

Hope this helps!

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

alco
Posts: 79
Joined: Thu Nov 18, 2010 5:02 pm

Re: Option to log output from custom actions

Wed Mar 29, 2023 3:36 pm

Indeed this worked on an alternative text file when I tried it yesterday.

Anyway, does that mean that the built-in way of logging these custom actions' output is not yet included in 20.2.1 or later? If so, do you have an ETA for it?

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Option to log output from custom actions

Wed Mar 29, 2023 4:54 pm

Hello Albert,

Glad to hear you got this working!

Regarding your question, I'm afraid not, I do not have an ETA for this.

However, I believe there might be alternatives for you like using a PowerShell script instead and writing in the log file using the "Write-Output" cmdlet.

Hope this helps!

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

Return to “Feature Requests”