
-----------------------------------
mbslrm
Wed Jun 03, 2009 10:15 pm

Directory Referencing
-----------------------------------
I've got this script from someone I know that basically copies a font file to the Font Directory.


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?

-----------------------------------
DragonForce4
Thu Jun 04, 2009 8:13 pm

RE:Directory Referencing
-----------------------------------
have your program in a folder on the cd (eg lets call it game) 


if not Sys.Exec ("font.exe") then
    cls
    put "Font install failed", Error.LastMsg
    delay (1000)
end if


which will install the font, and display an error message if the font fails to install.
