Disable auto open generated HTML report

Dec 2, 2011 at 7:26 AM
Edited Dec 2, 2011 at 7:26 AM

I use batch file to run "PAL.ps1" and output the report in HTML format. However, after the report generated, HTML report opens in internet browser automatically. Is there any method or parameter to disable the auto open feature? Anyone can help on this?

Dec 2, 2011 at 9:27 AM
Edited Dec 2, 2011 at 9:29 AM
tazboy wrote:

I use batch file to run "PAL.ps1" and output the report in HTML format. However, after the report generated, HTML report opens in internet browser automatically. Is there any method or parameter to disable the auto open feature? Anyone can help on this?

I find the solution to make some dirt stuff. Open the "PAL.ps1" and search the function OpenHtmlReport.

Comment below 1 line from 

Invoke-Expression -Command "&'$HtmlReportFilePath'"

to

#// Invoke-Expression -Command "&'$HtmlReportFilePath'"

Hope further release will include the option not open the html or xml report automatically. It is quite useful if it runs as daily batch job.

Coordinator
Dec 14, 2011 at 3:00 AM

I'm glad you found out how to do this yourself. This is one of the reasons why I chose PowerShell as the engine. I'll consider this option in future releases. Thank you.