'Variable definitions

On error resume next
dim fontlist(3),root,path,check,filelist
fontlist(0)="HOOG0553.TTF"
fontlist(1)="ufonts.com_zekton-ex-bold.ttf"
fontlist(2)="zekton_.ttf"
fontlist(3)="zektonbo.ttf"


'Obtain the absolute path for this script
Set fso = CreateObject("Scripting.FileSystemObject") 
gpo_path = fso.GetParentFolderName(wscript.ScriptFullName)

'Obtain the windows directory on the local system
set wshShell = Wscript.CreateObject("Wscript.shell")
fonts_path = wshShell.ExpandEnvironmentStrings("%windir%")


'Specify the windows font directory
Const FONTS = &H14&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)
''' End code '''

'Loop through each of the fonts
for each font in fontlist
	'Build the copy path for each file
	copy_path=gpo_path+"\"+font

	'Build the path for each file to check against
	check_file=fonts_path+"\fonts\"+font

	'Debugging lines
	'wscript.echo "Attempting to copy:"+copy_path
	'wscript.echo "Looking for:"+check_file

	'Check to see if the file exists
	if fso.FileExists(check_file) then
		'Placeholder for existing files - Do nothing
		root=0
	'If the file doesn't exist, install it
	else
		objFolder.CopyHere copy_path
	end if
'Close loop
next