中国程序员联盟 正在重新改版中ing 不便之处还请见谅 改版后将内容涉及java delphi .net php
 
  首页 | 数据库开发 | 网络通讯 | 多线程 | 多媒体开发 | 图像处理 | 程序人生 | 系统函数 | 控件开发 | Web服务
 
  当前位置:笨鱼delphi技术网>系统函数>文章内容

delphi 制作自启动光盘的方法

来源:站内 关于:bill 发布时间:2007-06-27   [收藏] [推荐]
在刻录光盘时加入一个文件:autorun.INF
autorun.INF的内容如下:[AutoRun]
open=autorun.exe
icon=autorun.exe
用意解释:
////////////////////////////////

[AutoRun]
open=autorun.exe//autorun.exe是你要运行的文件名字,可能是setup.exe等
icon=autorun.exe//是光盘的图标,可以单独放置一个图标文件,如ico,插入光盘后,原光盘图标将显示为此文件的图标
设置光盘的自动运行特征:
procedure  TForm1.SetCDAutoRun(AAutoRun:Boolean);
const
DoAutoRun  :  array[Boolean]  of  Integer  =  (0,1);
var
Reg  :  TRegistry;
begin
try
{  create  our  registry  object  }
Reg  :=  TRegistry.Create;

{  set  our  registry  root  key  }
Reg.RootKey  :=  HKEY_LOCAL_MACHINE;
{  verify  that  our  CDROM  class  key  exists  }
if  Reg.KeyExists('System')  then
{  try  to  open  our  CDROM  class  key  }
if  Reg.OpenKey('System',FALSE)  then
{  add  AutoRun  to  our  CDROM  class  key  }
Reg.WriteBinaryData('AutoRun',DoAutoRun[AAutoRun],1);
finally
{  free  our  registry  object  }
Reg.Free;
end;
{  showmessage  that  the  changes  will  happen  on  reboot  }
ShowMessage('Your  settings  will  take  effect  on  the  next  reboot  of  Windows.');
en    

[浏览: 次]   
上一篇:delphi Delphi中ShellExecute的妙用   下一篇:delphi 通用函数,得到汉字笔画
[收藏] [推荐] [返回顶部] [打印本页] [关闭窗口]  
    评论加载中…
google adsense热点文章
·delphi Delphi中ShellExecute的妙用
·delphi 如何快速读取文本文件
·delphi 在应用层截获键盘消息
·delphi 如何判断输入值是否中文
·delphi delphi实现服务开启与关闭
·delphi 实时记录事件日志
·delphi 使MEMO自动滚动
·delphi 如何区分键盘两个Enter键
·delphi 切换界面的方法
·delphi 汉字输入法的编程及使用
·delphi Delphi程序输入法自动切换最简
·delphi 消息是由谁来发出又由谁来完成
     delphi技术网 | firefox 下载 | Avant Browser下载 | dedecms 技术网 | drupal 爱好者 | php 技术网
  Copyright@www.delphichm.com,2006-2009.All Rights Reserved.
 
程序员联盟 | delphi Java .net|QQ:707102932