Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need to get a .bat file to copy fonts from a cd to the "C:\windows\fonts" folder on my client's PC. I do not know the config of their computer but i do know that XP is the common operating system. and ideas?

copy X:\fonts\*.ttf C:\windows\fonts
I'm just having a guess at the directories here. The source (the CD drive itself) can be anything ranging from D: till Z: ...
But you know the file on the source CD, example : D:\fonts\font0001.ttf
You can do :
if exist D:\fonts\font0001.ttf copy D:\fonts\*.ttf C:\windows\fonts
if exist E:\fonts\font0001.ttf copy E:\fonts\*.ttf C:\windows\fonts
if exist F:\fonts\font0001.ttf copy F:\fonts\*.ttf C:\windows\fonts
...
Hi there.

Leave the script in the root of the CD. That way, the current directory will be the CD root.
copy fonts\*.ttf %SystemRoot%\fontsIf you're still getting access denied errors, your client doesn't have the ability to add files to %SystemRoot%\fonts.

That's indeed a better idea ... But if either you want to have this script run on startup of computer (with or without the CD actually in the drive), or if you want the script to do something else and/or display any kind of additional information, you'll need to have the file off the CD.
Hi there.

i used "copy fonts\*.ttf %SystemRoot%\fonts" like indicated above, and got an "access denied" error message 4,200 times (once for each of the fonts to be copied)....i did this from my system (vista ultimate) and I am signed in as the administrator. here is my entire code:
@echo off
echo -------------------
echo Script by Damian Crow
echo -------------------
echo This Program will install 4,200 new fonts to your PC.
Pause.
copy fonts\*.ttf %SystemRoot%\fonts
echo font install Complete!
Pause.

User Access Control, aka Vista's, "You only THINK you're an administrator, but we've only given you the power of a regular (limited) user."

yes UAC is on then. I get pop ups asking to verify and confirm. and after the initial install the first time i use a program I must right click the icon nd go to "run as administrator" ....

Well, I don't know of any way to script your way up to Admin w/ UAC in effect. I think runas might do it, but it'll ask for a password, and the user WILL have to input it.

![]() |
Waht is wrong? It won't ...
|
WSH console functions
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |