teamviewer.com link icon
or
Ask The Community

TeamViewer is one of the winners of the European Customer Centricity Award 🥳


Please find more information here.

MSI Assignment Option with %computername% does not work

I have tried various options to install TeamViewer using MSI with the option to use the computername, and none have worked.

Here are the command that should work according to TeamViewer:

msiexec.exe /i "\\MyDomain\MyPath\TeamViewer_Host.msi" /qn APITOKEN=<YOUR_APITOKEN> ASSIGNMENTOPTIONS="--alias %COMPUTERNAME%"

 

This command works:

msiexec.exe /i "\\MyDomain\MyPath\TeamViewer_Host.msi" /qn APITOKEN=<YOUR_APITOKEN> ASSIGNMENTOPTIONS="grant-easy-access"

 

I have also tried many variations with quotes.  It seems to be an issue with the the space after "--alias ".

Any help would be appreciated.

 

Best Answer

Answers

  • ITjake
    ITjake Posts: 2 ✭✭

    based on the manual they posted, you're supposed to use 'single quotation marks' when youre adding names with spaces inside of the "argument". Please try copy pasting the following:

    start msiexec /i "\\MyDomain\MyPath\TeamViewer_Host.msi" /qn CUSTOMCONFIGID=<MYConfigID> APITOKEN=<MYToken> IMPORTREGFILE=1 ASSIGNMENTOPTIONS="--reassign --alias "'%COMPUTERNAME%'" --group "'MyGroup'" --grant-easy-access"

  • In PowerShell you need to use $env:COMPUTERNAME instead of %COMPUTERNAME% for the variable. You may also use the Start-Process cmdlet to execute MSIEXEC and pass all the options to it using the -ArgumentList parameter. Finally, try using the backtick character (` on the tilde key for US QWERTY keyboards) to escape the quotation marks in strings for PowerShell..

    Example:

    start-process -Wait msiexec -ArgumentList "/i `"\\MyDomain\MyPath\TeamViewer_Host.msi`" /qn CUSTOMCONFIGID=<MYConfigID> APITOKEN=<MYToken> IMPORTREGFILE=1 ASSIGNMENTOPTIONS=`"--reassign --alias `"$env:COMPUTERNAME`" --group `"MyGroup`" --grant-easy-access"