Inno Setup 打包安裝判斷是否安裝.net freamework 3.5 和 access2007的數據連接
生活随笔
收集整理的這篇文章主要介紹了
Inno Setup 打包安裝判斷是否安裝.net freamework 3.5 和 access2007的數據連接
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
[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('請(qǐng)不要跳過(guò)所需運(yùn)行庫(kù)安裝向?qū)?否則無(wú)法繼續(xù)安裝!',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;//操作註冊(cè)表 卸載事件
[Registry]
Root: HKCR; Subkey: "*\shell\Lock 文件加密"; ValueType: string; ValueName: "Lock 文件加密"; ValueData: "{app}"; Flags: uninsdeletekey詢(xún)問(wèn)語(yǔ)句if MsgBox('系統(tǒng)檢測(cè)到您沒(méi)有安裝.Net Framework2.0,是否立刻下載并安裝?', mbConfirmation, MB_YESNO) = idYes then
轉(zhuǎn)載于:https://www.cnblogs.com/cscs/archive/2010/04/14/1711803.html
總結(jié)
以上是生活随笔為你收集整理的Inno Setup 打包安裝判斷是否安裝.net freamework 3.5 和 access2007的數據連接的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 软件生命周期管理研讨会有感
- 下一篇: Web.py Cookbook 简体中文