如何在所有文件、文件夹的鼠标右键添加“用某某软件打开”??(50分)

  • 主题发起人 主题发起人 chen bin
  • 开始时间 开始时间
C

chen bin

Unregistered / Unconfirmed
GUEST, unregistred user!
如何在所有文件、文件夹的鼠标右键添加“用某某软件打开”,然后用该软件打开所选中的多个文件(例如像UltraEdit一样)<br>还有一定要避免在WinXP下显示消息框“用某某软件打开”。
 
&nbsp; &nbsp; &nbsp;try<br>&nbsp; &nbsp; &nbsp; &nbsp; Reg:=TRegistry.Create;<br>&nbsp; &nbsp; &nbsp; &nbsp; try<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.RootKey:=HKEY_CLASSES_ROOT;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if not Reg.KeyExists('*/Shell/iTEXT') then<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.OpenKey('*/Shell/iTEXT',True);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteString('','用iTEXT打开');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.CloseKey;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.OpenKey('*/Shell/iTEXT/Command',True);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.WriteString('','"'+ParamStr(0)+'" "%1"');<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.CloseKey;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; &nbsp; finally<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Reg.Free;<br>&nbsp; &nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; &nbsp; except<br>&nbsp; &nbsp; &nbsp; end;
 
没明白我的意思,我想做到向UltraEdit的文件并联,但还包括目录
 

Similar threads

后退
顶部