小编bha*_*vya的帖子

如何使用 NSIS 检查 Visual C++ 2017 可再发行 x86 是否安装

在安装软件之前,我需要检查是否Visual C++ 2017 redistributable(x86)安装了。如果未安装,在安装软件时我可以先安装可再发行的可执行文件。

当我手动安装它时,它显示在以下路径中:

Computer\HKEY_CLASSES_ROOT\Installer\Dependencies\VC,redist.x86,x86,14.16,bundle\Dependents\{67f67547-9693-4937-aa13-56e296bd40f6}
Run Code Online (Sandbox Code Playgroud)

请帮助我如何使用检查上述路径NSIS

因此,如果在安装软件之前不存在可执行文件,我可以使用以下代码安装它:

!insertmacro MUI_LANGUAGE "English"

Section "MyApp"

SetOutPath $INSTDIR
File "\Desktop\Common\vcredist_x86.exe"

ExecShell "" "$INSTDIR\vcredist_x86.exe"
SectionEnd
Run Code Online (Sandbox Code Playgroud)

nsis

5
推荐指数
1
解决办法
4161
查看次数

标签 统计

nsis ×1