VC 8.0 Redistributables: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
No edit summary |
m (Formatting change) |
||
Line 1: | Line 1: | ||
This function detects if VC++ 8.0 redistributables are installed on the machine | This function detects if VC++ 8.0 redistributables are installed on the machine | ||
;------------------------------- | ;------------------------------- | ||
; Test if Visual Studio Redistributables 2005+ SP1 installed | ; Test if Visual Studio Redistributables 2005+ SP1 installed | ||
; Returns -1 if there is no VC redistributables intstalled | ; Returns -1 if there is no VC redistributables intstalled | ||
Function CheckVCRedist | Function CheckVCRedist | ||
Push $R0 | Push $R0 | ||
ClearErrors | ClearErrors | ||
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "Version" | ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "Version" | ||
; if VS 2005+ redist SP1 not installed, install it | ; if VS 2005+ redist SP1 not installed, install it | ||
IfErrors 0 VSRedistInstalled | IfErrors 0 VSRedistInstalled | ||
StrCpy $R0 "-1" | StrCpy $R0 "-1" | ||
VSRedistInstalled: | VSRedistInstalled: | ||
Exch $R0 | Exch $R0 | ||
FunctionEnd | FunctionEnd | ||
[[Category:Other Products Handling Functions]] | [[Category:Other Products Handling Functions]] | ||
[[Category:Other Products Version Detection Functions]] | [[Category:Other Products Version Detection Functions]] |
Revision as of 16:06, 28 February 2007
This function detects if VC++ 8.0 redistributables are installed on the machine
;------------------------------- ; 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