I'd like to install the Visual C++ 2010 Redistributable from an NSIS installer. Is that possible?
I've seen many other installers do this, but I don't think I've seen an NSIS package do it.
FYI, this is the VC++ package I'm referring to:
http://www.microsoft.com/en-us/downl...s.aspx?id=5555
Thanks for any tips.
Possible for NSIS to install Visual C++ packages?
5 posts
Can't you bundle the redistributable yourself in the installer, copy it to some temp location, and then run the exe from there? Or do you want it all silently? Or do you want nsis to check for redistributable itself in the machine, and download from the internet if not installed?
Thanks for the reply.
Ideally I'd like to check for the presence of VC2010 and install it if necessary. No need to download it, I can package it with my installer.
Ideally I'd like to check for the presence of VC2010 and install it if necessary. No need to download it, I can package it with my installer.
You can check registry. See this link http://blogs.msdn.com/b/astebner/arc.../10008146.aspx
Something like:
Something like:
You could use the logic If in LogicLib to do the conditional check to make code look better.!include x64.nsh
${If} ${RunningX64}
ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x64" "Installed"
StrCmp $1 1 installed
${Else}
ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
StrCmp $1 1 installed
${EndIf}
;not installed, so run the installer
ExecWait 'MyPathWhereInstallerIs\vc++2010setup.exe'
installed:
;we are done
Thanks hugely, works beautifully.