2009-09-18 94 views
0

1)哪种方法是检测是否在使用NSIS安装程序的系统中安装vs2005运行时的最佳方法?NSIS:检测是否安装了VS2005运行时

2)如果运行时没有检测到这是libraries-

 a)running an embedded vcredist or 
    b)copying dlls to the installation folder 

感谢

回答

2
;------------------------------- 
; Test if Visual Studio Redistributables 2005+ SP1 installed 
; Returns -1 if there is no VC redistributables intstalled 
Function CheckVCRedist 
    Push $R0 
    ClearErrors 
    ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "Version" 

    ; if VS 2005+ redist SP1 not installed, install it 
    IfErrors 0 VSRedistInstalled 
    StrCpy $R0 "-1" 

VSRedistInstalled: 
    Exch $R0 
FunctionEnd 

当然,你需要运行嵌入式安装,不将文件复制到增加运行时间的最佳方式你自己。针对您的VC运行时版本确认注册表项7299052b-02a4-4627-81f2-1818da5d550d

+0

Thanks.It工作+1 – Ranjith 2009-09-18 08:54:47

+0

欢迎您更好;) – 2009-09-18 12:35:01

+0

而如果CRT出货作为操作系统的一部分,没有卸载条目? – Anders 2009-09-19 23:16:50

1

前一段时间,我创造了一些sample code,检查程序集缓存,它可能不仅仅是检查一个卸载项

相关问题