//注册文件扩展名;
procedure RegAizbFile(EXEFile:String);
Var Reg:TRegistry;
begin
Reg:=TRegistry.Create;
try
Reg.RootKey:=HKEY_CLASSES_ROOT;
if Reg.OpenKey('',False) then
begin
if not Reg.KeyExists('.AZB') then
begin
Reg.OpenKey('.AZB',True);
Reg.WriteString('','Aizb_Paint_Box_File');
end;
if not Reg.KeyExists('.AIC') then
begin
Reg.OpenKey('.AIC',True);
Reg.WriteString('','Aizb_Paint_Box_IconFile');
end;
Reg.CloseKey;
if not Reg.KeyExists('Aizb_Paint_Box_File') then
begin
Reg.OpenKey('Aizb_Paint_Box_File',True);
Reg.WriteString('','Aizb图形文件');
end;
Reg.CloseKey;
if not Reg.KeyExists('Aizb_Paint_Box_IconFile') then
begin
Reg.OpenKey('Aizb_Paint_Box_IconFile',True);
Reg.WriteString('','Aizb图标文件');
end;
Reg.CloseKey;
if not Reg.KeyExists('Aizb_Paint_Box_File/DefaultIcon') then
begin
Reg.OpenKey('Aizb_Paint_Box_File/DefaultIcon',True);
Reg.WriteString('','"'+EXEFile+'",0');
end;
Reg.CloseKey;
if not Reg.KeyExists('Aizb_Paint_Box_IconFile/DefaultIcon') then
begin
Reg.OpenKey('Aizb_Paint_Box_IconFile/DefaultIcon',True);
Reg.WriteString('','"'+EXEFile+'",0');
end;
Reg.CloseKey;
if not Reg.KeyExists('Aizb_Paint_Box_File/Shell/Open/Command') then
begin
Reg.OpenKey('Aizb_Paint_Box_File/Shell/Open/Command',True);
Reg.WriteString('',EXEFile+' "%1"');
end;
Reg.CloseKey;
if not Reg.KeyExists('Aizb_Paint_Box_IconFile/Shell/Open/Command') then
begin
Reg.OpenKey('Aizb_Paint_Box_IconFile/Shell/Open/Command',True);
Reg.WriteString('',EXEFile+' "%1"');
end;
end;
finally
Reg.Free;
end;
end;