vc_redist.x64 repair install versus regular install


perdrix

Well-known member
Member
Local time
9:32 AM
Posts
110
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
 
Windows Build/Version
Version 23H2

My Computer My Computer

At a glance

Windows 11 for WorkstationsXeon W-11885M128GB
OS
Windows 11 for Workstations
Computer type
Laptop
Manufacturer/Model
Dell Precision 7750
CPU
Xeon W-11885M
Motherboard
Dell
Memory
128GB
Any help much appreciated.
 

My Computer My Computer

At a glance

Windows 11 for WorkstationsXeon W-11885M128GB
OS
Windows 11 for Workstations
Computer type
Laptop
Manufacturer/Model
Dell Precision 7750
CPU
Xeon W-11885M
Motherboard
Dell
Memory
128GB
Most of the time, a repair install will refresh the application by re-installing the app in the background. Occasionally, the repair install will only examine the files and replace or repair what is necessary. In my experience, the repair installers usually just re-install the app, rather than the second more complicated option.

But this is Microsoft, they may write the more complicated installer.

However, checking the file dates on my last .NET repair install, the installer overwrote all of the files, suggesting a complete re-install of the package.

I think you will be all right if it just runs the repair install. The installer will see that the app is no longer installed and put everything back where it should be.

This is one thing that I don't like about some of MS's uninstall process. It eaves remnants in the registry. Without using a registry cleaner of some kind, or a brute force uninstaller that will clear remnants and leftovers, you can wind up with issues like this.

Best of luck.
 

My Computer My Computer

At a glance

Win 11 Pro 25H2Intel i7 13700KF32 GB Team Group DDR5 - 6000 CL 30ASUS TUF GAMING RTX 3070 Ti
OS
Win 11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Self build
CPU
Intel i7 13700KF
Motherboard
Gigabyte Z790 UD AC
Memory
32 GB Team Group DDR5 - 6000 CL 30
Graphics Card(s)
ASUS TUF GAMING RTX 3070 Ti
Sound Card
On board Realtek
Monitor(s) Displays
ACER 34 inch
Screen Resolution
4K
Hard Drives
1 TB Samsung 980 Pro Nvme, 1 TB Samsung 970 EVO Nvme, 2 x Samsung 970 2TB SSD SATA
PSU
EVGA 1000Q
Case
Rosewill something or other
Cooling
Noctua NH-D15. A whole schwak of Noctua case fans. $$$
Keyboard
Logitech G815
Mouse
Logitech G502 Hero
Internet Speed
700 up, 600 down
Browser
Firefox
Antivirus
MalwareBytes
We check these two registry keys:

Code:
HKLM\Software\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeMinimum
HKLM\Software\Microsoft\DevDiv\vc\Servicing\14.0\RuntimeAdditional

One or both will contain a Version value, with a format such as 14.40.33810. You seem to be writing a Nullsoft (NSIS) installer, which does have a VersionCompare function you could use to compare against the known version number you're installing.
 

My Computer My Computer

At a glance

Windows 11 Pro 25H212th Gen Core i7-1260P64 GB Micron PC4-25600Intel Iris Xe Graphics
OS
Windows 11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Intel NUC12WSHi7
CPU
12th Gen Core i7-1260P
Motherboard
NUC12WSBi7
Memory
64 GB Micron PC4-25600
Graphics Card(s)
Intel Iris Xe Graphics
Sound Card
on-board Realtek HD Audio
Monitor(s) Displays
Dell U3219Q
Screen Resolution
3840 x 2160
Hard Drives
Samsung SSD 990 PRO 1TB
Crucial MX500 2 TB
Antivirus
Microsoft Defender

Latest Support Threads

Back
Top Bottom