vbscript - Script to Install Font in Windows XP -


i trying install fonts in windows xp using vbscript. reason script works fine in windows 7 not work in windows xp. need install fonts without system reboot so, had choose approach instead of other registry change approaches need system reboot. here vbscript

set objshell = createobject("shell.application") set objfolder = objshell.namespace("d:\logs\") set objfolderitem = objfolder.parsename("roboto-italic.ttf") objfolderitem.invokeverb("install") 

my guess invokeverb("install") command not working in windows xp. in case there alternatives? please guide me thanks...

next script (a code snippet) should work on (obsolete) windows xp:

const ssffonts = &h14&  set objshell = createobject("shell.application") set objfolder = objshell.namespace(ssffonts) objfolder.copyhere "d:\logs\roboto-italic.ttf" 

if font installed prompted overwrite it. not sure whether or not reboot required using above approach...

see shellspecialfolderconstants enumeration

specifies unique, system-independent values identify special folders. these folders used applications may not have same name or location on given system.

among others:

  • ssffonts 0x14 (20). virtual folder contains installed fonts. typical path c:\windows\fonts.

read hey, scripting guy! how can install fonts using script?:

as font has been added folder, operating system install font you...
that’s true, 1 important caveat: must copy file using shell object. admittedly, can use wmi or filesystemobject copy file fonts folder; however, when operating system not automatically install font you. far know, programmatic way windows recognize new font has been added fonts folder, , windows install font you, use shell object.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -