I am looking to deploy the host version of TeamViewer version 12 with automatic assignment to my online account.
To do this, I deploy the MSI and the TeamViewer_Settings.reg configuration file using the WAPT tool. During deployment with the WAPT service's system account, the PC is not connected to the internet (transparent proxy based on a Windows AD account). The internet is only active on the PC when a user session is open. The TeamViewer host client then establishes a connection with the TeamViewer servers on the internet and is "customized": the license is activated, and the "AssignmentData.json" file is generated in the TeamViewer directory "C:\Program Files (x86)\TeamViewer".
The TeamViewer publisher describes a procedure for assigning a PC's TeamViewer ID to a TeamViewer online account. This requires running their "TeamViewer_Assignment.exe" utility with certain arguments.
Unfortunately, the "AssignmentData.json" file is generated with very restricted attributes, only read access for the local Administrators group on the PC.
If I run the "TeamViewer_Assignment.exe" utility in the "def install()" of the wapt package, I have no internet connection -> no "AssignmentData.json" file generated, etc.
If I run the "TeamViewer_Assignment.exe" utility in the "session_setup", an administrator account must be logged in for everything to work. This is problematic because all my users are "users".
I have no knowledge of Python programming; I'm browsing community documentation and drawing inspiration from existing package templates. I've come up with a workaround to run the "TeamViewer_Assignment.exe" utility as an administrator within a user session.
Is it possible? If so, how, or do you have another method to suggest?
Thank you.
Below are the source files for my package (the "TeamViewer_Assignment.exe" utility is located in the temp directory):
Code: Select all
from setuphelpers import *
uninstallkey = []
destdir = makepath('c:\\wapt\\temp')
def install():
print('installing atr-teamviewer-host12')
copytree2('temp',destdir,onreplace=default_overwrite_older)
install_msi_if_needed('TeamViewer_Host-xxxxxxxxxx.msi',killbefore=['teamviewer.exe'])
def session_setup():
install_exe_if_needed("%s\TeamViewer_Assignment.exe" % destdir,silentflags='-apitoken 1234567-xxxxxxxxxxxxxxxxxxxx -datafile "${ProgramFiles}\TeamViewer\AssignmentData.json"',accept_returncodes=[0,1],timeout=30)
def uninstall():
print "Remove directory content %s" % destdir
remove_tree(destdir)