2009-09-18 2 views
0

1) NSIS 설치 프로그램을 사용하는 시스템에 vs2005 런타임이 설치되어 있는지 여부를 확인하는 가장 좋은 방법은 무엇입니까?NSIS : VS2005 런타임 설치 여부 확인

2) 런타임은

 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 

당신이 파일을 복사하지 않고, 내장 된 설치 프로그램을 실행해야 libraries- 실행 시간을 추가하는 가장 좋은 방법이다 감지되지 않는 경우 당신 자신. 사용중인 VC 런타임 버전과 레지스트리 키 7299052b-02a4-4627-81f2-1818da5d550d을 확인하십시오.

+0

Thanks.It가 +1 – Ranjith

+0

당신은 환영을 근무 제거 항목을 검사보다는 아마 더 나은) –

+0

을 그리고 CRT가 제공되는 경우 제거 항목이없는 OS의 일부로? – Anders

1

A는 얼마 전, 나는 어셈블리 캐시를 검사 일부 sample code를 생성, 그냥