Archive: Installing VC++ 8.0.CRT redistributables


Installing VC++ 8.0.CRT redistributables
I know this has been asked before, but I can't seem to find an answer.

I have a program which depends on the VC++ 8.0.CRT redistributables (msvcr80.dll and friends) beeing installed system wide.

We are currently using InstallShield Express, but would like to switch to NSIS.

IS has an option that automatically installs redistributables. How can this be done using NSIS? I'd like to avoid calling the VC++ 8.0.CRT installer, but rather have NSIS do the installation.

I'm a newbee to NSIS, so please spoonfeed me...


I did it for our installer by 'unpacking' the VC8 CRT exe, and getting the msi and cab files buried inside it. Then I call ExecWait to install those.

    SetOutPath $PLUGINSDIR
File ".\SCC_LIB\WindowsInstaller-KB893803-v2-x86.exe"
File ".\SCC_LIB\VCRedist.msi"
File ".\SCC_LIB\VCRedis1.cab"

ExecWait '"$PLUGINSDIR\WindowsInstaller-KB893803-v2-x86.exe" /quiet /norestart'

ExecWait '"$SYSDIR\msiexec.exe" /i $PLUGINSDIR\VCRedist.msi /qn /norestart'
Windows Installer 3.1 is not standard on Windows 2000, so I am also installing that in the code above.

Hey,

I'm on a same subject today (but I embed a VC++ 9.0 CRT) but it's the same.

Here is what I've done :

Section "Microsoft Visual C++ 2008 Redistributable Package (x86)" SEC02
File "C:\Documents and Settings\nooky59\Bureau\vcredist_x86.exe"
ExecWait '$INSTDIR\vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "'
SectionEnd

I've found it there :

http://blogs.msdn.com/astebner/archi...-packages.aspx

But I want to go one step further if possible (if someone know how to do). I would like to forbid or to warn the user if he try to uninstall the Visual C++ runtime independently from the add / remove panel.

Is this possible ?


That is not really possible, but it's not your problem either if the user uninstall's random runtimes.

If the registry entry for VC9CRT does not have a comment, I guess you could add one, but that is a bit ugly and selfish

Or if it's that big of a deal, create a little loader application in VC6 or whatever, that checks for v9 of the CRT and warns/re-installs if needed, then starts your real app. Or maybe switch to MSI, I think it supports stuff like that with it's special shortcuts


You can bundle the run-time with your application by adding a manifest file to the application folder. Check MSDN for details.


Hey Joost, could not find the article on MSDN. Can you post a link?


http://msdn2.microsoft.com/en-us/lib...hy(VS.80).aspx maybe

but this would only work on XP and later no?


See the second part of this page:

http://msdn2.microsoft.com/en-us/lib...91(VS.80).aspx

Basically you need to install Microsoft.VC80.CRT.manifest along with the run-time files in the same directory as the executable.


Originally posted by Joost Verburg
See the second part of this page:

http://msdn2.microsoft.com/en-us/lib...91(VS.80).aspx

Basically you need to install Microsoft.VC80.CRT.manifest along with the run-time files in the same directory as the executable.
Yes, but I don't know if this the same problem for ojt who has initiated the topic but in my particular case, I can't simply put the runtime in the same directory.

It works with my app, but I use Qt and the jpeg support is compiled as a DLL plugin, and it seems that this jpeg plugin don't find the runtime if it is not installed system-wide.

So, there is perhaps other cases where a system-wide install of the runtime is needed.

Thanks for your answers. Yes, perhaps with MSI has I've already seen such messages when trying to removing software parts.

Else, the launcher could be a good idea, I have thought about that, I will do that if it is necessary to protect against runtime removing.

It works fine with Qt. Just make sure you compile Qt with the same version of Visual C++.


Hoi!
Does anybody know, if there's a way to determine, wheter VC80 is already installed or not?

We have to install it via the microsoft redistributable during our updates, because our applications need firebird 2.1 and the gds32.dll (of fb 2.1) needs MS VC80.


See Koby's explanation on MSVCRT 8.0. You might be able to use the same interfaces to check if the module is already installed.

http://kobyk.wordpress.com/2008/04/1...sis-installer/


thanks, kichik. that's a very interesting tutorial.

you mean i should use the system-plugin to call a api-function, which tells me if i need to install vc8.0?

i gonna try to find that function...