var<br>reg:TRegistry;<br>User Registry;<br><br>begin<br>reg:=TRegistry.Create;<br>try<br>Reg.RootKey:=HKEY_CLASSES_ROOT;<br>Reg.CreateKey('/txtfile/shell/用我的记事本打开(&C)/command');<br>If Reg.OpenKey('txtfile/shell/用我的记事本打开(&C)/command', true) then<br>Reg.WriteString('',Extractfilepath(Application.ExeName)+Extractfilename(Application.ExeName)+' "%1"');<br>finally<br> Reg.Free;<br>end;