Tableau Reader

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

Tabreadersplash.png

About

Tableaureader.png

Use Tableau Reader to open and interact with packaged workbooks with extracted data sources that have been created in Tableau Desktop.

Obtain Package Source

Download the Tableau Reader installer. Also download the WiX Toolset.

Dependencies

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 Reader 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>

Deploy Info

Tableau Reader 2020.2 (20202.20.0614.2338)
Tableau Software
C:\Program Files\Tableau\Tableau Reader 2020.2\bin\tabreader.exe
C:\ProgramData\Package Cache\{46206116-bfc1-4cd7-a496-4d2c2576ba5c}\tableau-setup-rdr-tableau-2020-2.20.0614.2338-x64.exe /uninstall /quiet

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{46206116-bfc1-4cd7-a496-4d2c2576ba5c}
Value: DisplayVersion
DataType: Version
Data: 20.2.25203
Operator: Greater than or equal to
32-bit: Yes
SCCM Requirement: None


Tableau Reader 2020.2 (20202.20.0614.2338)

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C3CDB16C-C34D-43A3-BBB1-69857CA9B055}
Value: DisplayVersion
DataType: Version
Data: 20.2.25203
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.

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'Tableau'
[string]$appName = 'Reader'
[string]$appVersion = '20.2.25203'
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = 'R01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '22/07/2020'
[string]$appScriptAuthor = 'Nicholas J Holmes'
[string]$Parms = "/uninstall /quiet"
##*===============================================




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

## <Perform Installation tasks here>

Execute-MSI -Action 'Install' -Path 'tableau-setup-rdr-tableau-2020-2.20.0614.2338-x64.msi' -Transform 'tableau-setup-rdr-tableau-2020-2.20.0614.2338-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 Reader*" } |
			Select-Object -Property DisplayName, DisplayVersion, BundleCachePath
ForEach ($ver in $appVer)
	{
	If ($ver.BundleCachePath)
		{
		$appRemove = $ver.DisplayName
		$oldVersion = $ver.DisplayVersion
		$Uninst = $ver.BundleCachePath

		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
			}
		Else
			{Write-Log -Message "No legacy EXE installations detected." -LogType 'CMTrace'}
		}
	}

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

		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
			}
		Else
			{Write-Log -Message "No legacy MSI installations detected." -LogType 'CMTrace'}
		}
	}




##*===============================================
##* 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 Reader*" } |
			Select-Object -Property DisplayName, DisplayVersion, BundleCachePath
ForEach ($ver in $appVer)
	{
	If ($ver.BundleCachePath)
		{
		$appRemove = $ver.DisplayName
		$oldVersion = $ver.DisplayVersion
		$Uninst = $ver.BundleCachePath
		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
		{Write-Log -Message "No EXE installations detected." -LogType 'CMTrace'}
	}

# MSI Uninstall
$UninstMSI = Get-WmiObject -Class win32_product | where { $_.Name -like "*Tableau Reader*"}
If ($UninstMSI -ne $null)
	{
	ForEach ($app in $UninstMSI)
		{
		$appRemove = $app.Name
		$oldVersion = $app.Version
		$appGUID = $app.IdentifyingNumber
		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
		{Write-Log -Message "No MSI installations detected." -LogType 'CMTrace'}


Manual installation

Tableaureader01.png

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


Tableaureader02.png

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