| | | | |

RES Automation Manager: Add fonts on Windows Server 2008 R2

1 min read

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:

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:

reswsm0010

After this I added a command task with this resource ‘linked’ in the command field:

reswsm0009

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.

The following two tabs change content below.

Kees Baggerman

Kees Baggerman is Senior Technical Director — Performance & Solutions Engineering R&D at Nutanix, where he leads a global team responsible for defining how enterprise applications are delivered on the Nutanix platform. A former Citrix Technology Professional and NVIDIA Enterprise Platform Advisor, he has spent 15+ years driving EUC strategy and technical direction across architecture, product, and customer success. He has been writing here since 2011 — sharing what he learns at the intersection of platform engineering and enterprise IT.
Kees Baggerman

Kees Baggerman

Senior Technical Director at Nutanix - Former Citrix CTP - NVIDIA Enterprise Platform Advisor - 15+ years in EUC

Kees Baggerman is Senior Technical Director — Performance & Solutions Engineering R&D at Nutanix, where he leads a global team responsible for defining how enterprise applications are delivered on the Nutanix platform. A former Citrix Technology Professional and NVIDIA Enterprise Platform Advisor, he has spent 15+ years driving EUC strategy and technical direction across architecture, product, and customer success. He has been writing here since 2011 — sharing what he learns at the intersection of platform engineering and enterprise IT.

Similar Posts

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.