diff options
| author | xxanqw <[email protected]> | 2025-11-26 15:32:58 +0200 |
|---|---|---|
| committer | xxanqw <[email protected]> | 2025-11-26 15:32:58 +0200 |
| commit | 0b7a6dd97ba3572a00616c00b3c9c93b9022bc5a (patch) | |
| tree | b2002470103002981e827053e41a211ee93cc36e /.github/workflows | |
| parent | 4b27a643d5781df3959e454fb2796d04b9e45767 (diff) | |
| download | mikusays-c-0b7a6dd97ba3572a00616c00b3c9c93b9022bc5a.tar.gz mikusays-c-0b7a6dd97ba3572a00616c00b3c9c93b9022bc5a.zip | |
Fix NSIS script: improve PowerShell command syntax for downloading Redistributable
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/package-win.yml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/.github/workflows/package-win.yml b/.github/workflows/package-win.yml index ae2397f..f9e99f8 100644 --- a/.github/workflows/package-win.yml +++ b/.github/workflows/package-win.yml @@ -228,11 +228,9 @@ jobs: ; Define temp path for the installer StrCpy $2 "$TEMP\vc_redist.exe" - ; Use PowerShell to download. Quotes are carefully escaped: - ; Outer quotes '...' for NSIS ExecWait string - ; Inner quotes "..." for PowerShell command - ; Escaped quotes \' for values inside the PowerShell string - ExecWait 'powershell -NoProfile -NonInteractive -Command "Invoke-WebRequest -Uri \'$1\' -OutFile \'$2\'"' $3 + ; Use PowerShell to download. We'll ensure the entire command is a single quoted string + ; ExecWait expects 1-2 parameters; to avoid tokenization use double-quoted command and escape inner double quotes + ExecWait "powershell -NoProfile -NonInteractive -Command \"Invoke-WebRequest -Uri '$1' -OutFile '$2'\"" $3 ${If} $3 != 0 DetailPrint "Download failed (Error code: $3). Skipping Redistributable." |
