TeamViewer and console management

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Omahaddict
Messages: 15
Registration: Apr 20, 2016 - 3:15 p.m.

April 20, 2016 - 3:53 PM

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.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 20, 2016 - 4:16 PM

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.
Floflobel
Messages: 135
Registration: Oct 15, 2015 - 5:32 p.m.

April 20, 2016 - 7:50 PM

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 ;) !
Omahaddict
Messages: 15
Registration: Apr 20, 2016 - 3:15 p.m.

April 21, 2016 - 10:08 AM

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? :lol:
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.
Floflobel
Messages: 135
Registration: Oct 15, 2015 - 5:32 p.m.

April 21, 2016 - 10:50

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...
Omahaddict
Messages: 15
Registration: Apr 20, 2016 - 3:15 p.m.

April 27, 2016 - 09:58

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
wapt.PNG (10.42 KB) Viewed 7538 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
wapt-console.PNG (8.26 KB) Viewed 7538 times
Thank you for your help.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 27, 2016 - 12:02

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".
Omahaddict
Messages: 15
Registration: Apr 20, 2016 - 3:15 p.m.

April 27, 2016 - 1:32 PM

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 ?
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 27, 2016 - 3:13 PM

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
Omahaddict
Messages: 15
Registration: Apr 20, 2016 - 3:15 p.m.

April 28, 2016 - 11:36

It works! :D

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
Capture.PNG (35.71 KB) Viewed 7521 times

Thanks for your advice, Simon, I've made great progress! ;)
Locked