thomash2
Goto Top

Erkennung, ob VC Runtime x86 installiert ist

Hallo,

gibt es evtl eine fertige Lösung, um zu erkennen, ob die VC Runtime 32 Bit bereits installiert ist, ohne einfach prinzipiell gleich mal eine VC Runtime ohne Nachfrage drüber zu bügeln?

Fall ja, gibt es die Möglichkeit die Version zu ermitteln?

Momentan behelfe ich mir damit, zu prüfen, ob
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86\Version
existiert.

Es könnte aber auch eine ältere Version installiert, die ist bis Version 10.0 möglich.


Ich darf nach Möglichkeit nur Windows Bordmittel nutzen.

Danke

Content-ID: 1071093895

Url: https://administrator.de/contentid/1071093895

Ausgedruckt am: 25.11.2024 um 04:11 Uhr

Vision2015
Vision2015 21.07.2021 aktualisiert um 16:54:50 Uhr
Goto Top
Moin

etwa So

Frank
149062
149062 21.07.2021 um 16:54:45 Uhr
Goto Top
colinardo
colinardo 21.07.2021 aktualisiert um 17:49:54 Uhr
Goto Top
Mit der Powershell z.B. :
Get-Package | ? Name -match '^Microsoft Visual C\+\+ \d{4}' | select Name,Version  
Alternativ
Add-Type -MemberDefinition '[DllImport("msi.dll")]public static extern int MsiQueryProductState(string product);' -Name MSI -Namespace Win32  
$pcodes = [ordered]@{
    '{a49f249f-0c91-497f-86df-b2585e8e76b7}' = 'x86 	Visual Studio 2005'  
    '{6e8e85e8-ce4b-4ff5-91f7-04999c9fae6a}' = 'x64 	Visual Studio 2005'  
    '{03ed71ea-f531-4927-aabd-1c31bce8e187}' = 'IA64 	Visual Studio 2005'  
    '{c1c4f017-81cc-94c4-c8fb-1542c0981a2a}' = 'x86 	Visual Studio 2005 	6.0.2900.2180'  
    '{1af2a8da-7e60-d0b4-29d7-e6453b3d0182}' = 'x64 	Visual Studio 2005 	6.0.2900.2180'  
    '{7299052b-02a4-4627-81f2-1818da5d550d}' = 'x86 	Visual Studio 2005 	SP1'  
    '{071c9b48-7c32-4621-a0ac-3f809523288f}' = 'x64 	Visual Studio 2005 	SP1'  
    '{0f8fb34e-675e-42ed-850b-29d98c2ece08}' = 'IA64 	Visual Studio 2005 	SP1'  
    '{837b34e3-7c30-493c-8f6a-2b0f04e2912c}' = 'x86 	Visual Studio 2005 	SP1_ATL_SEC_UPD'  
    '{6ce5bae9-d3ca-4b99-891a-1dc6c118a5fc}' = 'x64 	Visual Studio 2005 	SP1_ATL_SEC_UPD'  
    '{85025851-a784-46d8-950d-05cb3ca43a13}' = 'IA64 	Visual Studio 2005 	SP1_ATL_SEC_UPD'  
    '{ff66e9f6-83e7-3a3e-af14-8de9a809a6a4}' = 'x86 	Visual Studio 2008'  
    '{350aa351-21fa-3270-8b7a-835434e766ad}' = 'x64 	Visual Studio 2008'  
    '{2b547b43-db50-3139-9ebe-37d419e0f5fa}' = 'IA64 	Visual Studio 2008'  
    '{6e815eb9-6cce-9a53-884e-7857c57002f0}' = 'x86 	Visual Studio 2008 	9.0.30729.5677'  
    '{67d6ecf5-cd5f-ba73-2b8b-22bac8de1b4d}' = 'x64 	Visual Studio 2008 	9.0.30729.5677'  
    '{9a25302d-30c0-39d9-bd6f-21e6ec160475}' = 'x86 	Visual Studio 2008 	9.0.30729.6161 	SP1'  
    '{8220eefe-38cd-377e-8595-13398d740ace}' = 'x64 	Visual Studio 2008 	9.0.30729.6161 	SP1'  
    '{5827ece1-aeb0-328e-b813-6fc68622c1f9}' = 'IA64 	Visual Studio 2008 	9.0.30729.6161 	SP1'  
    '{1f1c2dfc-2d24-3e06-bcb8-725134adf989}' = 'x86 	Visual Studio 2008 	9.0.30729.6161 	SP1_ATL_SEC_UPD'  
    '{4b6c7001-c7d6-3710-913e-5bc23fce91e6}' = 'x64 	Visual Studio 2008 	9.0.30729.6161 	SP1_ATL_SEC_UPD'  
    '{977ad349-c2a8-39dd-9273-285c08987c7b}' = 'IA64 	Visual Studio 2008 	9.0.30729.6161 	SP1_ATL_SEC_UPD'  
    '{9be518e6-ecc6-35a9-88e4-87755c07200f}' = 'x86 	Visual Studio 2008 	9.0.30729.6161 	SP1_MFC_SEC_UPD'  
    '{5fce6d76-f5dc-37ab-b2b8-22ab8cedb1d4}' = 'x64 	Visual Studio 2008 	9.0.30729.6161 	SP1_MFC_SEC_UPD'  
    '{515643d1-4e9e-342f-a75a-d1f16448dc04}' = 'IA64 	Visual Studio 2008 	9.0.30729.6161 	SP1_MFC_SEC_UPD'  
    '{196bb40d-1578-3d01-b289-befc77a11a1e}' = 'x86 	Visual Studio 2010'  
    '{da5e371c-6333-3d8a-93a4-6fd5b20bcc6e}' = 'x64 	Visual Studio 2010'  
    '{c1a35166-4301-38e9-ba67-02823ad72a1b}' = 'IA64 	Visual Studio 2010'  
    '{f0c3e5d1-1ade-321e-8167-68ef0de699a5}' = 'x86 	Visual Studio 2010 	10.0.40219 	SP1'  
    '{1d8e6291-b0d5-35ec-8441-6616f567a0f7}' = 'x64 	Visual Studio 2010 	10.0.40219 	SP1'  
    '{88c73c1c-2de5-3b01-afb8-b46ef4ab41cd}' = 'IA64 	Visual Studio 2010 	10.0.40219 	SP1'  
    '{1d5e3c0f-eda1-e123-1876-86fed06e995a}' = 'x86 	Visual Studio 2010 	10.0.40219.325'  
    '{1926e8d1-5d0b-ce53-4814-66615f760a7f}' = 'x64 	Visual Studio 2010 	10.0.40219.325'  
    '{33d1fd90-4274-48a1-9bc1-97e33d9c2d6f}' = 'x86 	Visual Studio 2012 	11.0.61030.0'  
    '{ca67548a-5ebe-413a-b50c-4b9ceb6d66c6}' = 'x64 	Visual Studio 2012 	11.0.61030.0'  
    '{bd95a8cd-1d9f-35ad-981a-3e7925026ebb}' = 'x86 	Visual Studio 2012 	11.0.61030.0 	Minimum runtime (Update 4)'  
    '{cf2bea3c-26ea-32f8-aa9b-331f7e34ba97}' = 'x64 	Visual Studio 2012 	11.0.61030.0 	Minimum runtime (Update 4)'  
    '{b175520c-86a2-35a7-8619-86dc379688b9}' = 'x86 	Visual Studio 2012 	11.0.61030.0 	Additional runtime (Update 4)'  
    '{37b8f9c7-03fb-3253-8781-2517c99d7c00}' = 'x64 	Visual Studio 2012 	11.0.61030.0 	Additional runtime (Update 4)'  
    '{f65db027-aff3-4070-886a-0d87064aabb1}' = 'x86 	Visual Studio 2013 	12.0.30501'  
    '{050d4fc8-5d48-4b8f-8972-47c82c46020f}' = 'x64 	Visual Studio 2013 	12.0.30501'  
    '{13a4ee12-23ea-3371-91ee-efb36ddfff3e}' = 'x86 	Visual Studio 2013 	12.0.30501 	Minimum runtime'  
    '{a749d8e6-b613-3be3-8f5f-045c84eba29b}' = 'x64 	Visual Studio 2013 	12.0.30501 	Minimum runtime'  
    '{f8cfeb22-a2e7-3971-9eda-4b11edefc185}' = 'x86 	Visual Studio 2013 	12.0.30501 	Additional runtime'  
    '{929fbd26-9020-399b-9a7a-751d61f0b942}' = 'x64 	Visual Studio 2013 	12.0.30501 	Additional runtime'  
    '{74d0e5db-b326-4dae-a6b2-445b9de1836e}' = 'x86 	Visual Studio 2015 	14.0.23026'  
    '{e46eca4f-393b-40df-9f49-076faf788d83}' = 'x64 	Visual Studio 2015 	14.0.23026'  
    '{a2563e55-3bec-3828-8d67-e5e8b9e8b675}' = 'x86 	Visual Studio 2015 	14.0.23026 	Minimum runtime'  
    '{0d3e9e15-de7a-300b-96f1-b4af12b96488}' = 'x64 	Visual Studio 2015 	14.0.23026 	Minimum runtime'  
    '{be960c1c-7bad-3de6-8b1a-2616fe532845}' = 'x86 	Visual Studio 2015 	14.0.23026 	Additional runtime'  
    '{bc958bd2-5dac-3862-bb1a-c1be0790438d}' = 'x64 	Visual Studio 2015 	14.0.23026 	Additional runtime'  
    '{2e085fd2-a3e4-4b39-8e10-6b8d35f55244}' = 'x86 	Visual Studio 2015 	14.0.23918.0'  
    '{dab68466-3a7d-41a8-a5cf-415e3ff8ef71}' = 'x64 	Visual Studio 2015 	14.0.23918.0'  
    '{8fd71e98-ee44-3844-9dad-9cb0bbbc603c}' = 'x86 	Visual Studio 2015 	14.0.24210'  
    '{c0b2c673-ecaa-372d-94e5-e89440d087ad}' = 'x64 	Visual Studio 2015 	14.0.24210'  
    '{bbf2ac74-720c-3cb3-8291-5e34039232fa}' = 'x86 	Visual Studio 2015 	14.0.24215 	Minimum runtime'  
    '{50a2bc33-c9cd-3bf1-a8ff-53c10a0b183c}' = 'x64 	Visual Studio 2015 	14.0.24215 	Minimum runtime'  
    '{c956892e-d1f3-3781-935c-8d9060e7cd7e}' = 'x86 	Visual Studio 2015 	14.0.24215 	Debug runtime'  
    '{406cc721-9fad-3610-b44e-3130f84358d8}' = 'x64 	Visual Studio 2015 	14.0.24215 	Debug runtime'  
    '{69bce4ac-9572-3271-a2fb-9423bda36a43}' = 'x86 	Visual Studio 2015 	14.0.24215 	Additional runtime'  
    '{ef1ec6a9-17de-3da9-b040-686a1e8a8b04}' = 'x64 	Visual Studio 2015 	14.0.24215 	Additional runtime'  
    '{e2803110-78b3-4664-a479-3611a381656a}' = 'x86 	Visual Studio 2015 	14.0.24215.1'  
    '{d992c12e-cab2-426f-bde3-fb8c53950b0d}' = 'x64 	Visual Studio 2015 	14.0.24215.1'  
    '{7d9c81d7-a921-4503-8518-38fc0c94b692}' = 'x86 	Visual Studio 2017 	14.10.24629.0-rc1'  
    '{c60f2e5a-912d-426c-a6b1-8a80bebab424}' = 'x64 	Visual Studio 2017 	14.10.24629.0-rc1'  
    '{27b6eb53-cb9c-3461-b05d-eb5210eba3d4}' = 'x86 	Visual Studio 2017 	14.10.24629 	Minimum runtime'  
    '{c8086b63-c436-3f8b-8064-ce8f27815c5f}' = 'x64 	Visual Studio 2017 	14.10.24629 	Minimum runtime'  
    '{44ec2ae5-f313-3e2a-8167-9923138ed5b4}' = 'x86 	Visual Studio 2017 	14.10.24629 	Additional runtime'  
    '{adc1b84a-d61d-3b2f-854a-8f872e51bb65}' = 'x64 	Visual Studio 2017 	14.10.24629 	Additional runtime'  
    '{c64e9a20-df31-4b11-ada1-00909eb1b508}' = 'x86 	Visual Studio 2017 	14.10.24911-rc5'  
    '{0a898fd4-a90b-46e2-8f20-46ddb3f24b6e}' = 'x64 	Visual Studio 2017 	14.10.24911-rc5'  
    '{0c1c3f23-69c2-3d3d-9865-f8b6215289cd}' = 'x86 	Visual Studio 2017 	14.10.24911-rc5 	Minimum runtime'  
    '{f0793c5b-0227-3294-91de-0385602c6cbc}' = 'x64 	Visual Studio 2017 	14.10.24911-rc5 	Minimum runtime'  
    '{568be2f1-a2b2-3705-bf3e-8e6197382a46}' = 'x86 	Visual Studio 2017 	14.10.24911-rc5 	Additional runtime'  
    '{e9a123f9-306e-3a29-88b9-5cd521d9109d}' = 'x64 	Visual Studio 2017 	14.10.24911-rc5 	Additional runtime'  
    '{3e053c90-8e3b-4a1b-ab2e-afb57d20f4b0}' = 'x86 	Visual Studio 2017 	14.10.24930-rc6'  
    '{20b93b94-495d-4022-a84f-f598998991bf}' = 'x64 	Visual Studio 2017 	14.10.24930-rc6'  
    '{984d10be-0781-3a9d-80fb-03540e0c3b42}' = 'x86 	Visual Studio 2017 	14.10.24930-rc6 	Minimum runtime'  
    '{9f50d497-02c0-3bbb-9103-bfe6204fa318}' = 'x64 	Visual Studio 2017 	14.10.24930-rc6 	Minimum runtime'  
    '{9aaeb713-d24d-37a4-8fbc-7a24739d3156}' = 'x86 	Visual Studio 2017 	14.10.24930-rc6 	Additional runtime'  
    '{a8755ee8-ad62-37fe-b106-243dc209cf52}' = 'x64 	Visual Studio 2017 	14.10.24930-rc6 	Additional runtime'  
    '{c239cea1-d49e-4e16-8e87-8c055765f7ec}' = 'x86 	Visual Studio 2017 	14.10.25008-rtm'  
    '{f1e7e313-06df-4c56-96a9-99fdfd149c51}' = 'x64 	Visual Studio 2017 	14.10.25008-rtm'  
    '{c6cda568-cd91-3ca0-9ede-dad98a13d6e1}' = 'x86 	Visual Studio 2017 	14.10.25008-rtm 	Minimum runtime'  
    '{8d50d8c6-1e3d-3bab-b2b7-a5399ea1ebd1}' = 'x64 	Visual Studio 2017 	14.10.25008-rtm 	Minimum runtime'  
    '{2f8a908c-0ccd-3bdd-9212-dc6696525139}' = 'x86 	Visual Studio 2017 	14.10.25008-rtm 	Debug runtime'  
    '{b0763af1-2b66-33b7-b6af-78e123aea826}' = 'x64 	Visual Studio 2017 	14.10.25008-rtm 	Debug runtime'  
    '{e6222d59-608c-3018-b86b-69bd241acde5}' = 'x86 	Visual Studio 2017 	14.10.25008-rtm 	Additional runtime'  
    '{c668f044-4825-330d-8f9f-3cbfc9f2ab89}' = 'x64 	Visual Studio 2017 	14.10.25008-rtm 	Additional runtime'  
    '{404c9c27-8377-4fd1-b607-7ca635db4e49}' = 'x86 	Visual Studio 2017 	14.11.25325'  
    '{6c6356fe-cbfa-4944-9bed-a9e99f45cb7a}' = 'x64 	Visual Studio 2017 	14.11.25325'  
    '{029da848-1a80-34d3-bfc1-a6447bfc8e7f}' = 'x86 	Visual Studio 2017 	14.11.25325 	Minimum runtime'  
    '{b0037450-526d-3448-a370-cacbd87769a0}' = 'x64 	Visual Studio 2017 	14.11.25325 	Minimum runtime'  
    '{568cd07e-0824-3eeb-aec1-8fd51f3c85cf}' = 'x86 	Visual Studio 2017 	14.11.25325 	Additional runtime'  
    '{b13b3e11-1555-353f-a63a-8933ee104fbd}' = 'x64 	Visual Studio 2017 	14.11.25325 	Additional runtime'  
    '{e2ee15e2-a480-4bc5-bfb7-e9803d1d9823}' = 'x64 	Visual Studio 2017 	14.12.25810'  
    '{56e11d69-7cc9-40a5-a4f9-8f6190c4d84d}' = 'x86 	Visual Studio 2017 	14.12.25810'  
    '{2cd849a7-86a1-34a6-b8f9-d72f5b21a9ae}' = 'x64 	Visual Studio 2017 	14.12.25810 	Additional Runtime'  
    '{7fed75a1-600c-394b-8376-712e2a8861f2}' = 'x86 	Visual Studio 2017 	14.12.25810 	Additional Runtime'  
    '{c99e2adc-0347-336e-a603-f1992b09d582}' = 'x64 	Visual Studio 2017 	14.12.25810 	Minimum runtime'  
    '{828952eb-5572-3666-8ca9-000b6ce79350}' = 'x86 	Visual Studio 2017 	14.12.25810 	Minimum runtime'  
    '{03EBF679-E886-38AD-8E70-28658449F7F9}' = 'x64 	Visual Studio 2017 	14.14.26429 	Minimum Runtime'  
    '{7753EC39-3039-3629-98BE-447C5D869C09}' = 'x86 	Visual Studio 2017 	14.14.26429 	Minimum Runtime'  
    '{B12F584A-DE7A-3EE3-8EC4-8A64DBC0F2A7}' = 'x64 	Visual Studio 2017 	14.14.26429 	Additional Runtime'  
    '{6F0267F3-7467-350D-A8C8-33B72E3658D8}' = 'x86 	Visual Studio 2017 	14.14.26429 	Additional Runtime'  
    '{4b2f3795-f407-415e-88d5-8c8ab322909d}' = 'x64     Visual Studio 2019      14.29.30037.0'  
    '{dfea0fad-88b2-4a1f-8536-3f8f9391f4ef}' = 'x86     Visual Studio 2019      14.29.30037.0'  
}

$pcodes.GetEnumerator() | ?{[Win32.MSI]::MsiQueryProductState($_.Key) -in (3,5)} | select -Expand Value
Vollständigkeit der Product-Codes ohne Gewähr (Hab ich nur aus meiner Script-Kiste gekramt) .

Grüße Uwe