MSFN Forum: Unzip and Install Fonts - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Unzip and Install Fonts Rate Topic: -----

#1 User is offline   jh6004 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 09-August 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 23 January 2012 - 10:44 AM

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!


#2 User is online   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 23 January 2012 - 01:05 PM

Read this $OEM$ Distribution Folders on how to create a folder in your source that will get copy automatically during the install.

#3 User is offline   onlyrasel 

  • Newbie
  • Group: Members
  • Posts: 47
  • Joined: 21-November 07
  • OS:XP Pro x86
  • Country: Country Flag

Posted 23 January 2012 - 01:43 PM

Try Winrar. It's easier then your process.

#4 User is offline   jh6004 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 09-August 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 23 January 2012 - 01:53 PM

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?

This post has been edited by jh6004: 23 January 2012 - 01:54 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy