Discussion:
Install fonts from batch file
(too old to reply)
Ian
2006-12-07 17:59:22 UTC
Permalink
I don't know if this is the correct newsgroup, but it's on of the few
referring to fonts, so I hope someone here can help.

I need to be able to distribute some fonts within our company, ideally with
a batch file to install them (Windows XP). I tried a simple Copy command to
the fonts folder, but that only puts the files in the folder, it doesn't
install them.

Can anyone point me in the right direction to be able to do this?

Ian
b***@hotmail.com
2006-12-12 15:00:38 UTC
Permalink
Post by Ian
I don't know if this is the correct newsgroup, but it's on of the few
referring to fonts, so I hope someone here can help.
I need to be able to distribute some fonts within our company, ideally with
a batch file to install them (Windows XP). I tried a simple Copy command to
the fonts folder, but that only puts the files in the folder, it doesn't
install them.
Can anyone point me in the right direction to be able to do this?
Ian
Hi, You need to change the attrib of the local font folder.

REM - CHANGES ATTRIBUTES OF FOLDER TO BE ABLE TO WRITE THE FILE
attrib.exe -r -s -h c:\windows\fonts /s /d

xcopy m:\*.* c:\windows\fonts\

REM - PUTS ATTRIBUTES BACK LIKE BEFORE
attrib.exe +r +s c:\windows\fonts /s /d

The only thing is that you need to be an administrator to do so.
Character
2006-12-12 15:18:48 UTC
Permalink
Post by b***@hotmail.com
Post by Ian
I don't know if this is the correct newsgroup, but it's on of the few
referring to fonts, so I hope someone here can help.
I need to be able to distribute some fonts within our company, ideally with
a batch file to install them (Windows XP). I tried a simple Copy command to
the fonts folder, but that only puts the files in the folder, it doesn't
install them.
Can anyone point me in the right direction to be able to do this?
Ian
Hi, You need to change the attrib of the local font folder.
REM - CHANGES ATTRIBUTES OF FOLDER TO BE ABLE TO WRITE THE FILE
attrib.exe -r -s -h c:\windows\fonts /s /d
xcopy m:\*.* c:\windows\fonts\
REM - PUTS ATTRIBUTES BACK LIKE BEFORE
attrib.exe +r +s c:\windows\fonts /s /d
The only thing is that you need to be an administrator to do so.
Sorry, but that isn't the OP's problem. He stated that he CAN copy the
files to the Windows/Fonts folder but that doesn't install them (make
them immediately available for use).

That's because simply copying them into the folder doesn't update the
registry; a registry update WILL take place automatically when Windows
is restarted.

If the copy function is performed with the Windows API, then the
registry update will take place immediately. If you drag a font into
C:\windows\fonts in Explorer, for instance, you'll see a dialogue box
saying "Installing <fontname>"

Using DOS copy will also bypass Windows XP's or Windows 2000's font
validation process, allowing invalid fonts to be placed in the folder,
with unpredictable results.

- Character
Ian
2007-01-04 16:26:21 UTC
Permalink
Thank you Character & bull dog.

As Character pointed out, the problem is not in copying the files, but in
installing (registering) them. I've gone with the "provide instructions to
copy within Windows" option :-)

Thanks for trying.

---
Ian
---
Post by Character
Post by b***@hotmail.com
Post by Ian
I don't know if this is the correct newsgroup, but it's on of the few
referring to fonts, so I hope someone here can help.
I need to be able to distribute some fonts within our company, ideally with
a batch file to install them (Windows XP). I tried a simple Copy command to
the fonts folder, but that only puts the files in the folder, it doesn't
install them.
Can anyone point me in the right direction to be able to do this?
Ian
Hi, You need to change the attrib of the local font folder.
REM - CHANGES ATTRIBUTES OF FOLDER TO BE ABLE TO WRITE THE FILE
attrib.exe -r -s -h c:\windows\fonts /s /d
xcopy m:\*.* c:\windows\fonts\
REM - PUTS ATTRIBUTES BACK LIKE BEFORE
attrib.exe +r +s c:\windows\fonts /s /d
The only thing is that you need to be an administrator to do so.
Sorry, but that isn't the OP's problem. He stated that he CAN copy the
files to the Windows/Fonts folder but that doesn't install them (make them
immediately available for use).
That's because simply copying them into the folder doesn't update the
registry; a registry update WILL take place automatically when Windows is
restarted.
If the copy function is performed with the Windows API, then the registry
update will take place immediately. If you drag a font into
C:\windows\fonts in Explorer, for instance, you'll see a dialogue box
saying "Installing <fontname>"
Using DOS copy will also bypass Windows XP's or Windows 2000's font
validation process, allowing invalid fonts to be placed in the folder,
with unpredictable results.
- Character
Loading...