Highlighted
Posted by jpsvault
Henagon

TeamViewer_Host_Setup version 13.2.5287 is creating "TeamViewer.json" and not "AssignmentData.json"

What gives? With this SaltStack script, everything happens except the assignment, where the posted error occurs:

{% if grains['os'] == 'Windows' %}
stop_teamviewer:
  service.dead:
    - name: TeamViewer

remove_previous_host:
  pkg.purged:
    - name: teamviewer-host
    
remove_previous_installation:
  pkg.removed:
    - name: teamviewer-12
    
load_teamviewer_packages:
  file.recurse:
    - name: 'C:/Users/adminW/Documents/teamviewer'
    - source: salt://packages/windows/admin/teamviewer
    - replace: True
    - required_in: install_teamviewer
    
install_teamviewer:
  pkg.installed:
    - name: teamviewer-host
    - version: 13.2.5287
    - required_in: assign_teamviewer
    
assign_teamviewer:
  cmd:
    - run
    - name: C:\Users\adminW\Documents\teamviewer\TeamViewer_Assignment.exe -apitoken {{ pillar['teamviewer_apitoken'] }} -datafile "${ProgramFiles(x86)}\TeamViewer\AssignmentData.json" -allowEasyAccess=false devicealias={{ grains['id'] }} -wait=30
{% endif %}

{% if pillar['teamviewer'] is defined
    and pillar['teamviewer'] == 'Full' %}
teamviewer_13:
  pkg.installed:
    - name: teamviewer-13
{% endif %}

start_teamviewer:
  service.running:
    - name: TeamViewer

The error when "assign_teamviewer" is attempted:

----------
          ID: assign_teamviewer
    Function: cmd.run
        Name: C:\Users\adminW\Documents\teamviewer\TeamViewer_Assignment.exe -apitoken xxx -datafile "${ProgramFiles(x86)}\TeamViewer\AssignmentData.json" -allowEasyAccess=false devicealias=yyyy -wait=30
      Result: False
     Comment: Command "C:\Users\adminW\Documents\teamviewer\TeamViewer_Assignment.exe -apitoken xxx -datafile "${ProgramFiles(x86)}\TeamViewer\AssignmentData.json" -allowEasyAccess=false devicealias=yyyy -wait=30" run
     Started: 13:35:40.796000
    Duration: 10112.0 ms
     Changes:
              ----------
              pid:
                  6508
              retcode:
                  1
              stderr:
              stdout:
                  TeamViewer_Assignment (r345)
                  ..........
                  => Assignment failed with:
                  Reading datafile 'C:\Program Files (x86)\TeamViewer\AssignmentData.json' failed with: File not found

And when I check the machine itself, there's a TeamViewer.json file, as if I'd tried installing the full version (which isn't installed, just the Host is).

1 Reply
1 Reply
Posted by jpsvault
Henagon

Re: TeamViewer_Host_Setup version 13.2.5287 is creating "TeamViewer.json" and not "AssignmentData.json&qu

Solved it myself, by reading the manual, and it's not the clearest of instructions. The relevant section is anchored in this link: https://community.teamviewer.com/t5/Knowledge-Base/Mass-deployment-improvements/ta-p/39639

In short, I changed TeamViewer_Assignment.exe straight to the C:\ ~ \TeamViewer.exe and dropped the datafile parameter.

 

(By the way, TeamViewer associates, the link anchors in the TOC of that article don't work in Chrome.

And the instructions for 13.2 are forbidden: From this link to this link:

2018-08-02 17_36_10-Window.png

)