Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dectection issues ConfigMgr VcRedist 2012, 2013, 2019 #58

Open
daroy opened this issue Apr 2, 2020 · 19 comments · Fixed by #59 or #73
Open

Dectection issues ConfigMgr VcRedist 2012, 2013, 2019 #58

daroy opened this issue Apr 2, 2020 · 19 comments · Fixed by #59 or #73
Assignees
Projects

Comments

@daroy
Copy link

daroy commented Apr 2, 2020

Expected Behavior

VcRedist 2012, 2013, 2019 detected as installed by Config Mgr.

Current Behavior

VcRedist 2008 and 2010 are being installed and detected correctly by Config Mgr. VcRedist 2012, 2013, 2019 are being installed, they show up in Control Panel -> Add remove programs, but Config Mgr isn't detecting them as such.
Capture

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. $VcList = Get-VcList
  2. Get-VcRedist -VcList $VcList -Path "C:\Temp\VcRedist"
  3. Import-VcConfigMgrApplication -VcList $VcList -Path "C:\Temp\VcRedist" -CMPath "\myshare" -SMSSiteCode xxx
  4. Deploy Visual C++ Redistributable for Visual Studio 2019 x64 to a collection in Config Mgr

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • VcRedist Version: 2.0.168
  • PowerShell Version: 5.1.17763.1007
  • Operating System: Server 2019 x64 and Windows 10 1909 x64
@aaronparker aaronparker self-assigned this Apr 2, 2020
@aaronparker
Copy link
Owner

Are the Windows Installer GUIDs not matching what's on the client?

@daroy
Copy link
Author

daroy commented Apr 3, 2020

No the GUID that is in the application deployment type in Config Mgr for the 2019 x64 version is {282975d8-55fe-4991-bbbb-06a72581ce58}. I can't find that GUID on my test system at all after the software is installed and showing up in the Programs and features list where it can be repaired or uninstalled manually.

@aaronparker
Copy link
Owner

There's a new version of the 2019 x86 & x64 VcRedist. I'll release a new version of the module with the updated GUIDs ASAP.

@daroy
Copy link
Author

daroy commented Apr 6, 2020

I will wait for the update and try again. Please note the 2012 and 2013 versions weren't detected either.

@aaronparker aaronparker mentioned this issue Apr 6, 2020
9 tasks
@aaronparker
Copy link
Owner

New version should be up on the Gallery in a few minutes.

Could you please check the GUID of the 2012 and 2013 versions on a client and compare to what's in the ConfigMgr app? Not sure why those versions are failing.

@daroy
Copy link
Author

daroy commented Apr 6, 2020

From what location do you take the GUID's usually? Just to be sure that I am checking in the right place.

@aaronparker
Copy link
Owner

aaronparker commented Apr 6, 2020

HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

@daroy
Copy link
Author

daroy commented Apr 7, 2020

I've just been trying to install Visual C++ Redistributable for Visual Studio 2012 Update 4 x64 through Config Mgr. It gets installed but Config Mgr is reporting it as failed as the application won't get discovered.

HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6} is present on the system and is the same GUID as in Config Mgr.

Would there be a change Config Mgr is only looking in HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall? As the GUID is only available in HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall?

Capture

@codaamok
Copy link

I am experiencing detection failures on the majority of the apps however the registry keys exist.

I do no ever use the Win32_Product class, but I did just for testing, and I do not see the GUIDs in there for the apps failing to discover after install.

Apps failing to discover post install:

  • 2019 x64 + x86
  • 2012 x64 + x86
  • 2013 x86

@codaamok
Copy link

{65e650ff-30be-469d-b63a-418d71ea1765} 2019 x86
{6913e92a-b64e-41c9-a5e6-cef39207fe89} 2019 x64
{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f} 2012 x86
{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6} 2012 x64
{9dff3540-fc85-4ed5-ac84-9e3c7fd8bece} 2013 x86

The above 100% exist in registry. 100% do not exist in Win32_Product.

This gist may be useful for some inspiration if you're interested in using registry based detection instead: https://gist.github.com/indented-automation/32efb05a5fb67ef9eed02bbb8fe90691 or this utility: https://reg2ps.azurewebsites.net/

@codaamok
Copy link

Example snippet generated from Roger Zander's tool

# Reg2CI (c) 2020 by Roger Zander
try {
	if(-NOT (Test-Path -LiteralPath "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{65e650ff-30be-469d-b63a-418d71ea1765}")){ return $false };
	if((Get-ItemPropertyValue -LiteralPath 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{65e650ff-30be-469d-b63a-418d71ea1765}' -Name 'DisplayVersion' -ea SilentlyContinue) -eq '14.25.28508.3') {  } else { return $false };
}
catch { return $false }
return $true

@codaamok
Copy link

I can feel the urge to give a huge middle finger to Microsoft right now.

I feel your pain.

@NathanTheGr8
Copy link

I am also struggling with this I see 3 reg keys for the current 2019 x64

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
{EEA66967-97E2-4561-A999-5C22E3CDE428} Microsoft Visual C++ 2019 X64 Minimum Runtime - 14.25.28508
{7D0B74C2-C3F8-4AF1-940F-CD79AB4B2DCE} Microsoft Visual C++ 2019 X64 Additional Runtime - 14.25.28508

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
{6913e92a-b64e-41c9-a5e6-cef39207fe89} Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.25.28508

@NathanTheGr8
Copy link

NathanTheGr8 commented Apr 21, 2020

I ended up just using a PowerShell detection method. The GUID detection was not working for the current executable. Note this will detect any version of c++ 2015-2019 x64. If you only want to detect a specific version modify the regex variable to include a version number.

#addapted from https://blog.niemalsnever.de/sccm-detection-script-for-the-visual-c-redistributable-s/

& {
    Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*
    Get-ChildItem HKLM:\SOFTWARE\WoW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
} | ForEach-Object { 
    $CurDisplayName = $_.GetValue("DisplayName") # Get DisplayName
    # Check if Display Name matches the regex
    $Regex = "^Microsoft Visual C\+\+ 2015-2019 Redistributable \(x64\).*"
    if( $CurDisplayName -match $Regex ) {
        Write-Host "Installed"
    }
}

@codaamok
Copy link

codaamok commented May 7, 2020

@aaronparker perhaps re-open this so folks can easily see this and this thread?

@aaronparker aaronparker reopened this May 7, 2020
@aaronparker
Copy link
Owner

Good idea.

@aaronparker
Copy link
Owner

aaronparker commented Jun 24, 2020

I need to double check all product codes in the manifest; however, this detection method looks to work:

  • Registry
  • Hive: HKEY_LOCAL_MACHINE
  • Key: SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{65e650ff-30be-469d-b63a-418d71ea1765}
  • Value: DisplayVersion
  • Data Type: Version
  • Operator: Greater than or equal to or Equals
  • Value: 14.25.28508.3

@aaronparker aaronparker added this to To Do in VcRedist v2 via automation Jul 14, 2020
@aaronparker aaronparker pinned this issue Dec 16, 2020
@aaronparker aaronparker removed this from To Do in VcRedist v2 Dec 17, 2020
@aaronparker aaronparker changed the title Dectection issues Config Mgr VcRedist 2012, 2013, 2019 Dectection issues ConfigMgr VcRedist 2012, 2013, 2019 Dec 17, 2020
@rlabrecque
Copy link

rlabrecque commented Jan 19, 2021

Just a note we're up to 14.28.29325.2 now and the method immediately above me does not work with this one unfortunately.

I ended up using this script myself which worked wonders.

#58 (comment)

@aaronparker
Copy link
Owner

aaronparker commented Mar 17, 2021

I've added some changes to version 2.0.231 - see 7f592a8. This makes the following changes:

  • Creates a new application for every version - likely to only affect 2017 and 2019 as previous versions aren't typically updated any more
  • Uses a registry detection method for the appropriate ProductCode in the 32-bit or 64-bit UninstallKey (e.g. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f}) - I need to complete some more testing here in ConfigMgr, but the same approach with in Intune

Screenshots:

VcRedist1

VcRedist2

@aaronparker aaronparker linked a pull request Mar 17, 2021 that will close this issue
@aaronparker aaronparker added this to To do in VcRedist v3 via automation Mar 18, 2021
@aaronparker aaronparker moved this from To do to In progress in VcRedist v3 Mar 18, 2021
@aaronparker aaronparker moved this from In progress to Done in VcRedist v3 May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants