InnoSetup - Check if visual studio 2010 crt redist is installed, if not then run installer

前端 未结 3 1756
天命终不由人
天命终不由人 2021-01-03 11:07

I currently have this in this part of Inno script

[Run]
Filename: {app}\\bin\\vcredist_x86.exe; Parameters: \"/q:a /c:\"\"VCREDI~3.EXE /q:a /c:\"\"\"\"msiexe         


        
3条回答
  •  走了就别回头了
    2021-01-03 11:52

    I follow the "official" MS way https://stackoverflow.com/a/199783/866333. Not exactly gone viral yet but it works for me.

    See Inno Setup: Verify that .NET 4.0 is installed for working code to detect just one version.

    This is the best example of the code I actually use: http://www.vincenzo.net/isxkb/index.php?title=.NET_-_Detect_framework

    All the above targets the .NET framework. For VCRT I would extract the redistributable from VC2010 and have InnoSetup copy the contents over to the application's target install directory. That way system files don't get altered.

提交回复
热议问题