Inno Setup 打包安裝判斷是否安裝.net freamework 3.5 和 access2007的數據連接
生活随笔
收集整理的這篇文章主要介紹了
Inno Setup 打包安裝判斷是否安裝.net freamework 3.5 和 access2007的數據連接
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
[code]
//安裝前方法
function InitializeSetup: Boolean;var Path:string ;ResultCode: Integer;beginif RegKeyExists(HKLM, 'SOFTWARE\Microsoft\.NETFramework\v3.0 SP1')=false thenbeginPath := ExpandConstant('Setup\DotNetFX35\dotNetFx35setup.exe');Exec(Path, '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);endif RegKeyExists(HKLM, 'SOFTWARE\Microsoft\office\12.0')=false thenbeginPath := ExpandConstant('Setup\AccessDatabaseEngineForEnglish.exe');Exec(Path, '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);endif RegKeyExists(HKLM, 'SOFTWARE\Microsoft\.NETFramework\v3.0 SP1') and RegKeyExists(HKLM, 'SOFTWARE\Microsoft\office\12.0') thenbeginResult := true;endelsebeginMsgBox('請不要跳過所需運行庫安裝向導,否則無法繼續安裝!',mbInformation,MB_OK);Result := false;endend;
//卸載前方法
function InitializeUninstall(): Boolean;
beginResult := MsgBox('InitializeUninstall:' #13#13 'Uninstall is initializing. Do you really want to start Uninstall?', mbConfirmation, MB_YESNO) = idYes;if Result = False thenMsgBox('InitializeUninstall:' #13#13 'Ok, bye bye.', mbInformation, MB_OK);
end;
//程序卸載中
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
beginif CurUninstallStep = usUninstall thenMsgBox('哇哈哈',mbInformation,MB_OK);
end;//操作註冊表 卸載事件
[Registry]
Root: HKCR; Subkey: "*\shell\Lock 文件加密"; ValueType: string; ValueName: "Lock 文件加密"; ValueData: "{app}"; Flags: uninsdeletekey詢問語句if MsgBox('系統檢測到您沒有安裝.Net Framework2.0,是否立刻下載并安裝?', mbConfirmation, MB_YESNO) = idYes then
轉載于:https://www.cnblogs.com/cscs/archive/2010/04/14/1711803.html
總結
以上是生活随笔為你收集整理的Inno Setup 打包安裝判斷是否安裝.net freamework 3.5 和 access2007的數據連接的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软件生命周期管理研讨会有感
- 下一篇: Web.py Cookbook 简体中文