From bdf101b0ee8ba2840d0d1dfc133d6fdb1aca5c7f Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Thu, 14 May 2026 16:29:51 +0800 Subject: [PATCH] docs(installer): document cmd.exe one-liner for immediate PATH availability Add curl-based one-liner for cmd.exe users. Running the .bat directly in the current cmd session makes `qwen` available immediately via the `endlocal & set` trick. The `powershell -c "irm | iex"` path creates a child process so PATH changes cannot propagate to the parent. --- scripts/installation/install-qwen-standalone.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/installation/install-qwen-standalone.ps1 b/scripts/installation/install-qwen-standalone.ps1 index f35b8dadb..d3d87e2ba 100644 --- a/scripts/installation/install-qwen-standalone.ps1 +++ b/scripts/installation/install-qwen-standalone.ps1 @@ -1,11 +1,12 @@ # Qwen Code Windows hosted PowerShell entrypoint. -# Pairs with install-qwen-standalone.bat: this shim downloads the .bat into TEMP and runs -# it, so the documented one-liner can use the standard irm | iex pattern. -# Note: irm (Invoke-RestMethod) and iwr (Invoke-WebRequest) both return the raw -# text of a .ps1 file unchanged, so the one-liner works with either alias. +# Pairs with install-qwen-standalone.bat: this shim downloads the .bat into TEMP, +# verifies its checksum, and runs it with forwarded arguments. # -# Usage: -# powershell -ExecutionPolicy Bypass -c "irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex" +# PowerShell (runs in current session, qwen available immediately): +# irm https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.ps1 | iex +# +# cmd.exe (runs in current session, qwen available immediately): +# curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen-standalone.bat -o %TEMP%\install-qwen.bat && %TEMP%\install-qwen.bat # # To pin a specific release, set $env:QWEN_INSTALL_VERSION before invoking, # e.g. $env:QWEN_INSTALL_VERSION = 'vX.Y.Z'. This is equivalent to passing