How can I programmatically identify whether MS Chart Controls for .net v3.5 SP1 are installed (for inclusion in an Inno Setup script)?

StackOverflow https://stackoverflow.com/questions/19791078

Question

I have an application which uses MS Chart Controls for .net v3.5 SP1 and as part of the installer, I currently include the chart controls and install them every time the installer runs.

That feels a bit crude though so I'd like to detect whether the controls are installed (I already have some code that does that for .net via detecting registry entries). Is there some standard registry entries I can check for?

Was it helpful?

Solution

Some searching around in the registry suggests that under 32-bit windows there should be the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Chart Setup\NDP\v3.5\Version

On 64-bit Windows there is an equivalent key here:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Chart Setup\NDP\v3.5\Version

On several systems (with .net 3.5 SP1 and chart controls installed) that value reads 3.5.30730.0 so that seems like a reasonable place to start.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top