怎样往注册表中写程序(请给出程序)

解决方案 »

  1.   

    看个例子吧要先在uses里加入Registry; var
      MYReg:TRegistry;MyReg:=TRegistry.Create;
       MyReg.RootKey:=HKEY_LOCAL_MACHINE;
       if MyReg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run',True) then
         begin
           MyReg.WriteString('',程序路径);
           MyReg.CloseKey;
         end;
       if MyReg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunServices',True) then
         begin
           MyReg.WriteString('',程序路径);
           MyReg.CloseKey;
         end;
    Myreg.closekey;
    Myreg.Free;
      

  2.   

    往注册表中写程序
    吐血,什么意思啊?是关于写注册表的程序把,楼上已经写得很清楚了,delphi帮助TRegistry有完整例程,或者如果你高兴可以直接用api自己写:)