aaronparker / vcredist

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

Redistributable is not installed if platform is specified (Windows 11 on VMware) #144

Open manelrodero opened 1 year ago

manelrodero commented 1 year ago

Environment

image

Expected Behavior

Six VC++ redistributable should be installed.

Current Behavior

None of them are installed. The logs show that the redistributable have not been installed because the current platform is not supported.

image

VcRedist specifies the platform for each installer as Windows 7 and above:

image

Workaround

Change platform to "Any" and redistributable are installed correctly:

image

The logs show the successful execution of the installer:

image

Assumption

Could it be because Windows 11 is installing? As of today it is not officially supported and may not be detected correctly as a platform.

I'm going to do some testing using Windows 10 to see if the behavior is different.

manelrodero commented 1 year ago

Windows 10 has the same behavior. No VC++ redistributable installed.

I'm now checking different WSF/VBS files to debug this behavior.

image image image

WMI query should match Windows 10 and 11:

manelrodero commented 1 year ago

I have not been able to get ZTIUtility.vbs to generate any logs.

In fact, when the IsSupportedPlatform function is called, the supported platform or unsupported platform message does not appear:

image

I've asked MDT experts on Twitter to see if they know why. I can't think of any other way to debug.

aaronparker commented 1 year ago

I've made an update to the Import-VcMdtApplication function in the development channel that does two things:

  1. Uses Any platform for the x86 Redistributables
  2. Uses All x64 Windows 10 Client and All x64 Windows Server 10 for the x64 Redistributables

I've tested this on Windows 11 22H2 and it worked OK. I haven't tested on Windows 10, but I assume it will work there as well.

manelrodero commented 1 year ago

Hi Aaron,

I'm going to try to replicate your configuration by changing the platform manually.

So far I have seen that it is not a problem with platform detection because it seems to work perfectly with other applications.

For example, if I change the 7-Zip app from Any to "All x64 Windows 7 and newer" it installs perfectly on Windows 11.

image

If I tell it "All x64 Windows 7 and newer" and also "All x86 Windows 7 and newer" to simulate a VC++ x86, it also installs and the x86 condition is shown as unfulfilled.

image

I think it must be something related to the management of the bundles that MDT does. It may be that, if there are inconsistencies between the applications that make it up, they are not installed individually.

I keep trying...

manelrodero commented 1 year ago

After changing the platform according to your instructions, I get the x86 (any) version to install but the x64 version still fails.

image image

In the end I only have the x86 versions installed.

image

I think I'll change all redistributables to use the "Any" platform. In my environment I only deploy Windows 10/11 in 64-bit so there will be no problem.

It bothers me a little that I don't have more time to figure out the reason for this behavior. There is no problem in closing the issue if you think it is appropriate.

aaronparker commented 1 year ago

I'll do some more tests. We'll leave the issue open until I push the new version of the module. I could add a parameter to set the platform to Any.