Reputation: 1157
I was hoping to integrate a TeamViewer button into my Web Application that allowed my users to initiate a remote connection to a pre-defined host using their local instance of TeamViewer installed on each user's computer. However, this has proposed issues and seems a lot more complicated than I first anticipated.
I have attempted to call https://start.teamviewer.com/device/<ID>/authorization/password/mode/control
from a URL and pass in the device id, which does in fact work (not seamlessly as it always opens up a new tab), however, the user is prompted everytime for their AD credentials, despite the fact that we have set pre-entered passwords on a lot of our hosts. This therefore, is a time consuming solution and not really the ideal approach.
My other thought was to try and call the command C:\Program Files (x86)\TeamViewer\TeamViewer.exe -i <ID> --Password <PASSWORD>
from some sort of chrome NativeMessaging
extension, but I can't seem to get this working.
I have created my manifest file:
{
"name": "com.mycompany.myapp",
"description": "myapp",
"path": "C:\\Program Files (x86)\\Teamviewer\\TeamViewer.exe",
"type": "stdio",
"allowed_origins": [
"chrome-extension://........cnlfdm/"
]
}
I have also created my registry entry to correspond to my manifest file above.
I then call from my onClick() function:
var port = chrome.runtime.connectNative('com.mycompany.myapp');
port.onMessage.addListener(function(msg) {
console.log("Received" + msg);
});
port.onDisconnect.addListener(function() {
console.log("Disconnected");
});
port.postMessage({ text: "Hello, my_application" });
Which gives me the error Cannot read property 'sendNativeMessage' of undefined
.
Ultimately, I am trying to allow users to click on a button which launches a remote control session to a pre-defined host and pass-through the password details (or make use of the pre-entered password details).
I should mention that I am trying to call this from an ng-click()
function within my AngularJS application, so I'm not sure if this is having some affect on the problem.
Upvotes: 0
Views: 321