NSISに関する情報¶
redistributable packageをインストールする方法¶
ExecWait '"$INSTDIR\${DLLMSVC8}" /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb!"" "'
http://blogs.msdn.com/b/astebner/archive/2006/08/23/715755.aspx
NSISでMichrosoft Visual C++ 2005 SP1 再頒布可能パッケージ (x86)がインストールされているかチェックするマクロ¶
!macro CHECK_VC8SP1_REDIST
ReadRegDWORD $R0 HKCR "Installer\Products\b25099274a207264182f8181add555d0" "Version"
Intcmp $R0 134274064 skip 0 0
!insertmacro DOWNLOAD "http://download.microsoft.com/download/0/d/8/0d8a1fc4-50f5-4017-879b-e1f5b55bae36/vcredist_x86.exe" vcredist_x86 exe
ExecWait '"$TEMP\${DLLMSVC8}"'
Delete "$TEMP\${DLLMSVC8}"
skip:
!macroend
NSISでMSVCRT 8 Runtimeがインストールされているかチェックする方法¶
http://www.sneal.net/blog/2007/11/21/NSISCheckForMSVCRT8Runtime.aspx
; IsMsvcrt8Installed
;
; Checks target machine for MSVCRT 8.0.50727.762 runtime installed in Windows
; SxS DLL cache.
;
; Returns 1 if found, otherwise 0
Function IsMsvcrt8Installed
; we can assume version because SxS directory is version specific
FindFirst $R1 $R0 "$WINDIR\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762*"
${If} $R0 != ""
DetailPrint "MSVCRT 8.0 is installed."
StrCpy $R0 1
${Else}
DetailPrint "MSVCRT 8.0 is not installed."
StrCpy $R0 0
${EndIf}
Push $R0
FunctionEnd