We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

twenty94470
Posts: 10
Joined: Wed Apr 06, 2016 4:41 pm

Logging an event using a Powershell custom action

Hello,

I would like to know if you have a powershell script to Logging an event custom action.
In the FAQ you give an VBS scriptbut i will be interessted to an powershell code.

Thanks,
Best regards
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Logging an event using a Powershell custom action

Hi,

In order to log an event using a PowerShell script custom action you can follow the solution described in the "How to Use PowerShell to Write to Event Logs" article. For example, you can add a "Run PowerShell inline script" predefined custom action with the following code:
  • New-EventLog -LogName Application -Source "My Script"
    Write-EventLog –LogName Application –Source "My Script" –EntryType Information –EventID 1 –Message "This is a test message."
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”