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