<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>faq-o-matic.net &#187; Gottfried Mayer</title>
	<atom:link href="http://www.faq-o-matic.net/author/gottfried-mayer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.faq-o-matic.net</link>
	<description>Das Autoren-Blog der IT-Community</description>
	<lastBuildDate>Wed, 08 Feb 2012 05:07:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Schriftarten per Skript installieren</title>
		<link>http://www.faq-o-matic.net/2007/06/12/schriftarten-per-skript-installieren/</link>
		<comments>http://www.faq-o-matic.net/2007/06/12/schriftarten-per-skript-installieren/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 10:45:00 +0000</pubDate>
		<dc:creator>Gottfried Mayer</dc:creator>
				<category><![CDATA[Client-Administration]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Softwareverteilung]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://faq-o-matic.net.dd18938.kasserver.com/2007/06/12/schriftarten-per-skript-installieren/</guid>
		<description><![CDATA[Um neue Schriftarten in Windows zu installieren gen&#252;gt es, die gew&#252;nschten *.ttf-Dateien im Explorer in den Fonts-Ordner zu ziehen. Beim Automatisieren dieses Vorgangs merkt man jedoch sehr schnell, dass das einfache Kopieren der Dateien nicht gen&#252;gt. Die *.ttf-Dateien erscheinen einfach nicht in der Schriftartenliste. Der Kopiervorgang per Skript l&#228;uft also anders ab als der Kopiervorgang [...]<h3>Verwandte Beiträge:</h3><ol>
<li><a href='http://www.faq-o-matic.net/2008/02/03/exchange-server-2003-das-datenbanklimit-per-skript-setzen/' rel='bookmark' title='Exchange Server 2003: Das Datenbanklimit per Skript setzen'>Exchange Server 2003: Das Datenbanklimit per Skript setzen</a> <small>Seit dem Service Pack 2 f&#252;r Exchange Server 2003 ist...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/08/16/festplatte-fast-voll-per-skript-warnung-verschicken/' rel='bookmark' title='Festplatte fast voll? Per Skript Warnung verschicken'>Festplatte fast voll? Per Skript Warnung verschicken</a> <small>Als Administrator wei&szlig; man doch lieber vor den Nutzern, wenn...</small></li>
<li><a href='http://www.faq-o-matic.net/2007/03/26/gruppenrichtlinien-per-skript-lesen-und-schreiben/' rel='bookmark' title='Gruppenrichtlinien per Skript lesen und schreiben'>Gruppenrichtlinien per Skript lesen und schreiben</a> <small>ReadPol.vbs liest und schreibt (!) registry.pol-Dateien, die in Gruppenrichtlinien verwendet...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="/wp-content/uploads/objects/674022.jpg"><img src="/wp-content/uploads/objects/674022.jpg" align="left" border="0" alt="" /></a>Um neue Schriftarten in Windows zu installieren gen&uuml;gt es, die gew&uuml;nschten *.ttf-Dateien im Explorer in den Fonts-Ordner zu ziehen. Beim Automatisieren dieses Vorgangs merkt man jedoch sehr schnell, dass das einfache Kopieren der Dateien nicht gen&uuml;gt. Die *.ttf-Dateien erscheinen einfach nicht in der Schriftartenliste.</p>
<p><span id="more-484"></span>
<p>Der Kopiervorgang per Skript l&auml;uft also anders ab als der Kopiervorgang per Explorer. Das folgende Skript weist den Explorer an, den Kopiervorgang zu starten, was zu einer korrekt installierten Schriftart f&uuml;hrt. Das Skript pr&uuml;ft auch gleich, ob die Schriftart bereits installiert ist, um unsch&ouml;ne Meldungen (&quot;Die Schriftart nnn ist bereits installiert &#8230;&quot;) zu verhindern.</p>
<p>Zu installierende Schriftarten (*.ttf / *.fon) in einen Ordner &quot;FontsToInstall&quot; beim Skript ablegen, dann einfach das VBS starten (per Logon-Script funktioniert&nbsp;das&nbsp;nur bei&nbsp;lokalen Administratoren; besser w&auml;re also ein Startup-Skript), und die fehlenden Schriftarten werden installiert.</p>
<p>Wichtig:&nbsp; Es werden alle Dateien vom FontsToInstall Ordner kopiert, da sollten also ausschliesslich Schriftartdateien drin liegen! Getestet auf Windows XP SP2 deutsch.</p>
<ol>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; ########################################### </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; # installfont.vbs&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; # installs font file in windows fonts dir # </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; # (c) 2007 by Gottfried Mayer&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; ########################################### </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Dim</span> oFSO, oApp, oFolderCopy, oShell </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Dim</span> strFontsPath, strScriptPath </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; Create needed Objects </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oFSO = <span style="COLOR:#b1b100;">CreateObject</span><span style="COLOR:#66cc66;">(</span><span style="COLOR:#ff0000;">&quot;Scripting.FileSystemObject&quot;</span><span style="COLOR:#66cc66;">)</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oShell = <span style="COLOR:#b1b100;">CreateObject</span><span style="COLOR:#66cc66;">(</span><span style="COLOR:#ff0000;">&quot;WScript.Shell&quot;</span><span style="COLOR:#66cc66;">)</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oApp = <span style="COLOR:#b1b100;">CreateObject</span><span style="COLOR:#66cc66;">(</span><span style="COLOR:#ff0000;">&quot;Shell.Application&quot;</span><span style="COLOR:#66cc66;">)</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; Get Path of this Script (i.E. C:\Scripts\ or \\server\netlogon\) </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">strScriptPath = WScript.<span>ScriptFullName</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">strScriptPath = <span style="COLOR:#b1b100;">left</span><span style="COLOR:#66cc66;">(</span>strScriptPath,<span style="COLOR:#b1b100;">instrrev</span><span style="COLOR:#66cc66;">(</span>strScriptPath,<span style="COLOR:#ff0000;">&quot;\&quot;</span><span style="COLOR:#66cc66;">)</span><span style="COLOR:#66cc66;">)</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; Get Path of Windows Fonts directory </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">strFontsPath = oShell.<span>ExpandEnvironmentStrings</span><span style="COLOR:#66cc66;">(</span><span style="COLOR:#ff0000;">&quot;%WINDIR%&quot;</span><span style="COLOR:#66cc66;">)</span> &amp; <span style="COLOR:#ff0000;">&quot;\Fonts&quot;</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; Get Folder Object of Fonts directory (i.E. C:\Scripts\FontsToInstall or \\server\netlogon\FontsToInstall) </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oFolderCopy = oApp.<span>Namespace</span><span style="COLOR:#66cc66;">(</span>strScriptPath &amp; <span style="COLOR:#ff0000;">&quot;FontsToInstall&quot;</span><span style="COLOR:#66cc66;">)</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; Check each Font if it already is installed </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">For</span> Each oFont In oFolderCopy.<span>Items</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp; <span style="COLOR:#b1b100;">If</span> <span style="COLOR:#b1b100;">NOT</span> oFSO.<span>FileExists</span><span style="COLOR:#66cc66;">(</span>strFontsPath &amp; <span style="COLOR:#ff0000;">&quot;\&quot;</span> &amp; oFont.<span style="COLOR:#b1b100;">Name</span><span style="COLOR:#66cc66;">)</span> <span style="COLOR:#b1b100;">Then</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp; &nbsp; <span style="COLOR:#808080;">&#39; Tell Explorer to copy the Font &#8211; this correctly installs it. </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp; &nbsp; oApp.<span>Namespace</span><span style="COLOR:#66cc66;">(</span>strFontsPath<span style="COLOR:#66cc66;">)</span>.<span>CopyHere</span> oFont </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp; <span style="COLOR:#b1b100;">End</span> <span style="COLOR:#b1b100;">If</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Next</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">&nbsp;</div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#808080;">&#39; Cleanup Objects </span></div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oFolderCopy = <span style="COLOR:#b1b100;">Nothing</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oApp = <span style="COLOR:#b1b100;">Nothing</span> </div>
<li style="FONT-WEIGHT:normal;COLOR:black;FONT-STYLE:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;">
<div style="FONT-WEIGHT:normal;FONT-FAMILY:&#39;Courier New&#39;, Courier, monospace;"><span style="COLOR:#b1b100;">Set</span> oShell = <span style="COLOR:#b1b100;">Nothing</span> </div>
</li>
</ol>
<h3>Verwandte Beiträge:</h3><ol>
<li><a href='http://www.faq-o-matic.net/2008/02/03/exchange-server-2003-das-datenbanklimit-per-skript-setzen/' rel='bookmark' title='Exchange Server 2003: Das Datenbanklimit per Skript setzen'>Exchange Server 2003: Das Datenbanklimit per Skript setzen</a> <br /><small>Seit dem Service Pack 2 f&#252;r Exchange Server 2003 ist...</small></li>
<li><a href='http://www.faq-o-matic.net/2010/08/16/festplatte-fast-voll-per-skript-warnung-verschicken/' rel='bookmark' title='Festplatte fast voll? Per Skript Warnung verschicken'>Festplatte fast voll? Per Skript Warnung verschicken</a> <br /><small>Als Administrator wei&szlig; man doch lieber vor den Nutzern, wenn...</small></li>
<li><a href='http://www.faq-o-matic.net/2007/03/26/gruppenrichtlinien-per-skript-lesen-und-schreiben/' rel='bookmark' title='Gruppenrichtlinien per Skript lesen und schreiben'>Gruppenrichtlinien per Skript lesen und schreiben</a> <br /><small>ReadPol.vbs liest und schreibt (!) registry.pol-Dateien, die in Gruppenrichtlinien verwendet...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://www.faq-o-matic.net/2007/06/12/schriftarten-per-skript-installieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

