Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    8

    Help me please.... Install fonts automatically when CD is just start.

    I'm doing an assignment that using autoplay media studio 6 now. In that assignment, I put some extra fonts that I download from the internet. To make sure my project can run and work properly in every one computer, hence I put all of these fonts into my CD.

    My problem is,
    How to make my CD can auto install all of these fonts when my project at Preload state? What the source code that I should put?

    I read the help file and try many times already but still not successfull..

    Hope some one can help to solve my problem, thanks!

  2. #2
    Join Date
    May 2005
    Posts
    1,115
    Here is an example for Dungeon font:

    Code:
    result = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", "Dungeon (TrueType)", true);
    if result=="" then
    	result = System.GetUserInfo();
    	if result.IsAdmin==true then 
    		File.Copy(_SourceFolder.."\\dungeon.ttf", Shell.GetFolder(SHF_FONTS), true, false, false, true, nil);
    		System.RegisterFont(Shell.GetFolder(SHF_FONTS).."\\Dungeon.ttf", "Dungeon (TrueType)", true);
    	end
    end
    Unzip the attachment and put the .ttf file in the cd root to test it.
    Attached Files
    Never know what life is gonna throw at you.
    (Based on a true story.)

  3. #3
    Join Date
    Sep 2006
    Posts
    8

    Thanks!

    I get it already, thanks!!

  4. #4
    Join Date
    Sep 2006
    Posts
    8

    Question again...

    Sorry, here got a problem again..
    After I apply this code to preload page:


    --get the destination directory (in this case, where the fonts are stored)
    fonts_dir = Shell.GetFolder(SHF_FONTS);

    --copy the file from your cd to the user's font directory
    File.Copy("AutoPlay\\Docs\\HDZB_5.TTF", fonts_dir .. "\\HDZB_5.TTF", false, true, false, true, nil);

    --register the font with windows
    System.RegisterFont(fonts_dir .. "\\HDZB_5.TTF", "HDZB_5", true);

    --copy the file from your cd to the user's font directory
    File.Copy("AutoPlay\\Docs\\HDZB_27.TTF", fonts_dir .. "\\HDZB_27.TTF", false, true, false, true, nil);

    --register the font with windows
    System.RegisterFont(fonts_dir .. "\\HDZB_27.TTF", "HDZB_27", true);


    When the CD is started, all of the fonts are copy to windows fonts folder, but..
    It can't view the fonts of my project! I don't know what happen, just success half part only.

    Can you answer me again?
    Thanks!!

Similar Threads

  1. Setup Factory and VS 2005
    By vazir786 in forum Setup Factory 7.0
    Replies: 4
    Last Post: 01-13-2006, 08:47 PM
  2. Option to Automatically Start the Application after Install
    By jeffreyd in forum Setup Factory 6.0
    Replies: 1
    Last Post: 05-27-2003, 05:31 PM
  3. PROBLEM: AutoPlay Application Does Not Start Automatically
    By Support in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 10-25-2002, 02:21 PM
  4. PROBLEM: AutoPlay Application Does Not Start Automatically
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-25-2002, 12:39 PM
  5. HOWTO: Download and Install Files from the Web
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-23-2002, 01:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts