0
大家好,我不能登錄錯誤或其他功能,都可以從main函數調用的內容啓動成績單不記錄子功能錯誤
cls
function one
{
$logFile = "mypath\errorlog.log"
Start-Transcript -path $logFile -Append | Out-Null
try
{
two
}
catch
{
}
finally
{
Stop-Transcript
}
}
function two
{
$arguments = @("`"$myfile`"", "/s:`"$logPath`"")
Start-Process -FilePath myexepath -ArgumentList $arguments -wait
// when ever there are errors or some thing that is getting logeed in to $logPath that is not getting writing in to my Transcript
}
所以能有人幫我
我覺得PB是不相關的在哪裏成績單指令,但你必須從輸出的過程中重定向事實上,看到http://stackoverflow.com/questions/8761888/powershell-capturing-standard -out-and-error-with-start-process 爲什麼使用start-process而不是'&myexepath'? – PlageMan