Initial 3.10.0 upload

This commit is contained in:
Mikael Karlsson
2025-02-22 21:52:13 +11:00
parent 17e9b786be
commit 8601a5b38e
68 changed files with 10592 additions and 26993 deletions

View File

@@ -86,9 +86,13 @@ function Start-CoreApp
Write-Log "#####################################################################################"
Write-Log "PowerShell version: $($PSVersionTable.PSVersion.ToString())"
Write-Log "PowerShell build: $($PSVersionTable.BuildVersion.ToString())"
Write-Log "PowerShell CLR: $($PSVersionTable.CLRVersion.ToString())"
Write-Log "PowerShell edition: $($PSVersionTable.PSEdition)"
if($PSVersionTable.BuildVersion) {
Write-Log "PowerShell build: $($PSVersionTable.BuildVersion.ToString())"
}
if($PSVersionTable.CLRVersion) {
Write-Log "PowerShell CLR: $($PSVersionTable.CLRVersion.ToString())"
}
Write-Log "PowerShell edition: $($PSVersionTable.PSEdition)"
try
{
@@ -344,6 +348,14 @@ function Write-LogError
}
Write-Log $Text 3
if((Get-SettingValue "ShowStackTrace") -eq $true)
{
Write-Log "Stack trace:`n $($Exception.StackTrace)"
Write-Log "Script stack trace:`n $($Exception.ScriptStackTrace)"
}
}
function Write-Status
@@ -1069,7 +1081,7 @@ function Get-Folder
{
if($global:WindowsAPICodePackLoaded -eq $false)
{
$apiCodec = Join-Path $global:AppRootFolder "Microsoft.WindowsAPICodePack.Shell.dll"
$apiCodec = Join-Path $global:AppRootFolder "Bin\Microsoft.WindowsAPICodePack.Shell.dll"
if([IO.File]::Exists($apiCodec))
{
Add-Type -Path $apiCodec | Out-Null
@@ -1988,6 +2000,14 @@ function Add-DefaultSettings
Type = "Boolean"
Description = "Write errors to the Error Output of the PS Host. If disabled, errors will be written as a Warning. Eg. disable this if automation should skip logging PowerShell errors."
DefaultValue = $true
}) "General"
Add-SettingsObject (New-Object PSObject -Property @{
Title = "Show stack error"
Key = "ShowStackTrace"
Type = "Boolean"
Description = "Write exception stack trace info to the log."
DefaultValue = $false
}) "General"
Add-SettingsObject (New-Object PSObject -Property @{