非常感谢你的启发,我想能实现这一功能的人不会太多。<br>本来我不会,经过努力,终止实现了,以下过程将该死<br>的“记录本”放入快速启动区(WIN98):<br><br>首先 在 uses 中加入 registry,comobj,activex,shlobj,<br>再添加一按钮,粘贴以下代码,如有问题及时联系。<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> Reg: TRegIniFile;<br> WFileName: WideString;<br> AnObj: IUnKnown;<br> Shlink: IShellLink;<br> PFile: IPersistFile;<br> programfile,linkfile:string;<br>begin<br> programfile:='c:/windows/notepad.exe';<br> linkFile:='记事本';<br> try<br> coinitialize(nil);<br> AnObj := CreateComObject(CLSID_ShellLink);<br> shLink := AnObj as IShellLink;<br> PFile := AnObj as IPersistFile;<br> shLink.SetPath(PChar(programfile));<br> shLink.SetWorkingDirectory(PChar(ExtractFilePath(ProgramFile)));<br> Reg := TRegIniFile.Create('Software/MicroSoft/Windows/CurrentVersion/GrpConv');<br> WFileName := Reg.ReadString('MapGroups', 'Quick Launch', '') +<br> '/' + linkfile + '.lnk';<br> PFile.Save(PWChar(WFileName), True);<br> Reg.Free;<br> except<br> end;<br>end;<br><br>