I am fairly new to KiXtart and have only created a basic script to map a few network drives based upon department. I need to roll out a few new fonts to select users by department and have run across the following VBScript online. I have no VBScript experience whatsoever, but the script does seem to do what I would like it to do, without having to reboot the PC for the fonts to be available. I would rather take care of this from my KiXtart login script. Any assistance would be greatly appreciated.

Here is the VBScript:

Const FONTS = &H14&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)
objFolder.CopyHere "C:\Scripts\Myfont.ttf"

Here is a summary of what it does:

Line #1 - Defines a constant named FONTS and sets the value to &H14&; this constant is used to tell the script which “special folder” (i.e., the Fonts folder) we want to work with. We could just use a hardcoded path like C:\Windows\Fonts to represent the Fonts folder. However, keep in mind that the Fonts folder doesn’t have to be C:\Windows\Fonts. By using the special folders constant the script will always find the Fonts folder for us, regardless of where that folder actually lives.

Line #2 - Creates an instance of the Shell.Application object.

Line #3 - Binds to the Fonts folder.

Line #4 - Once connected to the Fonts folder we call the CopyHere method, specifying the complete path to the font we want to install.

I would be happy to provide additional details if needed or answer an questions you may have as a result. Thanks in advance for any assistance you may be able to provide.

GTManor