- Local time
- 12:03 AM
- Posts
- 93
- OS
- Windows 11 for Workstations
We've hit a number of issues lately where user's systems had back-level version of msvcp140.dll. This caused no end of grief.
I thought I'd change our install script to do this:
Section "Visual Studio Runtime"
SetOutPath "$INSTDIR"
File "..\x64\Release\vc_redist.x64.exe"
SetRegView 64
ReadRegDWORD $0 HKLM "Software\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64" "Bld"
SetRegView 32
${If} $0 != 33816
#
# vc_redist build 33816 isn't installed, so install it
#
ExecWait "$INSTDIR\vc_redist.x64.exe /install /passive /norestart"
${Else}
#
# vc_redist build 33816 is installed, force a repair install
#
ExecWait "$INSTDIR\vc_redist.x64.exe /repair /passive /norestart"
${Endif}
Delete "$INSTDIR\vc_redist.x64.exe"
SectionEnd
This sort of works if the 14.40.33816 build has never been installed, in which case it does a regular install, otherwise a repair is done.
However if the redist package has previously been installed and then uninstalled, the registry keys remain so it always does a repair install
So will a repair install do everything a regular install would but without checking that the redist has been installed?
Or do I need a better check for the vc_redist.x64 being installed or not?
Thanks
David
I thought I'd change our install script to do this:
Section "Visual Studio Runtime"
SetOutPath "$INSTDIR"
File "..\x64\Release\vc_redist.x64.exe"
SetRegView 64
ReadRegDWORD $0 HKLM "Software\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X64" "Bld"
SetRegView 32
${If} $0 != 33816
#
# vc_redist build 33816 isn't installed, so install it
#
ExecWait "$INSTDIR\vc_redist.x64.exe /install /passive /norestart"
${Else}
#
# vc_redist build 33816 is installed, force a repair install
#
ExecWait "$INSTDIR\vc_redist.x64.exe /repair /passive /norestart"
${Endif}
Delete "$INSTDIR\vc_redist.x64.exe"
SectionEnd
This sort of works if the 14.40.33816 build has never been installed, in which case it does a regular install, otherwise a repair is done.
However if the redist package has previously been installed and then uninstalled, the registry keys remain so it always does a repair install
So will a repair install do everything a regular install would but without checking that the redist has been installed?
Or do I need a better check for the vc_redist.x64 being installed or not?
Thanks
David
- Windows Build/Version
- Version 23H2
My Computer
System One
-
- OS
- Windows 11 for Workstations
- Computer type
- Laptop
- Manufacturer/Model
- Dell Precision 7750
- CPU
- Xeon W-11885M
- Motherboard
- Dell
- Memory
- 128GB