RES Automation Manager: Add fonts on Windows Server 2008 R2

Share Button

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="\ServerNameShareNamefonts"
  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.

Share Button

Leave a Reply