Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

Unattended Installation scripts XenDesktop 7.x Part 4

In the earlier articles I wrote down how to install unattended the XenDesktop components. The article was based on the versions of XenDesktop 7.6 till XenDesktop 7.8 (dependent of the article). Currently Citrix is releasing every quarter a new version, so it’s time to update the articles with the new installation information of later release(s) based on XenDesktop/XenApp 7.9 and XenDesktop/XenApp 7.11.

XenDesktop 7.9 Delivery Controller

All components require .Net Framework 4.5.2. This will be installed automatically while running the installers, but it requires a reboot during the XenDesktop installation. So we need to ensure this software is already available before starting the XD 7.9 installers. The simplest command is NDP452-KB2901907-x86-x64-AllOS-ENU.exe /passive /norestart. However remember that the machine needs to be restarted before the XenDesktop installation executable is started.

In part 1 I described the check on the registry key $DCUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citrix Desktop Delivery Controller", which was available for XD7.6 and XD7.7. This key still applies to XD7.8 and XD7.9. However I got the request if you can check which version is actually installed, so the script could be used for updates as well. This is not that difficult as within this key the version is also added as a value Displayversion. Let’s add this to the script. The basis variable can be the same so we declare this at the variable part (I will only show the related components). To make the script flexible we will define another variable called $XDVersion where we manually add the version number as the value. For a XenDesktop 7.9 controller the value is 7.9.0.101.

#Define Variables
#---------------------------------
$DCUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citrix Desktop Delivery Controller” $XDVersion=”7.9.0.101”

Next thing we need to change is the check if the software is already installed. For this part we first check if the key exists for new installations and if the key already exists the next check is the version number. If the version as defined at the variable is the same, the installation will exit (as the Delivery Controller has already that version of the script).

#Pre-Checking Delivery Controller software is already installed #---------------------------------

If ((Test-Path -path "$DCUninstall") -ne $True)                
{ Write-Host "The checked uninstall key $DCUninstall does not exit. Delivery Controller software is not yet installed, software will be installed."}                
else                
{Write-Host "Uninstall Delivery Controller Key defined as $DirectorUninstall found. Check if the version is already installed or the software should be upgrade."                
$var=Get-Itemproperty "$DCUninstall"                
if ($var.Displayversion -ne "$XDVersion")                
{write-host "Another Delivery Controller version is installed. Software will try to update this version" }                
else                
{write-host "Version $XDVersion is already installed. Installation will be cancelled" -ForegroundColor Yellow
                Exit} }

The last step is the check after the actual installation process to see if the installation actually succeeded. This again can be done using the $XDVersion variable. 

#Checking Delivery Controller software installation is successful #---------------------------------

Write-Host "Checking Delivery Controller software installation is succesful"

$var=Get-Itemproperty "$DCUninstall"                
if ($var.Displayversion -ne "$XDVersion")                
{write-host "$XDVersion not found. Installation failed." -ForegroundColor Red}                
else                
{write-host "Version $XDVersion found. Installation succesful." -ForegroundColor Green}

 

XenDesktop 7.11 Delivery Controller

Citrix did not change anything about the Delivery Controller registration within the uninstall key for the Delivery Controller of XenDesktop 7.11. The script changed described for XenDesktop 7.9 can also be used for XenDesktop 7.11. The version added to the registry is 7.11.0.86. So this version should be defined at the variable XDVersion. The other two parts do not change.

#Define Variables
#---------------------------------
$DCUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Citrix Desktop Delivery Controller” $XDVersion=”7.11.0.86”

XenDesktop VDA 7.9 and 7.11

For the VDA it’s pretty simple again. Just as with the earlier releases a new GUID is added to the uninstall key. For de XenDesktop/XenApp 7.9 VDA the key is {1D89A3CD-DA95-45E4-8CF9-DEE16930B085}.

$VDAUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1D89A3CD-DA95-45E4-8CF9-DEE16930B085}

Using the just released (September 2016) XenDesktop/XenApp 7.11 VDA the key is {24D6470C-EE0D-4E59-9C53-B27A86713DE8}.

$VDAUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{24D6470C-EE0D-4E59-9C53-B27A86713DE8}

PVS Target Device 7.9 and 7.11

Together with XenDesktop 7.9, also PVS 7.9 is released. Just as the VDA for the PVS Target Device you only need to change the GUID in which the PVS Target Device 7.9 software uninstall key is added. For PVS 7.9 is the GUID {B7BD4D8B-B02E-446D-9A1A-A6A95D0A4C83}.

$PVSTDUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B7BD4D8B-B02E-446D-9A1A-A6A95D0A4C83}”

 

For the Target Device of Citrix Provisioning Services 7.11 released together with XenDesktop/XenApp 7.11. No changes to the installation procedures with this release, so again we only need to add the correct GUID to the installation script. For 7.11 VDA the GUID is {5535C787-85E7-47B2-87CE-40E2945AAA03}.

$PVSTDUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5535C787-85E7-47B2-87CE-40E2945AAA03}”

 

Citrix StoreFront 3.6

With the release of XenDesktop 7.9 Citrix also released Citrix StoreFront 3.6. For the unattended installation of StoreFront we only need to change the GUID at Define Variables. The story is getting a bit boring, isn’t it?

$StoreFrontUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{79FFED9F-5F4C-4BEC-B86E-6CD532CEC46D}"

Citrix StoreFront 3.7

Citrix StoreFront is released together with XenDesktop 7.11. Just as for earlier version we only need to change the GUID defined at the variables part of the script. It’s getting really boring right now, don’t you thin.

$StoreFrontUninstall="HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{02632BF1-0E8F-4E2A-90C0-A39244907306}"

Citrix Director 7.9

Director version for XenDesktop 7.9 where 32bit based and wrote down the uninstall information in the Wow64232Node. The director delivered with XenDesktop 7.9 is apparently fully 64bit as the key is not located anymore in the Wow6432Node. Besides this small change, we only need to have the new GUID which will be set at the Define Variables part.

$DirectorUninstall="HKLM:\SOFTWARE\\Microsoft\Windows\CurrentVersion\Uninstall\{9FE05AD4-F3D7-44E4-B130-1843887C4282}"

 

Citrix Director 7.11

Also the Citrix Director 7.11 uninstall information is added to 64bit part of the registry. Replacing the GUID is enough for scripts made for Directory 7.9, within earlier scripts we need to remove the WOW6432Node.

$DirectorUninstall="HKLM:\SOFTWARE\\Microsoft\Windows\CurrentVersion\Uninstall\{835D38F5-E5BF-40EA-9581-BDA57AF22942}"

 

Summarization

In this article I updated the installation scripts with the latest version of XenDesktop, StoreFront and PVS. For the full scripts, check the earlier articles in this series.