[wpkg-users] deleting fonts - vbs?

C. Mortimer cm214 at cam.ac.uk
Sat Jun 9 13:11:08 CEST 2012


Hello all,

I'm no VBS writter and have used the VBS script provided on
http://wpkg.org/Fonts to install fonts successfully:

--------------------------------------
Const FONTS = &H14&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)
MyDir = left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-
len(Wscript.ScriptName)-1)

objFolder.CopyHere MyDir &"\MyNewFont.ttf"
--------------------------------------

What I don't know is how to delete fonts in a similar manner to
installing them.  I've tried replacing .CopyHere with .DeleteFile, I
get a VBScript runtime error.  This is probably my ignorance of VBS,
anyone help me with this?

Many thanks

Chris




More information about the wpkg-users mailing list