代码拉取完成,页面将自动刷新
unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,Registry, Buttons,ShellApi;
type
TForm1 = class(TForm)
Label1: TLabel;
BitBtn1: TBitBtn;
Memo1: TMemo;
Label2: TLabel;
Label3: TLabel;
procedure FormCreate(Sender: TObject);
procedure Label2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure RegisterRight;
end;
var
Form1: TForm1;
implementation
uses IExeInf;
{$R *.dfm}
{ TForm1 }
procedure TForm1.RegisterRight;
const
REGKEY='Folder\Shell';
var
i:integer;
ie:IExeInterface;
reg:TRegistry;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_CLASSES_ROOT;
for i := 0 to exeList.Count-1 do
begin
ie:=IExeInterface(exeList.items[i]);
if reg.OpenKey(REGKEY+'\'+ie.GetParam,true) then
begin
reg.WriteString('','SM -'+ie.GetDescription);
reg.CloseKey;
reg.OpenKey(REGKEY+'\'+ie.GetParam+'\command',true);
reg.WriteString('',Application.ExeName+' -'+ie.GetParam+' %1');
reg.CloseKey;
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterRight;
end;
procedure TForm1.Label2Click(Sender: TObject);
begin
ShellExecute(0,'open','mailto:[email protected]','','',SW_SHOW);
end;
end.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。