inno setup 5 打包中.net framework 4.0如何打包安装
明明机器上已经安装了v4.0,但是还是返回未安装。[code]functionCheckDotNet4_0():boolean;beginResult:=notRegKe...
明明机器上已经安装了v4.0,但是还是返回未安装。
[code]
function CheckDotNet4_0():boolean;
begin
Result:= not RegKeyExists(HKLM, 'SOFTWARE/Microsoft/.NETFramework/policy/v4.0');
end;
function InitializeSetup(): Boolean;
var Path:string;
ResultCode: Integer;
begin
if CheckDotNet4_0() then
begin
ExtractTemporaryFile('dotNetFx40_Full_x86_x64_en.exe');
Exec(ExpandConstant('{tmp}\dotNetFx40_Full_x86_x64_en.exe'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end
result:=true;
end; 展开
[code]
function CheckDotNet4_0():boolean;
begin
Result:= not RegKeyExists(HKLM, 'SOFTWARE/Microsoft/.NETFramework/policy/v4.0');
end;
function InitializeSetup(): Boolean;
var Path:string;
ResultCode: Integer;
begin
if CheckDotNet4_0() then
begin
ExtractTemporaryFile('dotNetFx40_Full_x86_x64_en.exe');
Exec(ExpandConstant('{tmp}\dotNetFx40_Full_x86_x64_en.exe'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end
result:=true;
end; 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询