Citrix Provisioning Services Target Device Unattended Install

Last week I was working on a XenApp 7.9 on Windows 2012 R2 and trying to do a Citrix Provisioning Services Target Device Unattended Install using RES Automation Manager, I ran into issues where the PVS Target Device software would not install.

RES would report it had installed successfully but nothing would be there in Programs and Features. I was using the following switches to install the software

PVS_Device_x64.exe /S /v/qn

A quick Google turned up Kees Baggerman’s article (with input from Barry Schiffer)

I tried the solution but it didn’t work. After a lot of digging and trial and error this is what eventually worked for me.

Install .Net Framework 3.5 using PowerShell

# Windows-Feature .Net Framework 3.5
Install-WindowsFeature Net-Framework-Core -source ‘\\%RESRESOURCES%\Microsoft\Windows 2012 R2\sources\sxs’
Install .Net Framework 4.5.2 which is the NDP452-KB2901907-x86-x64-AllOS-ENU.exe located in \Console\ISSetupPrerequisites\{6CF14221-8501-4A82-B1D4-3D344CB66D23}

NDP452-KB2901907-x86-x64-AllOS-ENU.exe /q /noreboot
Now install Citrix Diagnostics Facility which is cdf_x64.msi located in \Console\ISSetupPrerequisites\{60F3781B-8B00-4002-8E57-3121324DEC7B}

This is a requirement of the PVS Device software.

I got the executable name by monitoring %APPDATA%\Local\Temp while doing a manual install of PVS_Device_x64.exe

You can use the following command line or a RES Automation Windows Installer Package task as I am using

msiexec /i C:\temp\cdf_x64.msi /quiet
Copy the driver files as per this article

The drivers are not available in the Provisioning Services Install media as far as I have found and can only be obtained by installing PVS_Device_x64.exe

I used xopy to copy the files from a network location to C:\Windows\System32\Drivers as the RES File Copy would not work due to the need for elevation I think.

The command I used was

xcopy %RESRESOURCES%\Citrix\Provisioning Services\Drivers\*.* %SystemRoot%\System32\Drivers
Reboot the machine and you can run the below command which will now install properly.

PVS_Device_x64.exe /S /v/qn
I have not found any way to suppress the reboot that occurs after PVS_Device_x64.exe is installed so at the end of all this I put a postpone task in RES One Automation so the next task does not kick in while the server is shutting down.

My final RES Module looked like this

So to recap:

.Net 3.5
.Net 4.5.2
Citrix Diagnostics Facility
Copy drivers
Citrix Target Device Software
Forced reboot
If you want to find out why and how to use a global variable like %RESRESOURCES% check out VirtualEngine’s blog post.

Book a free consultation
and discuss your IT challenges with us