Page 1 of 2
TeamViewer and console management
Published: April 20, 2016 - 3:53 PM
by Omahaddict
Hello,
I have a Corporate license for TeamViewer 9 and I use WAPT for centralized management of my configurations.
I'm encountering a problem: I can't link the computer to the TeamViewer without user intervention. During installation, there's no issue; I can see the PC linked to my company account. However, upon restarting the machine, TeamViewer asks me for a password to install unattended access.
I created a package using an MSI file that is already customized (it automatically links to my account).
Have you ever encountered this problem? If so, how did you work around it?
Another question: by right-clicking on computers in the inventory, you can connect via VNC or RDP. Is it possible to add entries to this context menu?connectivity, Teamviewer for example, and then we have a console that centralizes everything!)
Thank you for your help and congratulations to the developers and contributors who are leading this project.
Re: TeamViewer and management from the console
Published: April 20, 2016 - 4:16 PM
by sfonteneau
Omahaddict wrote:Hello,
I have a Corporate license for TeamViewer 9 and I use WAPT for centralized management of my configurations.
I'm facing a problem: I can't link the computer to the TeamViewer without user intervention. During installation, there's no problem; I can see the PC linked to my company account. However, upon restarting the machine, TeamViewer asks me for a password to install unattended access.
I don't know
TeamViewer I'm having trouble understanding your problem, but you should ask them about the procedure for a silent installation.
Omahaddict wrote:
I created a package using an MSI file that's already customized (it automatically links to my account).
Have you ever encountered this problem? If so, how did you work around it?
How is this MSI created? It's an official procedure of
TeamViewer ?
Omahaddict wrote:
Another question: by right-clicking on computers in the inventory, you can connect via VNC or RDP. Is it possible to add entries to this context menu? (You know what I'm going with, right? Add "Connect via TeamViewer," for example, and then we'd have a console that centralizes everything!)
The Wapt source code is available on GitHub here:
https://github.com/tranquilit/WAPT
By following the procedure in README.md you can modify the console by opening the waptconsole.lpr file with codetyphon
In the uwaptconsole.pas file you can replace
ShellExecute(0, '', PAnsiChar('C:\Program Files\TightVNC\tvnviewer.exe'),
PAnsichar(ip), nil, SW_SHOW)
Because you want
I managed to add a power button the other day using this method
Omahaddict wrote:
Thank you for your help and congratulations to the developers and contributors who are leading this project.
Re: TeamViewer and management from the console
Published: April 20, 2016 - 7:50 PM
by Floflobel
Hello,
I'm facing the same problem; I can't seem to do it silently. A pop-up keeps appearing asking for permission.
I'll be following your thread closely

!
Re: TeamViewer and management from the console
Published: April 21, 2016 - 10:08 AM
by Omahaddict
Thanks Simon for the information.
I'm currently retrieving the sources. I'll look into it.
Floflobel wrote:Hello,
I'm facing the same problem; I can't seem to do it silently. I always get a pop-up asking for permission.
I'll be following your thread closely

!
OK, nothing's stopping you from continuing the investigation, right?
Are you also on V9? Are you talking about deployment via Wapt or via the classic MSI+GPO?
I'll get back to you as soon as I've looked into it a bit more.
Re: TeamViewer and management from the console
Published: April 21, 2016 - 10:50 AM
by Floflobel
Absolutely, we're still looking into it, but it's no longer our priority.
We install TeamViewer when we deploy an image to a machine. But we have to be physically present at the machine; it displays a pop-up asking us to authorize it.
Group Policy Objects (GPOs) aren't possible.
Regarding your password problem, you'll need to generate a .reg and a .msi file, like I did, but you'll be stuck in the same place...
Re: TeamViewer and management from the console
Published: April 27, 2016 - 09:58
by Omahaddict
Back after some tests and investigations.
The silent installation of
TeamViewer It works. The link to my account is working perfectly without any pop-ups.
For those interested, this requires adding the following key to the registry in addition to the information exported from the host client
Code: Select all
[HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version9\DefaultSettings]
"HostInfoDialog"=dword:00000000
However, being a beginner in Python, I can't seem to get a custom setup working...
I followed the documentation but I encountered several problems/error messages when opening the files
c:\tranquilit\wapt\waptconsole\waptconsole.lpr
And
c:\tranquilit\wapt\waptserver\postconf\waptserverpostconf.lpr

- wapt.PNG (10.42 KB) Viewed 7547 times
I chose to ignore the changes suggested by Simon (replacing VNC with the path to my executable)
TeamViewer) and launched the compilation. After the whole procedure, I managed to generate an executable with innosetup; the installation went smoothly, but when I launch the console, I get an error:

- wapt-console.PNG (8.26 KB) Viewed 7547 times
Thank you for your help.
Re: TeamViewer and management from the console
Published: April 27, 2016 - 12:02 PM
by sfonteneau
Hi for the TSOGRID
The documentation states:
Launch CodeTyphon
. Open a package file (.lpk).
Open the following packages successively and compile them:
pltis_sogrid.lpk (IDE installation required).
Did you open the package?
Otherwise, for the reference error, try right-clicking on your WaptConsole, then selecting Properties, and in Compatibility, check "Run as administrator".
Re: TeamViewer and management from the console
Published: April 27, 2016 - 1:32 PM
by Omahaddict
Okay, it works, I can successfully launch the recompiled console.
However, my
TeamViewer It's not working the way I want it to...
To initiate the connection via the command line, simply pass the argument -i %computername% or -i %ip%
Here is the modified code from uwaptconsole.pas
Code: Select all
procedure TVisWaptGUI.ActVNCExecute(Sender: TObject);
var
ip: ansistring;
begin
if (Gridhosts.FocusedRow <> nil) and
(Gridhosts.FocusedRow.S['host.connected_ips'] <> '') then
begin
ip := GetReachableIP(Gridhosts.FocusedRow['host.connected_ips'],5900);
if ip<>'' then
ShellExecute(0, '', PAnsiChar('c:\Program Files (x86)\TeamViewer\Version9\TeamViewer.exe -i'),
PAnsichar(ip), nil, SW_SHOW)
else
ShowMessage(rsNoReachableIP);
end;
end;
procedure TVisWaptGUI.ActVNCUpdate(Sender: TObject);
begin
try
ActVNC.Enabled := (Gridhosts.FocusedRow <> nil) and
(Gridhosts.FocusedRow.S['host.connected_ips'] <> '') and
FileExists('c:\Program Files (x86)\TeamViewer\Version9\TeamViewer.exe -i');
except
ActVNC.Enabled := False;
end;
end;
But I imagine the argument isn't in the right place since nothing happens (the menu is greyed out) if I don't add the -i option to my console
TeamViewer It opens correctly, though.
Subsidiary question, to replace VNC with
TeamViewer In the context menu, simply replace all VNC entries in this file with
TeamViewer ?
Re: TeamViewer and management from the console
Published: April 27, 2016 - 3:13 PM
by sfonteneau
Omahaddict wrote:Okay, it works, I can successfully launch the recompiled console.
However, my
TeamViewer It's not working the way I want it to...
To initiate the connection via the command line, simply pass the argument -i %computername% or -i %ip%
Here is the modified code from uwaptconsole.pas
Code: Select all
procedure TVisWaptGUI.ActVNCExecute(Sender: TObject);
var
ip: ansistring;
begin
if (Gridhosts.FocusedRow <> nil) and
(Gridhosts.FocusedRow.S['host.connected_ips'] <> '') then
begin
ip := GetReachableIP(Gridhosts.FocusedRow['host.connected_ips'],5900);
if ip<>'' then
ShellExecute(0, '', PAnsiChar('c:\Program Files (x86)\TeamViewer\Version9\TeamViewer.exe -i'),
PAnsichar(ip), nil, SW_SHOW)
else
ShowMessage(rsNoReachableIP);
end;
end;
procedure TVisWaptGUI.ActVNCUpdate(Sender: TObject);
begin
try
ActVNC.Enabled := (Gridhosts.FocusedRow <> nil) and
(Gridhosts.FocusedRow.S['host.connected_ips'] <> '') and
FileExists('c:\Program Files (x86)\TeamViewer\Version9\TeamViewer.exe -i');
except
ActVNC.Enabled := False;
end;
end;
But I imagine the argument isn't in the right place since nothing happens (the menu is greyed out) if I don't add the -i option to my console
TeamViewer It opens correctly, though.
I'm not very familiar with Free Pascal; I only recently discovered it while playing around with Wapt when I wanted to add my shutdown functionality. I'm just feeling my way through it
A quick internet search revealed:
http://wiki.freepascal.org/Executing_Ex...nd_WinExec
http://forum.lazarus.freepascal.org/ind ... ic=25392.0
The guy on the forum does it like this:
MyProcess.Executable := 'D:\SomeDir\abc.exe';
MyProcess.Parameters.Add('D:\SomeDir\Data\ritem.dat');
MyProcess.Execute;
If that helps...
Omahaddict wrote:
Follow-up question: to replace VNC with Teamviewer in the context menu, do I simply need to replace all the VNC entries in this file with Teamviewer ?
Rename directly using the CodeTypo interface
Re: TeamViewer and management from the console
Published: April 28, 2016 - 11:36 AM
by Omahaddict
It works!
Here is the modified code:
Code: Select all
ip := GetReachableIP(Gridhosts.FocusedRow['host.connected_ips'],5938);
if ip<>'' then
ShellExecute(0, '', PAnsiChar('c:\Program Files (x86)\Teamviewer\Version9\Teamviewer.exe'),
PAnsichar('-i' + ip), nil, SW_SHOW)
However, I am unable to rename the menus... I have an error when starting the recompiled console, it is still looking for an actvnc (which I renamed to actteamviewer).
I renamed everyone who was in uwaptconsole.pas, surely there are references elsewhere?
I didn't understand your advice:
sfonteneau wrote:
Rename directly using the codetyphon interface
Where in the console are you doing this?

- Capture.PNG (35.71 KB) Viewed 7530 times
Thanks for your advice, Simon, I've made great progress!
