Ronnie Overby
Ronnie Overby

Reputation: 46470

How To Determine Silverlight version on x64 machines?

According to the latest silverlight deployment guide, I can determine what version of silverlight is installed by

-Querying the: “HKLM\Software\Microsoft\Silverlight\Version” registry key

This works great on my 32 bit dev machine. But on a couple of 64 bit machines, HKLM\Software\Microsoft\Silverlight doesn't exist.

Where is it on x64 machines?

Upvotes: 0

Views: 3361

Answers (3)

chrisg
chrisg

Reputation: 41655

I know this has been answered but you can use 'RegistryKey' with .Net 4. This allow's your 32 bit program to access the 64 bit registry as it would be normally viewed on your 64 bit machine. The code:

using Microsoft.Win32;

RegistryKey registryBase = Registry.LocalMachine; // This would give you the standard Registry if you were using your own machine. Not needed for this example.

registryBase = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); // This will allow your 32 bit program to view the 64 bit registry.

RegistryKey getKey = registryBase.OpenSubKey("HKLM\Software\Microsoft\Silverlight\Version", true); // Set to true or false to allow write permissions.

getKey.SetValue("VersionKey", "0", RegistryValueKind.DWord); //Allow's you to edit the exact key type. Just change DWord etc...

Hope this is useful. I use this as sometimes you cannot view all keys required in 'Wow6432Node'.

Upvotes: 0

Hans Passant
Hans Passant

Reputation: 941347

Look in HKLM\Software\Wow6432Node, the home for registry keys that 32-bit programs can see.

Upvotes: 1

Ronnie Overby
Ronnie Overby

Reputation: 46470

Searching through my registry, I found this:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Silverlight

Can anyone confirm that this is a safe place to look?

Upvotes: 0

Related Questions