0

I'm having trouble with installing Tableau Desktop with native installer arguments with Chocolatey. Basically, I know that Tableau Desktop .exe installer can take multiple arguments such as:

  • ACTIVATE_KEY="<activation_key>"
  • REGISTER=1 (if we want Tableau Desktop to register itself during installation)

So, i tried installing Tableau Desktop 2020.1.3 with this command:

choco install 'Tableau-Desktop' --version '2020.1.3' --yes --force --install-arguments='/ACTIVATE_KEY=""<activation_key>""'

Tableau Desktop was installed just fine but it didn't get activated. Was there anything I did wrong? I tried reading Chocolatey documentation already and it says that for install arguments, we just need to do something like this:

In PowerShell.exe, you must pass it like this: -ia '/yo=""Spaces spaces""'. No other combination will work. In PowerShell.exe if you are on version v3+, you can try --% before -ia to just pass the args through as is, which means it should not require any special

I do have another question as well around this "install arguments" in chocolatey. Basically, how would one pass multiple install arguments to chocolatey "--install-arguments" option/switch?

Thanks so much in advance!

blue2609
  • 841
  • 2
  • 10
  • 25

1 Answers1

1

Okay, so..., I got it working. Basically what happened was, I thought:

  • We always need a forward slash before speciying the install arguments to chocolatey like so:

    choco install <package_id> --install-arguments='/argument1=""someValue"" argument2=""anotherValue""'

    Turns out that this is not true. We don't need to specify any forward slash "/" before "argument1" in the PowerShell command above.

  • I also believed that we need to use a pair of double quotes ("") before and after we specify the value to an argument that we pass to the native installer like this:

    --install-arguments='/argument1=""someValue"" argument2=""anotherValue""'

    Turns out this is also incorrect. We don't have to use double quotes ("") before and after we specify a value for each argument. We just have to do it normally like how the native installer expects arguments to be passed to it.

With this knowledge, I rewrote the Tableau Desktop installation PowerShell command to:

choco install 'Tableau-Desktop' --version '2020.1.3' --yes --force --ia='ACTIVATE_KEY="<activation_key>" REGISTER=1 AUTOUPDATE=0'

This Chocolatey command executed in Powershell will:

  • install Tableau Desktop version 2020.1.3
  • It will automatically answer "yes" to all questions during chocolatey installation process.
  • It will force the installation of Tableau Desktop on the same machine which already has another Tableau Desktop version installed
  • It's going to activate this Tableau Desktop with <activation_key> at install.
  • It's going to register this Tableau Desktop automatically so system admnistrators don't have to do Tableau Desktop registration when starting the program for the first time.
  • It's going to disable the automatic "maintenance update" for all users.
blue2609
  • 841
  • 2
  • 10
  • 25