0
votes

Hy guys.

I have a serious problem. I'm working on a project and i need to finish it tomorrow.

The problem is that i need to get a registry value, like this:

(32 bit) HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamSpeak 3 Client

(64 bit) HKEY_LOCAL_MACHINE\SOFTWARE\TeamSpeak 3 Client

I read tons of forum topics, blogs, tutorials, and i can't find the answer. The idea is that i need to get the install path for TeamSpeak3 from registry, and for the 32bit app its stored in SOFTWARE\Wow6432Node\TeamSpeak 3 Client, but when i try to get the 64bit app path from SOFTWARE\TeamSpeak 3 Client i get the same path as the 32bit app.

I know i can bypass this by targeting 64bit CPUs. But I NEED to get the 64bit app path from HKEY_LOCAL_MACHINE\SOFTWARE\TeamSpeak 3 Client with my 32bit app.

How can i do that, in VB.NET?

Please help! Thanks...

1
First of all, note that so much bolding does not make your post clearer (right the contrary). Regarding your question, this is not a VB.NET issue, but a Windows (registry) one and thus either you are asking in the wrong site (perhaps Super User would be better) or you have included the wrong tag (should try Windows or Registry).varocarbas
Don't cross-post though, please: superuser.com/questions/695990/… — you may delete your question here. Asking on several sites at once is not allowed.slhck
Perhaps my previous comment wasn't as clear as I thought... What you are asking is a registry-related issue (nothing to do with VB.NET). Once you understand how to account for this problem, you would have to carry out the corresponding implementation in VB.NET (and, in case of having problems, you might post a new question; although note that you should try something by your own before asking). Before posting in superuser you should delete this one; alternatively, you can wait until it gets 5 closing votes and might be automatically moved there, but please don't write 2 identical posts.varocarbas
Sorry! This is the first time that i used this websites. I didn't know they are the same. My apologies.3AgL3 DeeJay

1 Answers

1
votes
Dim TS__x64 As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenBaseKey _
                                            (Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry64)
    Dim CALE_TS__x64 As String = TS__x64.OpenSubKey("SOFTWARE\TeamSpeak 3 Client").GetValue(Nothing)

    Dim TS__x32 As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenBaseKey _
                                    (Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry32)
    Dim CALE_TS__x32 As String = TS__x32.OpenSubKey("SOFTWARE\Wow6432Node\TeamSpeak 3 Client").GetValue(Nothing)


    TextBox1.Text = CALE_TS__x64
    TextBox2.Text = CALE_TS__x32