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!
Page 1 of 1
Unzip and Install Fonts
#2
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.
#4
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
- ← Scripting for configuration on router
- Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
- Need help modifying my default printer script please →
Share this topic:
Page 1 of 1



Help
Back to top









