What is the correct way to use the MSI installer +assignments?

Options

We are currently updating our old TeamViewer 12 to 15. For now we are stuck at giving the correct assignments to the install.

So the website (Mass deployment improvements - TeamViewer Support) suggest as an example that we do this:

-------------------------------------------------------------------------------------------------------------------------

msiexec.exe /i "D:\Install\Teamviewer\TeamViewer_Host.msi" /qn CUSTOMCONFIGID=(we filled our ID in here)

ping -n 31 127.0.0.1>nul

"C:\Program Files (x86)\TeamViewer\TeamViewer.exe" assign --api-token=(We filled our API token in here)

-------------------------------------------------------------------------------------------------------------------------

Btw the website forgets to put the "" in the second path part I think. But okay, we now want to give some assignments with the MSI installer. For example [--alias Test01 --group ""Test Room 1""]. What is the correct way to do this? We tried to put it behind the first part (so behind CUSTOMCONFIGID=). Well.. to make it short.. we tried a bunch of stuff like they suggest on the mass deployment page. We probably miss something very obvious. But maybe someone already did this and can enlighten us with his/her wisdom :)

So what we want to achieve here is that TeamViewer will be installed silently and it will connect afterwards to our TeamViewer account and puts it in an existing group (for example Test Room 1).

Second question:

It would be even more awesome if we can have a script that it looks at the computer name (for example Test01) and then names it differently in the group overview of our Teamviewer account.

So for example we have a Group called [Test Room 1], and the computer name is [Test01]. But when he adds the computer to the group [Test Room 1] we want the computer be called [Test Computer 1] in the group. So it should have a list where we can define that if computer name is Test01 it should name the teamviewer name to Test Computer 1, and Test02 to Test Computer 2, and so on.

We had these settings for TeamViewer 12 (.exe). But someone else made this for us. And now it does not work very well anymore (without us changing anything). And now we want to update the way we install TeamViewer so we can have the newest versions installed on every computer.

Answers

  • Ron_vd_Veen
    Ron_vd_Veen Posts: 5 ✭✭
    Options

    Ok, so the installation part with the assignments is ready and working. The only thing is that I now have to automate the alias of the computer. I now use --alias %COMPUTERNAME% to give him the alias. But I want it to check the computer name, and IF computer name is [Name] it should give it a specified alias.

  • JeanK
    JeanK Posts: 6,987 Community Manager 🌍
    Options

    Hello @Ron_vd_Veen,

    It is good news that your deployment/assignments is ready and working.

    Using the parameter %COMPUTERNAME% will dynamically take the computer name as an alias.

    Community Manager

  • Ron_vd_Veen
    Ron_vd_Veen Posts: 5 ✭✭
    Options

    Yes, %computername% does indeed work. So it will get the name Test01. But I want that it adds something to the name. For this example I want it to get the name "Test Computer 1" instead of the actual computer name "Test01". Maybe I should show you what we had before as a script (with TeamViewer 12). I will rename the actual names to the Test Names.

    ps. Before the installation we have a script that adds the register items Test Location 1 or 2.


    $loc = $env:computername

    $names = @{

    "Test01" = "Test Computer 1"

    "Test02" = "Test Computer 2"

    "Test03" = "Test Computer 3"

    "Test04" = "Test Computer 4"

    }

    $name = $names.$loc

    $register = (Get-ItemProperty -path "HKLM:\SOFTWARE\Test" -name Locatie).Locatie

    if($register -eq "Test Location 1"){

      $api = "************"

    }

    elseif($register -eq "Test Location 2"){

      $api = "*************"

    }

    & "D:\install\Teamviewer\Teamviewer_Assignment.exe" -apitoken $($api) -datafile "C:\Program Files (x86)\TeamViewer\AssignmentData.json" -devicealias "$($name)"


    But how can I do something like this now in the current situation where we need to use the MSI file. And we don't have Teamviewer_Assignment.exe anymore in the new TeamViewer.

  • Ron_vd_Veen
    Ron_vd_Veen Posts: 5 ✭✭
    Options

    I am now thinking of finding a script that makes a new variable. And that the script looks at the computer name (for example the Test01), and then makes a variable that will add the Test Computer 1 to its value. And then change the %computername% in the installation to the new variable.

  • Ron_vd_Veen
    Ron_vd_Veen Posts: 5 ✭✭
    Options

    I solved my problem. This post can be closed or deleted.