Page 1 of 2

[RESOLVED] Custom TeamViewer Package

Published: November 15, 2019 - 2:25 PM
by Smart
WAPT 1.7.5 - CentOS Server - Windows Server 2016 Admin Client
--------------------------------------------------------------------------------------------------------------
Good morning,
I am unable to customize my TV client so that it has the settings filled in automatically (example: Password for remote connection, linked to the company account).

Code: Select all

def install():
    print('installing test-teamviewer-14-host')
    run(r'msiexec.exe /i "TeamViewer_Host.msi" /qn APITOKEN=**** CUSTOMCONFIGID=**** ASSIGNMENTOPTIONS="--P **** --alias %COMPUTERNAME%"')
Currently, the TV is installing but without any settings...

Do you have any idea?
Sincerely

Re: Custom TeamViewer Package

Published: November 18, 2019 - 11:59 AM
by Gaetan
Hello,
have you tested the command outside of WAPT?

Re: Custom TeamViewer Package

Published: November 18, 2019 - 12:46 PM
by Smart
In CMD, the software installs without any settings. With PowerShell, it scrolls through the list of commands...

Re: Custom TeamViewer Package

Published: November 18, 2019 - 2:39 PM
by Gaetan
What is the exact command in the command prompt?

Re: Custom TeamViewer Package

Published: November 18, 2019 - 3:09 PM
by Smart

Code: Select all

msiexec.exe /i "TeamViewer_Host.msi" /qn APITOKEN=**** CUSTOMCONFIGID=**** ASSIGNMENTOPTIONS="--P **** --alias %COMPUTERNAME%"

Re: Custom TeamViewer Package

Published: November 18, 2019 - 3:23 PM
by Gaetan
I think I see the problem; I had the same issue here:
viewtopic.php?f=9&t=1925&p=6154&hilit=kaspersky#p6154

Take a look at my code, and I can comment on it in more detail if needed.
:D

Re: Custom TeamViewer Package

Published: November 18, 2019 - 4:49 PM
by Smart
Essay 1:

Code: Select all

uninstallkey = []

properties = {'APITOKEN=****','CUSTOMCONFIGID=****','ASSIGNMENTOPTIONS="--P **** --alias %COMPUTERNAME%"'}

def install():
    print('installing muller-teamviewer-14-host')
    install_msi_if_needed('TeamViewer_Host.msi', properties = properties)
Essay 2:

Code: Select all

uninstallkey = []

properties = {'APITOKEN':'****','CUSTOMCONFIGID':'****','ASSIGNMENTOPTIONS':'"--P **** --alias %COMPUTERNAME%"''}

def install():
    print('installing muller-teamviewer-14-host')
    install_msi_if_needed('TeamViewer_Host.msi', properties = properties)

I did that, but it didn't work... Thanks for the help, by the way :)

Re: Custom TeamViewer Package

Published: November 19, 2019 - 3:45 PM
by Gaetan
Good morning,

Try it like this:

Code: Select all

properties ={
            'APITOKEN':'****',
            'CUSTOMCONFIGID':'****',
            'ASSIGNMENTOPTIONS':'"--P **** --alias %COMPUTERNAME%"'
            }

def install():
    print('installing muller-teamviewer-14-host')
    install_msi_if_needed('TeamViewer_Host.msi', properties = properties)
Python is quite strict about tabs. And you had an extra single quote on your second attempt ;)

Re: Custom TeamViewer Package

Published: November 19, 2019 - 4:41 PM
by Smart
Hello,
thank you again for your help. I used your code, but it still doesn't work...
I'll try importing a .reg file of the TV settings that I've previously exported.
Regards

Re: Custom TeamViewer Package

Published: November 19, 2019 - 4:46 PM
by Gaetan
When you test it locally on the machine, does it install?