- Зачем: при повторном запуске через ярлык Kimi цеплялся к консоли pwsh и удерживал окно терминала открытым ради своих логов. - Что: ярлык переведён на скрытый VBS-запускатель (как у Claude Proxy); добавлен запасной путь %ProgramFiles%\Kimi для установки на всех пользователей. - Проверка: синтаксис скриптов проверен парсером PowerShell, tests/test_proxy_env_sync.py зелёный.
29 lines
817 B
Plaintext
29 lines
817 B
Plaintext
Option Explicit
|
|
|
|
Dim fileSystem
|
|
Dim launcherPath
|
|
Dim powerShellPath
|
|
Dim command
|
|
Dim exitCode
|
|
Dim shell
|
|
|
|
Set fileSystem = CreateObject("Scripting.FileSystemObject")
|
|
Set shell = CreateObject("WScript.Shell")
|
|
|
|
launcherPath = shell.ExpandEnvironmentStrings("%USERPROFILE%\.local\bin\start-kimi-proxy.ps1")
|
|
powerShellPath = shell.ExpandEnvironmentStrings("%LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe")
|
|
|
|
If Not fileSystem.FileExists(powerShellPath) Then
|
|
powerShellPath = "pwsh.exe"
|
|
End If
|
|
|
|
command = """" & powerShellPath & _
|
|
""" -NoLogo -NoProfile -ExecutionPolicy Bypass -File """ & _
|
|
launcherPath & """"
|
|
|
|
exitCode = shell.Run(command, 0, True)
|
|
If exitCode <> 0 Then
|
|
MsgBox "Не удалось запустить Kimi Proxy. Код ошибки: " & exitCode, _
|
|
vbCritical, "Kimi Proxy"
|
|
End If
|