Copy a File to the Hard Drive (Sabit Sürücüye Dosya Kopyalama)

  • Konuyu başlatan Konuyu başlatan guclusat
  • Başlangıç Tarihi Başlangıç Tarihi

guclusat

Tanınmış Üye
Süper Moderatör
Copy a File to the Hard Drive
It is often useful to copy a file from a CD-ROM (or other media) to the user's computer. In AutoPlay Media Studio, this is accomplished with a File.Copy action.

As an example, we will load a specific font onto the user's computer:

Kod:
--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(_SourceFolder .. "\\my_font.ttf", fonts_dir..\\"my_font.ttf", false, true, false, true, nil);

--register the font with windows
System.RegisterFont(fonts_dir .. "\\myfont.ttf", "My Font Name", true);
 
Geri
Yukarı