Jump to content

Unzip and Install Fonts


Recommended Posts

Hi Everyone,

I am running Windows 7 x64 sp1 and am trying to do an unattended install of 32 fonts that I have, but I can't seem to get things working right. The problem is that I have to extract the .ttf files from a .zip file and then move them into the %windir%\Fonts folder. I found a way to do it through a vbs script which ran fine when I ran it as an admin locally, but when I try to do it as an unattended network install it can't get access to a system folder. Some places said to use xcopy, but that doesn't allow you to unzip a file. So, here is what I came up with for my batch file:

md "C:\Barcode Fonts"

cscript //nologo ExtractFonts.vbs

xcopy "C:\Barcode Fonts" "%windir%\Fonts" /E /Y

rd /s /q "C:\Barcode Fonts"

and here is the .vbs file:

Dim objShell, objSource, objTarget

strZipFile = "%userprofile%\Desktop\BarCodeFonts\BarCodeFonts.zip"

Const FONTS = "C:\Barcode Fonts"

Set objShell = CreateObject( "Shell.Application" )

Set objSource = objShell.NameSpace(strZipFile).Items()

Set objTarget = objShell.NameSpace(FONTS)

intOptions = 256

objTarget.CopyHere objSource, intOptions

That seems to run fine. It extracts the contents and the xcopy command even lists out the files and says "32 file(s) copied.", but nothing shows up in the Fonts folder. I thought that maybe it was a registry problem so I added all 32 files into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts, but that still didn't populate the folder. Any help that anyone could give me here would be great!

Link to comment
Share on other sites


The problem is I am trying to do this from a Dell Kace Management Appliance. I really don't have a whole lot of options in that environment and I can't run anything through a 3rd party application so Is the OEM still a valid solution?

Edited by jh6004
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...