大侠:
我写了一个数据库程序(oracle,delphi7),现在想做到安装到目标计算机后,一开机既能自动运行该程序。
如何做到呢?(我试过在C:\AUTOEXEC.BAT内添加:path d:\***.exe)
可是无法做到。
有什么方法?
谢谢!

解决方案 »

  1.   

    1。在启动里建快捷方式
    2。加入到注册表中run
      

  2.   

    可以使用注册表
    启动项目为:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
      

  3.   

    如果是8I的话要先运行监听程序
    在开始->程序->启动中加(该目录下C:\WINDOWS\Start Menu\Programs\启动加上你的程序的快捷方式)
      

  4.   

    或者添加到注册表
    HKEY_LOCAL_MACHINE\SoftWare\Microsoft\Windows\CurrentVersion\Run
    HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Run
    中加如自己的程序启动项
      

  5.   


    HKEY_LOCAL_MACHINE\SoftWare\Microsoft\Windows\CurrentVersion\Run
    HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Run
    中添加自己的运行项
    或者
    创建快捷方式放到启动中
      

  6.   

    那个
    runservice里面的东西好象也是启动自动加载的
      

  7.   

    uses Registry;var
    Reg:TRegistry;
    Str:string;
    begin
     Str:=ExtractFileDir(Application.ExeName)+'程序.exe';
     Reg:=Tregistry.Create;
     Reg.RootKey:=HKEY_LOCAL_MACHINE;
     Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run',False);
     Reg.WriteString('名称',str);
     Reg.CloseKey;
     Reg.Free;
    end;
      

  8.   

    在HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
    下新建项目值为你要运行的EXE全路径
      

  9.   

    将path去掉!在autoexec.bat直接写入:d:\***.exe。即可。
      

  10.   

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run