Tableau Desktop Plus Prep

From psadt | Evergreen Application Management
Jump to navigation Jump to search

Tableausplash.png

About

Tableaudesktop.png Tableauprep.jpg

Tableau Desktop is data visualization software that lets you see and understand data. Tableau Prep is designed to help everyone quickly and confidently combine, shape, and clean their data for analysis.

In more than one organisation I hve been asked to package both of these applications as one suite, hence the joint package. Usually the combined suite is referred to by an internally known name, for example, Tableau Pro, Tableau Creator or simply Tableau.

I was also tasked with the requirement of detecting and removing legacy versions of Tableau Reader, since it was deemed not required for users with the full suite. If the latest version of Reader exists however, it is not removed. The Uninstall function will not remove Reader at all.

Obtain Package Source

Download the Tableau Desktop installer. Download the Tableau Prep installer. Also download the WiX Toolset.

Dependencies

Amazon Redshift ODBC Driver 64-bit 1.4.10.1000

Microsoft ODBC Driver 17 for SQL Server 17.1.0.1

PostgreSQL ODBC Driver 09.06.0503

Microsoft Visual C++ 2013 Redistributable (x64) 12.0.40649.5

Microsoft Visual C++ 2017 Redistributable (x64) 14.15.26706.0

Extract Component MSI file from EXE wrapper

These products are packaged with the WiX installer, and are essentially an exe wrapper for the MSIs. While the exe can be run with a silent switch, it sometimes fails depending on the environment. This is because it includes the prerequisites of Microsoft Visual C++ 2013 and 2017 (x64). If the target machine already has a version of these, the prerequisites fail, and Tableau is not installed.

For this reason, the vendor-supplied workaround is to extract the component MSIs. The dependencies should be handled via Endpoint Manager.

Install WiX Toolset

Wix01.png

Extract the MSIs by running the following command from the WiX installation directory:

"C:\Program Files (x86)\WiX Toolset v3.11\bin\Dark.exe" <path to EXE installer> -x <output folder>

Create MSI Transforms

Transform files are used to make changes to the install without altering the vendor-provided installer. In this case they are used to:

  • Ensure the software is installed for all the users on a given device
  • Ensure the software installs to C: drive
  • Accept the End User License Agreement (EULA)
  • Suppress Reboots
  • Suppress the creation of Desktop shortcuts
  • Suppress the Auto-Update feature (since we want to manage all updates to the software and maintain a standard version for our organisation)
  • Suppress the launch of the software post-install

Specific settings used are as follows and were updated in the Properties Table:

All MSIs

  • ALLUSERS=1
  • ROOTDRIVE=C:\
  • REBOOT=ReallySuppress

Tableau Desktop

  • IAgree=Yes
  • LAUNCHPRODUCT=0
  • DESKTOPSHORTCUT=0
  • DESKTOPSHORTCUT2=0
  • AUTOUPDATE=0
  • AUTOUPDATE2=0
  • ACCEPTEULA=1
  • ARPNOMODIFY=1

Tableau Prep

  • IAgree=Yes
  • LAUNCHPRODUCT=0
  • DESKTOPSHORTCUT=0
  • DESKTOPSHORTCUT2=0
  • AUTOUPDATE=0
  • AUTOUPDATE2=0
  • SHOWLAUNCH=0
  • ACCEPTEULA=1
  • MSIFASTINSTALL=1
  • ARPNOMODIFY=1

Deploy Info

Tableau 2020.2 (20202.20.0614.2338)
Tableau Software
C:\Program Files\Tableau\Tableau 2020.2\bin\tableau.exe
C:\ProgramData\Package Cache\{06b3a5e6-5fb2-4be1-b9a3-4fb4579d7a47}\tableau-setup-std-tableau-2020-2.20.0614.2338-x64.exe /uninstall /quiet

Tableau 2020.2 also contains Tableau Prep 2020.2.
Self-Service business analytics and data visualization software. Connects to flat files (e.g. Excel, CSV) and databases to explore and visualise data without the need for complicated coding.

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{06b3a5e6-5fb2-4be1-b9a3-4fb4579d7a47}
Value: DisplayVersion
DataType: Version
Data: 20.2.25203
Operator: Greater than or equal to
32-bit: Yes
SCCM Requirement: None


Tableau Prep Builder 2020.2 (20.23.20.0618.1709)
C:\Program Files\Tableau\Tableau Prep Builder 2020.2\Tableau Prep Builder.exe
C:\ProgramData\Package Cache\{ac8c1d70-8268-43db-9757-afdb71300afd}\tableau-setup-prep-maestro-2020-2.20.23.20.0618.1709-x64.exe /uninstall /quiet

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ac8c1d70-8268-43db-9757-afdb71300afd}
Value: DisplayVersion
DataType: Version
Data: 20.23.6989
Operator: Greater than or equal to
32-bit: Yes
SCCM Requirement: None


Tableau 2020.2 (20202.20.0614.2338)

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{76106BC3-8B70-441F-98CE-D448FCEAFD18}
Value: DisplayVersion
DataType: Version
Data: 20.2.25203
Operator: Greater than or equal to
32-bit: No
SCCM Requirement: None


Tableau Prep Builder 2020.2 (20.23.20.0618.1709)

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BDD3EB13-756E-4D4C-978B-7139CDFB6C61}
Value: DisplayVersion
DataType: Version
Data: 20.23.6989
Operator: Greater than or equal to
32-bit: No
SCCM Requirement: None


Amazon Redshift ODBC Driver 64-bit

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{960BF695-03D5-48CF-9DC2-6AC5800C4FBE}
Value: DisplayVersion
DataType: Version
Data: 1.4.10.1000
Operator: Greater than or equal to
32-bit: No
SCCM Requirement: None


Microsoft ODBC Driver 17 for SQL Server

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5F9345E2-76B2-4639-AD3B-DB2ABC716930}
Value: DisplayVersion
DataType: Version
Data: 17.1.0.1
Operator: Greater than or equal to
32-bit: No
SCCM Requirement: None


psqlODBC_x64

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{44AE3C14-2646-4ECB-904E-5C0504913242}
Value: DisplayVersion
DataType: Version
Data: 09.06.0503
Operator: Greater than or equal to
32-bit: No
SCCM Requirement: None

Deploy-Application.ps1

The script contains logic to detect and uninstall any legacy version it encounters and logs the version number. The installer is unusual in that the legacy version must be removed after the new version is installed, to avoid breaking a previously activated product.

Only the relevant parts of the script are included.

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Tableau'
[string]$appName = 'Tableau'
[string]$appVersion = '20.2.25203'
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = 'R01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '24/07/2020'
[string]$appScriptAuthor = 'psadt.com'
[string]$Parms = "/uninstall /quiet"
##*===============================================




##*===============================================
##* INSTALLATION 
##*===============================================

## <Perform Installation tasks here>

# Install Amazon Redshift ODBC Driver
Execute-MSI -Action 'Install' -Path 'Amazon_RedshiftODBCdriver_1.4.10.1000_R01.msi' -Transform 'Amazon_RedshiftODBCdriver_1.4.10.1000_R01.mst' -PassThru -ContinueOnError $false

# Install Microsoft ODBC Driver for SQL Server
Execute-MSI -Action 'Install' -Path 'Microsoft_ODBCDriverforSQLserver_17.1.0.1_R01.msi' -Transform 'Microsoft_ODBCDriverforSQLserver_17.1.0.1_R01.mst' -PassThru -ContinueOnError $false

# Install PostgreSQL ODBC Driver
Execute-MSI -Action 'Install' -Path 'PostgreSQL_ODBCdriver_09.06.0503_R01.msi' -Transform 'PostgreSQL_ODBCdriver_09.06.0503_R01.mst' -PassThru -ContinueOnError $false

# Install Tableau Desktop
Execute-MSI -Action 'Install' -Path 'tableau-setup-std-tableau-2020-2.20.0614.2338-x64.msi' -Transform 'tableau-setup-std-tableau-2020-2.20.0614.2338-x64.mst' -PassThru -ContinueOnError $false

# Install Tableau Prep
Execute-MSI -Action 'Install' -Path 'tableau-setup-prep-maestro-2020-2.20.23.20.0618.1709-x64.msi' -Transform 'tableau-setup-prep-maestro-2020-2.20.23.20.0618.1709-x64.mst' -PassThru -ContinueOnError $false




##*===============================================
##* POST-INSTALLATION
##*===============================================

## <Perform Post-Installation tasks here>

# Remove legacy versions if exist (Note: Must be done post-install to avoid removing activation)

# EXE Uninstall
$appVer = Get-ChildItem -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" |
	Get-ItemProperty |
		Where-Object {$_.DisplayName -like "*Tableau*" } |
			Select-Object -Property DisplayName, DisplayVersion, BundleCachePath
ForEach ($ver in $appVer)
	{
	If ($ver.BundleCachePath)
		{
		$appRemove = $ver.DisplayName
		$oldVersion = $ver.DisplayVersion
		$Uninst = $ver.BundleCachePath

		If ($appRemove -like "*Tableau Prep*")
			{
			If ($oldVersion -ne "20.23.6989")
				{
				Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace'
				Write-Log -Message "Executing `"$Uninst`" $Parms" -LogType 'CMTrace'
				Start-Process $Uninst -ArgumentList $Parms -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
				}
			}
		Else
			{					
			If ($oldVersion -ne $appVersion)
				{
				Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace'
				Write-Log -Message "Executing `"$Uninst`" $Parms" -LogType 'CMTrace'
				Start-Process $Uninst -ArgumentList $Parms -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
				}
			}
		}
	}

# MSI Uninstall
$UninstMSI = Get-WmiObject -Class win32_product | where { $_.Name -like "*Tableau*"}
If ($UninstMSI -ne $null)
	{
	ForEach ($app in $UninstMSI)
		{
		$appRemove = $app.Name
		$oldVersion = $app.Version
		$appGUID = $app.IdentifyingNumber

		If ($appRemove -like "*Tableau Prep*")
			{
			If ($oldVersion -ne "20.23.6989")
				{
				Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace'
				Write-Log -Message "Executing MsiExec.exe /x $appGUID /qn REBOOT=R /l*v `"$env:ProgramData\Logs\$appRemove $oldVersion MSI Uninstall.log`"" -LogType 'CMTrace'
				Start-Process -FilePath MsiExec.exe -ArgumentList "/x $appGUID /qn REBOOT=R /l*v `"$env:ProgramData\Logs\$appRemove $oldVersion MSI Uninstall.log`"" -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
				}
			}
		Else
			{					
			If ($oldVersion -ne $appVersion)
				{
				Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace'
				Write-Log -Message "Executing MsiExec.exe /x $appGUID /qn REBOOT=R /l*v `"$env:ProgramData\Logs\$appRemove $oldVersion MSI Uninstall.log`"" -LogType 'CMTrace'
				Start-Process -FilePath MsiExec.exe -ArgumentList "/x $appGUID /qn REBOOT=R /l*v `"$env:ProgramData\Logs\$appRemove $oldVersion MSI Uninstall.log`"" -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
				}
			}
		}
	}




##*===============================================
##* UNINSTALLATION
##*===============================================

# <Perform Uninstallation tasks here>

# Uninstall any and all versions if exist

# EXE Uninstall
$appVer = Get-ChildItem -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" |
	Get-ItemProperty |
		Where-Object {$_.DisplayName -like "*Tableau*" } |
			Select-Object -Property DisplayName, DisplayVersion, BundleCachePath
ForEach ($ver in $appVer)
	{
	If ($ver.BundleCachePath)
		{
		$appRemove = $ver.DisplayName
		$oldVersion = $ver.DisplayVersion
		$Uninst = $ver.BundleCachePath

		# Exclude Tableau Reader from Uninstall
		If ($appRemove -like "*Tableau Reader*")
			{Write-Log -Message "Ignoring $appRemove $oldVersion" -LogType 'CMTrace'}
		Else
			{
			# Uninstall
			Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace'
			Write-Log -Message "Executing `"$Uninst`" $Parms" -LogType 'CMTrace'
			Start-Process $Uninst -ArgumentList $Parms -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
			}
		}
	}

# MSI Uninstall
$UninstMSI = Get-WmiObject -Class win32_product | where { $_.Name -like "*Tableau*"}
If ($UninstMSI -ne $null)
	{
	ForEach ($app in $UninstMSI)
		{
		$appRemove = $app.Name
		$oldVersion = $app.Version
		$appGUID = $app.IdentifyingNumber

		If ($appRemove -like "*Tableau Reader*")
			{Write-Log -Message "Ignoring $appRemove $oldVersion" -LogType 'CMTrace'}
		Else
			{
			# Uninstall
			Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace'
			Write-Log -Message "Executing MsiExec.exe /x $appGUID /qn REBOOT=R /l*v `"$env:ProgramData\Logs\$appRemove $oldVersion MSI Uninstall.log`"" -LogType 'CMTrace'
			Start-Process -FilePath MsiExec.exe -ArgumentList "/x $appGUID /qn REBOOT=R /l*v `"$env:ProgramData\Logs\$appRemove $oldVersion MSI Uninstall.log`"" -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
			}
		}
	}


Manual installation | Tableau Desktop

Tableaudesktop01.png

Tick I have read and accept the terms of the license agreement

Tick Don't send product usage data

Click Install


Tableaudesktop02.png

Monitor installation and allow it to finish. The installer will automatically exit upon completion.


Manual installation | Tableau Prep

Tableauprep01.png

Tick I have read and accept the terms of the license agreement

Tick Don't send product usage data

Click Install


Tableauprep02.png

Monitor installation and allow it to finish


Tableauprep03.png

Click Close