Posted: Wed Jun 03, 2009 10:15 pm Post subject: Directory Referencing
I've got this script from someone I know that basically copies a font file to the Font Directory.
VB:
const FONTS = &H14&
Set objShell = CreateObject("Shell.Application")
Set ObjFolder = objShell.Namespace(FONTS)
objFolder.CopyHere "I:\Game\bubble.ttf"
However, I need this script to run on many computers, and I can't hardcode the directory. How can I make it so that it copies the file from within the directory?
Sponsor Sponsor
DragonForce4
Posted: Thu Jun 04, 2009 8:13 pm Post subject: RE:Directory Referencing
have your program in a folder on the cd (eg lets call it game)
code:
Const FONTS = &H14&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)
objFolder.CopyHere "game\bubble.ttf"
as long as your program, the font file, and the vbs are in a folder called game, it will install it