try<br> Reg:=TRegistry.Create;<br> try<br> Reg.RootKey:=HKEY_CLASSES_ROOT;<br> if not Reg.KeyExists('*/Shell/iTEXT') then<br> begin<br> Reg.OpenKey('*/Shell/iTEXT',True);<br> Reg.WriteString('','用iTEXT打开');<br> Reg.CloseKey;<br> Reg.OpenKey('*/Shell/iTEXT/Command',True);<br> Reg.WriteString('','"'+ParamStr(0)+'" "%1"');<br> Reg.CloseKey;<br> end;<br> finally<br> Reg.Free;<br> end;<br> except<br> end;