Download and install latest Tablacus Explorer

In all of my current EUC deployments, I install Tablacus Explorer as an alternative to explorer.exe for use as a published application. This is an evergreen PowerShell script, that downloads and installs the latest version.

Tablacus Explorer

In one of my past articles I presented Tablacus Explorer as an replacement for explorer.exe in Citrix Virtual Apps und Desktops (formerly XenApp) as a published application. With automation more and more being mandatory in IT projects, I needed a way to install Tablacus Explorer evergreen with PowerShell each and every time I deploy it to Windows Clients, RDSH, Citrix virtual apps or desktops or in MDT Task sequences. Once again I used one of Trond Eric Haavarstein example scripts and altered it to fit my needs. Here are the results.

# Tablacus Explorer modifications made by Marco Hofmann 2019 (https://www.meinekleinefarm.net/download-and-install-latest-tablacus-explorer)

<#
PowerShell Wrapper for MDT, Standalone and Chocolatey Installation - (C)2015 xenappblog.com 
Example 1: Start-Process "XenDesktopServerSetup.exe" -ArgumentList $unattendedArgs -Wait -Passthru
Example 2 Powershell: Start-Process powershell.exe -ExecutionPolicy bypass -file $Destination
Example 3 EXE (Always use ' '):
$UnattendedArgs='/qn'
(Start-Process "$PackageName.$InstallerType" $UnattendedArgs -Wait -Passthru).ExitCode
Example 4 MSI (Always use " "):
$UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 /qn /liewa $LogApp"
(Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode
#>

Clear-Host
Write-Verbose "Setting Arguments" -Verbose
$StartDTM = (Get-Date)

# Tablacus specific commands
# Ensures that Invoke-WebRequest uses TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$te = Invoke-WebRequest 'https://api.github.com/repos/tablacus/tablacusexplorer/releases/latest' | ConvertFrom-Json
$url = "https://tablacus.github.io/TablacusExplorerAddons/te/te.zip"

$Vendor = "Misc"
$Product = "TablacusExplorer"
$PackageName = "te"
$Version = $te.tag_name
$InstallerType = "zip"
$Source = "$PackageName" + "." + "$InstallerType"
$LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log"
$LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log"
$Destination = "${env:programfiles}" + "\$Product\"
#$UnattendedArgs = '/VERYSILENT /SUPPRESSMESSAGEBOXES /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /NORESTART'
#$UnattendedArgs = '/SP- /VERYSILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS /NORESTART'
$ProgressPreference = 'SilentlyContinue'

Start-Transcript $LogPS

if ( -Not (Test-Path -Path $Version ) ) {
    New-Item -ItemType directory -Path $Version
}

Set-Location $Version

Write-Verbose "Downloading $Vendor $Product $Version" -Verbose
If (!(Test-Path -Path $Source)) {
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    Invoke-WebRequest -Uri $url -OutFile $Source
    }
    Else {
            Write-Verbose "File exists. Skipping Download." -Verbose
    }

Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose
if (Get-Process 'te64.exe' -ea SilentlyContinue) {Stop-Process -processname te64.exe}
Expand-Archive -Path $Source -DestinationPath $Destination

Write-Verbose "Customization" -Verbose

Write-Verbose "Stop logging" -Verbose
$EndDTM = (Get-Date)
Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose
Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose
Stop-Transcript

The latest version of this script can always be found over at my GitHub repository, check it out:
https://github.com/xenadmin/applications

Author: Marco

Marco is an IT-System administrator and IT-Consultant with 10+ years experience. He is specialized in the delivery of virtual Apps and Desktops with Citrix solutions. In 2017 he has been awarded Citrix Technology Advocate by Citrix for his community work (#CTA). His second core area is availability & performance monitoring with Zabbix, a leading open-source solution. His employer is the German IT-Company ANAXCO, which is developing a Transport Management Software (TMS) based on Microsoft Dynamics AX. More about Marco

2 thoughts on “Download and install latest Tablacus Explorer”

  1. Is there any way to publish the app so every time it launces its Vanilla? I am finding that it just remembers everything the user opened in tabs and if the user re-opens the explorer, we want it to default back to a specific starting point. (that we publish) I have tried disabling the Remember Addon however this did not seem to help.

    Any thoughts?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.