Fix Base64 Falsche Stelle v2
This commit is contained in:
@@ -107,7 +107,7 @@ function Start-SelfUpdateIfNeeded
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$localScriptPath = $MyInvocation.MyCommand.Path
|
$localScriptPath = $PSCommandPath
|
||||||
if ([string]::IsNullOrWhiteSpace($localScriptPath))
|
if ([string]::IsNullOrWhiteSpace($localScriptPath))
|
||||||
{
|
{
|
||||||
throw "❌ Lokaler Skriptpfad konnte nicht ermittelt werden."
|
throw "❌ Lokaler Skriptpfad konnte nicht ermittelt werden."
|
||||||
@@ -142,13 +142,14 @@ function Start-SelfUpdateIfNeeded
|
|||||||
Set-Content -Path $tempUpdatedScript -Value $remoteContent -Encoding UTF8
|
Set-Content -Path $tempUpdatedScript -Value $remoteContent -Encoding UTF8
|
||||||
|
|
||||||
Copy-Item -Path $tempUpdatedScript -Destination $localScriptPath -Force
|
Copy-Item -Path $tempUpdatedScript -Destination $localScriptPath -Force
|
||||||
|
Remove-Item -Path $tempUpdatedScript -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
Write-ConsoleLog "✓ Lokales Public-Skript wurde aktualisiert." "SUCCESS"
|
Write-ConsoleLog "✓ Lokales Public-Skript wurde aktualisiert." "SUCCESS"
|
||||||
Write-ConsoleLog "Starte aktualisierte Version neu..." "INFO"
|
Write-ConsoleLog "Starte aktualisierte Version neu..." "INFO"
|
||||||
|
|
||||||
$argumentList = @(
|
$argumentList = @(
|
||||||
'-ExecutionPolicy', 'Bypass',
|
'-ExecutionPolicy', 'Bypass',
|
||||||
'-File', ('"{0}"' -f $localScriptPath),
|
'-File', $localScriptPath,
|
||||||
'-SkipSelfUpdateCheck'
|
'-SkipSelfUpdateCheck'
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -265,7 +266,7 @@ function Invoke-SqlTopOneQuery
|
|||||||
[string]$Belegnummer
|
[string]$Belegnummer
|
||||||
)
|
)
|
||||||
|
|
||||||
$SqlPasswordEncode = [System.Text.Encoding]::UTF8.GetString(
|
$sqlPasswordPlain = [System.Text.Encoding]::UTF8.GetString(
|
||||||
[System.Convert]::FromBase64String($Config.SqlPassword)
|
[System.Convert]::FromBase64String($Config.SqlPassword)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -275,7 +276,7 @@ function Invoke-SqlTopOneQuery
|
|||||||
$Config.SqlServer,
|
$Config.SqlServer,
|
||||||
$Config.SqlDatabase,
|
$Config.SqlDatabase,
|
||||||
$Config.SqlUser,
|
$Config.SqlUser,
|
||||||
$SqlPasswordEncode
|
$sqlPasswordPlain
|
||||||
|
|
||||||
$connection = New-Object System.Data.SqlClient.SqlConnection
|
$connection = New-Object System.Data.SqlClient.SqlConnection
|
||||||
$connection.ConnectionString = $connectionString
|
$connection.ConnectionString = $connectionString
|
||||||
@@ -437,6 +438,7 @@ try
|
|||||||
{
|
{
|
||||||
New-Item -Path $fallbackFolder -ItemType Directory -Force | Out-Null
|
New-Item -Path $fallbackFolder -ItemType Directory -Force | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
$script:LogFilePath = Join-Path $fallbackFolder ("KANBAN-Rational-Druck_{0}.log" -f (Get-Date -Format 'yyyy-MM-dd'))
|
$script:LogFilePath = Join-Path $fallbackFolder ("KANBAN-Rational-Druck_{0}.log" -f (Get-Date -Format 'yyyy-MM-dd'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user