如何ie tray建立shortcut(100分)

  • 主题发起人 主题发起人 CJ
  • 开始时间 开始时间
C

CJ

Unregistered / Unconfirmed
GUEST, unregistred user!
就是在IE4里,左下脚,开始菜单旁边,有ie,oe,channel那里,winamp可以的
 
只要在profiles/username/application data/internet explorer/quick lauch/中<br>加入联接就可以了.<br>
 
function tform1.GetSpecialFolder: string;<br>var<br>&nbsp; Pidl: PItemIDList;<br>&nbsp; handle : THandle;<br>&nbsp; Comp: TComponent;<br>&nbsp; LinkDir : string;<br>begin<br>&nbsp; // Get the folder location (as a PItemIDList)<br>&nbsp; result:='';<br>&nbsp; Comp := self.owner;<br>&nbsp; handle := (Comp as TForm).handle;<br>&nbsp; if SUCCEEDED(SHGetSpecialFolderLocation(handle, CSIDL_APPDATA, Pidl))<br>&nbsp; &nbsp; &nbsp;then begin<br>&nbsp; &nbsp; // Get the actual path of the desktop directory from the PItemIDList<br>&nbsp; &nbsp; &nbsp; &nbsp;SetLength(LinkDir, MAX_PATH); // SHGetPathFromIDList assumes MAX_PATH buffer<br>&nbsp; &nbsp; &nbsp; &nbsp;SHGetPathFromIDList(Pidl, PChar(LinkDir)); // Do it<br>&nbsp; &nbsp; &nbsp; &nbsp;SetLength(LinkDir, StrLen(PChar(LinkDir)));<br>&nbsp; &nbsp; &nbsp; &nbsp;result := LinkDir+'/Microsoft/Internet Explorer/Quick Launch/';<br>&nbsp; end;<br>end;<br>再用shelllink得到IPersistFile.save(GetSpecialFolder+linkfilename);
 
或者找registry中hkey-users/.default/software/<br>microsoft/windows/currentversion/grpconv/mapgroups/下的quick launch<br>指向lnk文件的路径
 
&gt;&gt;&gt;就是在IE4里<br>错误,更正为"就是在Win98里".<br><br>和一般的建立快捷方式是一样的,关键是路径应该是:<br>C:/WINDOWS/Application Data/Microsoft/Internet Explorer/Quick Launch<br><br>100拿定了!!<br><br>BTW:你有OE的注册码吗? 谢谢!
 
MD!!!什么破网!!<br>我进来看问题的时候一个回答也没有,写好答案就联不上了, 等再进来一看...&amp;*^&amp;&amp;^$<br>
 
斜杠写反了:-( &nbsp;"/"应为"/"<br>Profiles/username/Application Data/Microsoft/Internet Explorer/Quick Launch/<br>
 
cool!<br>我试了再加分:)<br>还有其它什么好地方能加?贴点代码来看看:-)<br>我对hubdog的答案可是喜爱有佳呦,分数,一不留心,就是他的了:)
 
to cytown:nt和98的路径是不一样的,<br>function tform1.GetSpecialFolder: string;<br>var<br>&nbsp; Pidl: PItemIDList;<br>&nbsp; handle : THandle;<br>&nbsp; Comp: TComponent;<br>&nbsp; LinkDir : string;<br>begin<br>&nbsp; // Get the folder location (as a PItemIDList)<br>&nbsp; result:='';<br>&nbsp; Comp := self.owner;<br>&nbsp; handle := (Comp as TForm).handle;<br>&nbsp; if SUCCEEDED(SHGetSpecialFolderLocation(handle, CSIDL_APPDATA, Pidl)) &nbsp;then begin<br>&nbsp; &nbsp; //other placeid is &nbsp; &nbsp;CSIDL_DESKTOP,CSIDL_NETHOOD,CSIDL_PRINTHOOD,<br>//CSIDL_PROGRAMS,CSIDL_SENDTO,CSIDL_STARTMENU,CSIDL_STARTUP &nbsp; &nbsp;<br>&nbsp; &nbsp; // Get the actual path of the desktop directory from the PItemIDList<br>&nbsp; &nbsp; &nbsp; &nbsp;SetLength(LinkDir, MAX_PATH); // SHGetPathFromIDList assumes MAX_PATH buffer<br>&nbsp; &nbsp; &nbsp; &nbsp;SHGetPathFromIDList(Pidl, PChar(LinkDir)); // Do it<br>&nbsp; &nbsp; &nbsp; &nbsp;SetLength(LinkDir, StrLen(PChar(LinkDir)));<br>&nbsp; &nbsp; &nbsp; &nbsp;result:=linkdir+'/';//if not CSIDL_APPDATA<br>&nbsp; &nbsp; &nbsp; &nbsp;result := LinkDir+'/Microsoft/Internet Explorer/Quick Launch/';//if CSIDL_APPDATA<br>&nbsp; end;<br>end;<br>再用shelllink得到IPersistFile.save(GetSpecialFolder+linkfilename);<br>
 
NT下也有吗? 我还以为只有win98才有那. :-)<br><br>to CJ:你到底有没有OE的注册码?
 
我从来不用OE,呵呵,我记得OFFICE有OE,IE也有OE,好象没说要注册码呀?<br>TRY THIS:<br>http://www.admik.com/exe/get.exe?5762
 
诸位:<br>如何在NT/9X中寻找平衡呢?
 
我写的nt,9x都能用
 
to cj: 你说的OE是什么呀? 我说的是offline explorer.
 
what about startmenu?<br>cakk: hehe, sorry, never used, but u could try my link, i think it's outlook express:)<br>hubdog: could u explain that? and how could i put shortcut on startmenu and specified programgroup
 
你可以用getspecialfolder获得start menu或程序组的起始路径,用<br>SHGetSpecialFolderLocation(handle, <br>CSIDL_PROGRAMS或CSIDL_STARTMENU, Pidl)) &nbsp;<br>用procedure Writelnk;<br>var<br>&nbsp; ShellObj: IUnknown;<br>&nbsp; ShellLink: IShellLink;<br>&nbsp; PFile: IPersistFile;<br>&nbsp; WFileName: WideString;<br>begin<br>&nbsp; ShellObj := CreateComObject(CLSID_ShellLink);<br>&nbsp; ShellLink := ShellObj as IShellLink;<br>&nbsp; PFile := ShellObj as IPersistFile;<br>//Set Link properties<br>//Parameters<br>&nbsp; ShellLink.SetArguments(PChar( Arguments ));<br>//Description<br>&nbsp; ShellLink.SetDescription(PChar( Description ));<br>//Hotkey<br>&nbsp; ShellLink.SetHotKey(HotKey);<br>//Icon<br>&nbsp; if IconFile &lt;&gt; '' then<br>&nbsp; &nbsp; ShellLink.SetIconLocation(PChar( IconFile ), IconIndex);<br>//Shelllink target<br>&nbsp; ShellLink.SetPath(PChar( Path ));<br>//ShowCommand<br>&nbsp; case WindowState of<br>&nbsp; &nbsp; wsNormal &nbsp; : ShellLink.SetShowCmd(SW_SHOWNORMAL);<br>&nbsp; &nbsp; wsMinimized: ShellLink.SetShowCmd(SW_MINIMIZE);<br>&nbsp; &nbsp; wsMaximized: ShellLink.SetShowCmd(SW_MAXIMIZE);<br>&nbsp; end;<br>//Working Dir<br>&nbsp; if WorkingDirectory = '' then<br>&nbsp; &nbsp; WorkingDirectory := ExtractFilePath( Path );<br>&nbsp; ShellLink.SetWorkingDirectory(PChar( WorkingDirectory ));<br>// Save<br>&nbsp; &nbsp; WFileName :=GetSpecialFolder+LinkFileName;<br>&nbsp; PFile.Save(PWChar(WFileName), False);<br>end;<br>如果要加入到某个程序组中,先用createdir(startmenupath+‘/yourgroupname’);创建组。<br>若想要详细代码的话,我可以mail一个我写的控件。
 
今天看了帮助,搞定了,谢谢。<br>其他人只好抱歉了。
 
后退
顶部