Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7179163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:05:06+00:00 2026-05-28T17:05:06+00:00

In my application people can connect to a remote computer with the use of

  • 0

In my application people can connect to a remote computer with the use of teamviewer. People can select there name and click connect, the teamviewer app will start with the correct parameters and a teamviewer session is started.

There is only one issue, how can i get the path where teamviewer is installed.

I thought i could use the registry to get the path, so i wrote this code.

Dim regKey As RegistryKey
    regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\TeamViewer\Version7", True)
    TeamViewerPath = regKey.GetValue("InstallationDirectory", AccessibleDescription)

It works perfect, it will get the correct path where teamviewer is installed, but this is only working for 64 bit Windows 7. How could i make this work for Windows XP 32 Bit and Windows 7 32 Bit.

EDIT : Wrote the following code and it works, it is probably not the best or cleanest way but it does the trick.

Dim regKeyW7 As RegistryKey
    Dim regKeyWXP As RegistryKey
    Dim TeamViewerPath As String
    regKeyW7 = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\TeamViewer\Version7", True)
    If regKeyW7 Is Nothing Then
        regKeyWXP = Registry.LocalMachine.OpenSubKey("SOFTWARE\TeamViewer\Version7", True)
        TeamViewerPath = regKeyWXP.GetValue("InstallationDirectory", AccessibleDescription)
        Label21.Text = "Windows XP"
    Else
        TeamViewerPath = regKeyW7.GetValue("InstallationDirectory", AccessibleDescription)
        Label21.Text = "Windows 7"
    End If
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:05:07+00:00Added an answer on May 28, 2026 at 5:05 pm

    The key you are using (Wow6432Node) is a reflector; it is a view of the registry for 32bit applications that run on a 64bit OS. This key will not exist on 32bit systems and your OpenSubKey(“SOFTWARE\Wow6432Node\TeamViewer\Version7”, True) may throw an exception.

    See: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724072(v=vs.85).aspx

    If you feel you must take this approach to reading the InstallationDirectory out, I would recommend setting your executable’s build platform to x86 and accessing the key via SOFTWARE\TeamViewer\Version7 removing the need for your check. When the platform is set to x86, the application will ALWAYS read from the 32bit hive of the registry, even if it is running on an x64 system. Windows will take care of doing the lookup for you under the Wow6432Node automatically.

    My guess is that your target platform is set to ‘Any CPU’ which basically means that the application will use the executing platform (at runtime) to determine where the location for SOFTWARE\TeamViewer\Version7 really comes from. In this scenario, when your application runs on a 64 bit system, the OpenSubKey(“SOFTWARE\TeamViewer\Version7”) will look in the 64bit version of the registry (thus not finding the key, and falling into your else condition). When the application is run on a 32bit system using OpenSubKey(“SOFTWARE\TeamViewer\Version7”) it will indeed find the value because there is no 64bit version of the registry.

    For a good discussion of ‘Any CPU’ and x86 see:

    http://blogs.msdn.com/b/rmbyers/archive/2009/06/09/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can people give me examples of why they would use coreData in an application?
My website/application is in ASP.NET. I use the traditional Session object when people connect
I have an application where people can give a phone number and it will
In a php/mysql application where people can registre, is it a good idea to
Say you're coding some kind of web application. Something where people can contribute content,
I'm developing application that can be useful only in my country(Ukraine). In Ukraine people
I have a database client application. Some people will run multiple instances (i.e. processes)
I'm looking for a method to see how often people use my application and
Well lately I'm making a script application. People can post and share stuff (let's
I'm currently writing some intranet web application where people could submit to admins requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.