aaronparker / vcredist

Lifecycle management for the Microsoft Visual C++ Redistributables
https://vcredist.com
MIT License
132 stars 17 forks source link

Get-Vclist return non-existent versions? #147

Open Jorrdddyy opened 1 year ago

Jorrdddyy commented 1 year ago

Context I'm trying to remove out older version of Visual C++ Redistributable, I have a Configuration manager task sequence that Delivered the version I desire 'Microsoft Visual C++ 2015-2022 Redistributable' (x64 & x86) along with some of my own logic which in the end runs the following command on pretty much all the devices on my network. Command: 'Uninstall-VcRedist -Release 2005, 2008, 2010, 2012, 2013, 2015, 2017 -Confirm:$false' From my observations this has worked, as far as the control panel, Programs and features is concerned.

However, if I run 'Get-VcList' the following is returned.

Name : Visual C++ Redistributable for Visual Studio 2012 Update 4 ProductCode : {ca67548a-5ebe-413a-b50c-4b9ceb6d66c6} Version : 11.0.61030.0 URL : https://www.microsoft.com/en-us/download/details.aspx?id=30679 URI : https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe Release : 2012 Architecture : x64 Install : /install /passive /norestart SilentInstall : /quiet /norestart SilentUninstall : "%ProgramData%\Package Cache{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}\vcredist_x64.exe" /uninstall /quiet /norestart UninstallKey : 32

Name : Visual C++ Redistributable for Visual Studio 2012 Update 4 ProductCode : {33d1fd90-4274-48a1-9bc1-97e33d9c2d6f} Version : 11.0.61030.0 URL : https://www.microsoft.com/en-us/download/details.aspx?id=30679 URI : https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe Release : 2012 Architecture : x86 Install : /install /passive /norestart SilentInstall : /install /quiet /norestart SilentUninstall : "%ProgramData%\Package Cache{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f}\vcredist_x86.exe" /uninstall /quiet /norestart UninstallKey : 32

Name : Visual C++ 2013 Update 5 Redistributable Package ProductCode : {042d26ef-3dbe-4c25-95d3-4c1b11b235a7} Version : 12.0.40664.0 URL : https://support.microsoft.com/en-us/help/4032938/update-for-visual-c-2013-redistributable-package URI : https://download.visualstudio.microsoft.com/download/pr/10912041/cee5d6bca2ddbcd039da727bf4acb48a/vcredist_x64.exe Release : 2013 Architecture : x64 Install : /install /passive /norestart SilentInstall : /install /quiet /norestart SilentUninstall : "%ProgramData%\Package Cache{042d26ef-3dbe-4c25-95d3-4c1b11b235a7}\vcredist_x64.exe" /uninstall /quiet /norestart UninstallKey : 32

Name : Visual C++ 2013 Update 5 Redistributable Package ProductCode : {9dff3540-fc85-4ed5-ac84-9e3c7fd8bece} Version : 12.0.40664.0 URL : https://support.microsoft.com/en-us/help/4032938/update-for-visual-c-2013-redistributable-package URI : https://download.visualstudio.microsoft.com/download/pr/10912113/5da66ddebb0ad32ebd4b922fd82e8e25/vcredist_x86.exe Release : 2013 Architecture : x86 Install : /install /passive /norestart SilentInstall : /install /quiet /norestart SilentUninstall : "%ProgramData%\Package Cache{9dff3540-fc85-4ed5-ac84-9e3c7fd8bece}\vcredist_x86.exe" /uninstall /quiet /norestart UninstallKey : 32

Name : Visual C++ Redistributable for Visual Studio 2022 ProductCode : {8bdfe669-9705-4184-9368-db9ce581e0e7} Version : 14.36.32532.0 URL : https://www.visualstudio.com/downloads/ URI : https://aka.ms/vs/17/release/VC_redist.x64.exe Release : 2022 Architecture : x64 Install : /install /passive /norestart SilentInstall : /install /quiet /norestart SilentUninstall : "%ProgramData%\Package Cache{8bdfe669-9705-4184-9368-db9ce581e0e7}\VC_redist.x64.exe" /uninstall /quiet /norestart UninstallKey : 32

Name : Visual C++ Redistributable for Visual Studio 2022 ProductCode : {410c0ee1-00bb-41b6-9772-e12c2828b02f} Version : 14.36.32532.0 URL : https://www.visualstudio.com/downloads/ URI : https://aka.ms/vs/17/release/VC_redist.x86.exe Release : 2022 Architecture : x86 Install : /install /passive /norestart SilentInstall : /install /quiet /norestart SilentUninstall : "%ProgramData%\Package Cache{410c0ee1-00bb-41b6-9772-e12c2828b02f}\VC_redist.x86.exe" /uninstall /quiet /norestart UninstallKey : 32


With the information above I've tried checking the 'SilentUninstall' path returned. However, these do not exist with the exception of the later version 'Microsoft Visual C++ 2015-2022 Redistributable'. Which I assume is correct.

If we take the Name: Visual C++ Redistributable for Visual Studio 2012 Update 4 and perform the following search is the registry nothing is returned. Leading me to believe these version aren't actually installed.

Name Search: : Visual C++ Redistributable for Visual Studio 2012 Update 4 Version Search: '11.0.61030.0'

So what I'm trying to determine is how these version are being found? Do they actually exist on a machine? Or is the command Get-VcList just return a text file somewhere that isn't being update and false reporting versions?

aaronparker commented 1 year ago

Get-VcList returns the Redistributables included in the module. If you want to return the Redistributables then use Get-InstalledVcRedist