I have an Asp.NET web application. I can call and run Teamviewer in my application when running on local.
I have a class for call and run TeamViewer.
class CallTeamViewer {
public static string TeamViewerPath = "";
public static void FindTeamViewerPath () {
if (File.Exists(@"C:\Program Files\TeamViewer\Version7\teamviewer.exe")) {
TeamViewerPath = @"C:\Program Files\TeamViewer\Version7\teamviewer.exe";
}
if (File.Exists(@"C:\PROGRAM FILES (X86)\TeamViewer\Version8\teamviewer.exe")){
TeamViewerPath = @"C:\PROGRAM FILES (X86)\TeamViewer\Version8\teamviewer.exe";
}
}
public static void ConnectAndRunTeamViewer(string TamViewerId, string TeamViewerPass) {
CallTeamViewer.FindTeamViewerPath();
if(TeamViewerPath.Length > 0) {
string parameter;
parameter = " -i " + TamViewerId+ " --Password " + TeamViewerPass+ "";
System.Diagnostics.Process.Start(TeamViewerPath,parameter);
}
}
}
I have 2 textboxes and 1 button on aspx page
Connect.aspx.cs
protected void btnConnect_Click(object sender, EventArgs e) {
CallTeamViewer.ConnectAndRunTeamViewer(txtTeamviewerID.Text,txtTeamviewerPass.Text);
}
This class works on local. It can find the path of Teamviewer in my computer.
My question: How can I change my class to find path of Teamviewer of client user?