how to start teamviewer session on the basis of teamviewerid in asp.net

对着背影说爱祢 提交于 2019-12-06 03:25:41

In ASP.NET you could generate something like a grid, with a list of computers, TeamViewer IDs and a "Connect" button.

This button should just open a browser tab to the following URL: teamviewer8://remotecontrol?connectcc=12345

  • Replace 12345 for the "BuddyID" that is related to the TeamViewerID of the computer that you want to connect to.
  • TeamViewer 8.1 or higher should be installed in your machine.
  • You have to be locally logged in your TeamViewer account to the remotecontrol command to work.

How to create a TeamViewer account: https://login.teamviewer.com

More info about using the API here. https://integrate.teamviewer.com/en/index.aspx

Maiko Kingma

If you have Teamviewer installed on the your local pc you can use this method. In this example tbID is a textbox in which the user types the Teamviewer ID and tbPassword is a textbox in which the user types the Teamviewer Password.

private const string path = @"C:\Program Files(x86)\TeamViewer\TeamViewer.exe";

private const string arguments = " -i {0} --Password {1}";

public TeamViewerDialog()
{
    InitializeComponent();
}

private void btnGo_Click(object sender, EventArgs e)
{
    if (!tbID.Text.Equals(string.Empty) && !tbPassword.Text.Equals(string.Empty))
    {
        System.Diagnostics.Process.Start(path, string.Format(arguments, tbID.Text, tbPassword.Text));
        Close();
    }
}

This example starts TeamViewer with arguments containing a TeamviewerID and password. If the password and ID are correct Teamviewer will immediately start a new session. I tested the example with teamviewer10. If there was already a teamviewer instance running this wil not create a seccond instance but use the existing one.

Documentation about the start parameters can be found here: https://www.teamviewer.com/en/help/91-Are-there-parameters-to-start-TeamViewer

In the case of asp.net you might want to check the last 2 pages of the TeamViewer Api documentation which contain URL's to connect teamviewer. This documentation can be found here: https://www.teamviewer.com/en/for-developers/teamviewer-api/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!