下面是我写的程序段,记得给我加满分。<br><br>Uses Registry;<br>{=================================================================<br> 功 能: 加入Windows启动中<br> 参 数: Path:程序全路径、名 Name:程序标认符<br> 返回值: 无<br> 例 题:AutoRunProgarm(Application.ExeName,'AutoRun');<br>=================================================================}<br>Procedure AutoRunProgarm(Path,Name:String);<br>var<br> RegF: TRegistry;<br>Begin<br> RegF:=TRegistry.Create;<br> RegF.RootKey:=HKEY_LOCAL_MACHINE;<br> try<br> If RegF.OpenKey('SOFTWARE/Microsoft/Windows/CurrentVersion/Run',True) Then<br> If not RegF.ValueExists(Name) Then<br> Begin<br> RegF.WriteString(Name,Path);<br> RegF.CloseKey;<br> end;<br> finally<br> RegF.Free<br> end;<br>End;<br><br>// 程序运行后,以后重新启动电脑时会自动运行你这个程序。