Today while working on an unattended installation for a Citrix XenApp 6 on Windows Server 2008 R2 installation the customer asked me to add some fonts to the default installation. After some searching I found a VBS script that could do this, I had to change the script a bit because it gave some errors:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
on error resume next Const FONTS = &H14 dim oFSO,oShell, oFolder1, oFolder2, sRoot sRoot="\\ServerName\ShareName\fonts\" Set oShell = CreateObject("Shell.Application") set oFSO=createobject("scripting.filesystemobject") Set oFolder1 = oShell.Namespace(FONTS) set oFolder2=ofso.getfolder(sRoot) for each oFile in oFolder2.files sName=lcase(oFile.name) if right(sName,4)=".ttf" then if not ofso.fileexists(oFolder1.self.path & "\" & sName) then oFolder1.copyhere sRoot & sName end if end if next |
Like always I tested this script by running it manually on a test server. After a succesful run I placed the VBS file in the datastore:
After this I added a command task with this resource ‘linked’ in the command field:
When scheduled on a machine the script ran without problems, only action that’s needed after adding these fonts is to reboot the machine. Because I added this module to my unattended installation of Citrix XenApp this reboot was already build in.
Kees Baggerman
Latest posts by Kees Baggerman (see all)
- Nutanix AHV and Citrix MCS: Adding a persistent disk via Powershell – v2 - November 19, 2019
- Recovering a Protection Domain snapshot to a VM - September 13, 2019
- Checking power settings on VMs using powershell - September 11, 2019
- Updated: VM Reporting Script for Nutanix with Powershell - July 3, 2019
- Updated (again!): VM Reporting Script for Nutanix AHV/vSphere with Powershell - June 17, 2019