16,748
社区成员
发帖
与我相关
我的任务
分享
Procedure InstallFrame(FileName:string);
var ResultCode:Integer;
begin
if RegKeyExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\.NETFramework\policy\v2.0') then
begin
end
else begin
if Msgbox('安装程序检测到本机尚未安装FrameWork,为确保程序正确运行,请点击确定按钮完成FrameWork的安装!',mbConfirmation,MB_OKCANCEL) = IDOK then
begin
if not ShellExec('open',ExpandConstant('"{tmp}\FrameWork\dotnetfx.exe"'),'',ExpandConstant('"{tmp}\FrameWork\"'),SW_SHOW,ewWaitUntilTerminated, ResultCode) then
begin
SysErrorMessage(ResultCode);
end
end
else begin
Msgbox('FrameWork未安装,安装程序可能不能正确运行!',mbConfirmation,MB_OK);
end
end;
end;
[Files]
Source: "D:\framework\dotnetfx.exe" ; DestDir: "{tmp}";Flags: dontcopy ;BeforeInstall: InstallFrame('{tmp}\framework\dotnetfx.exe')