Question Installer une police dans le dossier Fonts

Plus d'informations
il y a 10 ans 8 mois #20743 par Matthew BETTON
offrock écrit:

ça sera a la main!


:side: :(

:whistle:

2 questions :

- Quelle est la version de Windows sur les postes de travail ?
- S'il s'agit d'un domaine Active Directory, en quelle version est-il ?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 8 mois #20744 par julien
Server 2008 r2 et poste windows 7 pro sp1!

T'as une idee?

thanks

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 8 mois #20745 par Matthew BETTON
Effectivement ce n'est pas aussi 'simple' que cela en a l'air...

Le problème n'est pas lié à PowerShell.

J'ai trouvé ce fil de discussion sur le même sujet :


How to install fonts remotely


La copie ne peut fonctionner qu'en mode élévation.

Certaines personnes ont utilisé cet outil avec succès :

FontReg - Windows Font Registration & Installation Utility

Ce post :

Why i can't copy a font file to c:\Windows\Fonts thought CopyFile


Nous ramène vers ceci

About the Fonts folder in Windows, Part 1 (aka What are we talking about?)

The simple answer? It is a Shell namespace extension that causes any display of %WINDIR%Fonts in the Windows Explorer to have a special view where typical filesystems actions in Explorer such as copy, move, and delete have special handlers.

It is by no means the only way to get fonts ontop Windows, though.

If you look at the Platfrom SDK documentation for the AddFontResource function:

The AddFontResource function adds the font resource from the specified file to the system font table. The font can subsequently be used for text output by any application.

So all you have to do to get a font available to everyone is call this function!


Pour ma part, je n'ai eu à le faire dans ma carrière que sous NT4 (plusieurs centaines de postes de travail) et je l'ai fait avec des packages développés sous Wise Install Manager, qui ont été déployés ensuite par un outil CA (début années 2000 :) ) ... Sinon sur mes propres machines en manuel.

Bref, pas simple pour un truc qui devrait finalement l'être ...

Bonne soirée quand même !

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 8 mois #20746 par Matthew BETTON
Comme il s'agit d'une 'vue' et pas d'un dossier / répertoire à proprement parler, le fait de passer par un objet COM pour appeler l'espace de nom correspondant aux fonts peut fonctionner (en tout cas pour certaines personnes), mais quid via un script mis en place et exécuté via GPO ? Ou alors faut-il tout de même une élévation ?... A tester.

[code:1]
$FONTS = 0x14
$Path=\"c:\rapsys\fonts\"
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.Namespace($FONTS)
New-Item $Path -type directory
Copy-Item \"f:\NewFontsForDeployment\*\" $Path
$Fontdir = dir $Path
foreach($File in $Fontdir) {
$objFolder.CopyHere($File.fullname)
}
remove-item $Path -recurse[/code:1]

Source
(ba oui, je ne fais pas tout ;) )<br><br>Message édité par: Matthew BETTON, à: 23/09/15 20:53

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.040 secondes
Propulsé par Kunena