From 48de4cdc2a34acc593ce4653e7f4d27afec43bd5 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Mon, 16 Feb 2026 20:15:20 +0300 Subject: [PATCH] fix(db-run): use single-string ArgumentList for Cyrillic /Execute paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Start-Process without -NoNewWindow uses ShellExecute API which corrupts Cyrillic characters when ArgumentList is passed as an array. Switching to a single concatenated string fixes file-not-found errors for paths like МояОбработка.epf. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/db-run/scripts/db-run.ps1 | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.claude/skills/db-run/scripts/db-run.ps1 b/.claude/skills/db-run/scripts/db-run.ps1 index ba6aa70d..2249bc1a 100644 --- a/.claude/skills/db-run/scripts/db-run.ps1 +++ b/.claude/skills/db-run/scripts/db-run.ps1 @@ -102,32 +102,35 @@ if (-not $InfoBasePath -and (-not $InfoBaseServer -or -not $InfoBaseRef)) { exit 1 } -# --- Build arguments --- -$arguments = @("ENTERPRISE") +# --- Build arguments as single string --- +# Note: Start-Process without -NoNewWindow uses ShellExecute. +# Passing ArgumentList as array can corrupt Cyrillic when ShellExecute +# re-joins elements. Single string avoids this. +$argString = "ENTERPRISE" if ($InfoBaseServer -and $InfoBaseRef) { - $arguments += "/S", "`"$InfoBaseServer/$InfoBaseRef`"" + $argString += " /S `"$InfoBaseServer/$InfoBaseRef`"" } else { - $arguments += "/F", "`"$InfoBasePath`"" + $argString += " /F `"$InfoBasePath`"" } -if ($UserName) { $arguments += "/N`"$UserName`"" } -if ($Password) { $arguments += "/P`"$Password`"" } +if ($UserName) { $argString += " /N`"$UserName`"" } +if ($Password) { $argString += " /P`"$Password`"" } # --- Optional params --- if ($Execute) { - $arguments += "/Execute", "`"$Execute`"" + $argString += " /Execute `"$Execute`"" } if ($CParam) { - $arguments += "/C", "`"$CParam`"" + $argString += " /C `"$CParam`"" } if ($URL) { - $arguments += "/URL", "`"$URL`"" + $argString += " /URL `"$URL`"" } -$arguments += "/DisableStartupDialogs" +$argString += " /DisableStartupDialogs" # --- Execute (background, no wait) --- -Write-Host "Running: 1cv8.exe $($arguments -join ' ')" -Start-Process -FilePath $V8Path -ArgumentList $arguments +Write-Host "Running: 1cv8.exe $argString" +Start-Process -FilePath $V8Path -ArgumentList $argString Write-Host "1C:Enterprise launched" -ForegroundColor Green