質問

I created an installer that run vcredist_x86.exe (version 9.0.x.x) as part of the installation. Before installing it however I would like to know if it's already in the user's system. I basically need to detect not only that the DLLs are present but that they have the right version number. Is there any reliable way to do that?

I'm using NSIS but any solution would be welcome.

役に立ちましたか?

解決 2

There's no easy way to do that, so I ended up always installing the package whether it's already installed or not. Since it's a small install anyway it doesn't make much difference.

他のヒント

Try this:

!include "x64.nsh"

Section
  var /GLOBAL hasCRT
  !define CRTCHECKDLL msvcr80.dll
  !define CRTCHECKNAME 'Microsoft.VC80.CRT,version="8.0.50727.6195",type="win32",processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b"'
  push '${CRTCHECKDLL}'
  push '${CRTCHECKNAME}'
  call WinSxS_HasAssembly
  pop $hasCRT
  DetailPrint ${CRTCHECKDLL}=$hasCRT
SectionEnd
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top