Files
wehub-resource-sync 9119799461
构建测试 / 构建 Linux (x64) (push) Failing after 2s
构建测试 / 构建 Linux (ARM64) (push) Failing after 2s
构建测试 / 构建 Windows (ARM64) (push) Has been cancelled
构建测试 / 构建 Windows (x64) (push) Has been cancelled
构建测试 / 构建 macOS (Apple Silicon) (push) Has been cancelled
构建测试 / 构建 macOS (Intel) (push) Has been cancelled
构建测试 / 构建摘要 (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:24:21 +08:00

26 lines
1.1 KiB
NSIS

!macro customInstall
; Check if VC++ Redistributable is already installed
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64" "Installed"
${If} $0 != 1
DetailPrint "Downloading Visual C++ Redistributable..."
${If} ${RunningX64}
inetc::get "https://aka.ms/vs/17/release/vc_redist.x64.exe" "$TEMP\vc_redist.exe" /END
${Else}
inetc::get "https://aka.ms/vs/17/release/vc_redist.arm64.exe" "$TEMP\vc_redist.exe" /END
${EndIf}
Pop $0
${If} $0 == "OK"
DetailPrint "Installing Visual C++ Redistributable..."
nsExec::ExecToLog '"$TEMP\vc_redist.exe" /install /quiet /norestart'
Pop $0
DetailPrint "VC++ Redistributable install returned: $0"
${Else}
DetailPrint "VC++ Redistributable download failed: $0"
MessageBox MB_OK|MB_ICONEXCLAMATION "Visual C++ Redistributable download failed. Please install it manually from https://aka.ms/vs/17/release/vc_redist.x64.exe"
${EndIf}
Delete "$TEMP\vc_redist.exe"
${Else}
DetailPrint "Visual C++ Redistributable is already installed."
${EndIf}
!macroend