1
我想在用戶接受密鑰添加後添加註冊表項。 關鍵會告訴Firefox哪裏可以找到我們的插件(存儲在應用程序文件夾中)Inno Setup中運行條目中運行腳本代碼(添加註冊表項)而不是可執行文件
用戶將得到一個複選框「install ff plug-in?」與我們問「安裝Chrome插件」和「安裝即插件?。
[Code]
function GetHKLM: Integer;
begin
if IsWin64 then
Result := HKLM64
else
Result := HKLM32;
end;
function CheckForMozilla: Boolean;
begin
Result := False;
if RegKeyExists(GetHKLM(), 'SOFTWARE\Mozilla\Mozilla Firefox') then
begin
Result := True;
end;
if RegKeyExists(GetHKLM(), 'SOFTWARE\Mozilla\Firefox') then
begin
Result := True;
end;
end;
function AddFFKey : Boolean;
begin
// Some way to write this key in code section :
GetHKLM()\SOFTWARE\Mozilla\Mozilla Firefox\extensions\[email protected]'
end;
[Run]
Filename: AddFFKey; Flags: runascurrentuser postinstall ; \
Check: CheckForMozilla; Description: "Install firefox plug-in"
謝謝大家!
史蒂夫