简体   繁体   English

如何在innosetup中使用静默安装程序下载和安装.net Framework 4.5?

[英]How to download and install .net framework 4.5 using silent installer in innosetup?

I want to check whether .net framework 4.5 available in end-user PC.If not it should download and install the .net framework 4.5 from this link http://www.microsoft.com/en-us/download/confirmation.aspx?id=30653 ,using innosetup with silent installer... 我想检查最终用户PC中是否有.net framework 4.5。如果没有,则应从此链接http://www.microsoft.com/zh-cn/download/confirmation.aspx下载并安装.net framework 4.5 。 ?id = 30653 ,在无提示安装程序中使用innosetup ...

Actually i followed this link http://www.vincenzo.net/isxkb/index.php?title=.NET_-_Detect_framework ,but in this link it takes to web browser page and downloading is happening, i want to download and install the .net framework 4.5 within innosetup wizard itself,it should happen like silent installation. 实际上,我遵循了此链接http://www.vincenzo.net/isxkb/index.php?title=.NET_-_Detect_framework ,但是在此链接中,它需要转到Web浏览器页面并且正在下载,我想下载并安装.net framework 4.5 innosetup向导本身,它应该像静默安装一样发生。

How to achieve this task? 如何完成这项任务?

Use Inno Setup ITDDownload plug-in for this purpose: Inno setup: Install file from Internet 为此,请使用Inno Setup ITDDownload插件: Inno setup:从Internet安装文件

The code for detecting .NET framework is fine but instead of executing browser: 用于检测.NET Framework的代码很好,但是可以执行浏览器:

ShellExec('open', 'http://download/.../dotnetfx.exe','','',SW_SHOWNORMAL,ewNoWait,ErrorCode);

download the file (.exe) into some directory and run it: 将文件(.exe)下载到某个目录并运行:

function ITD_DownloadFile(const url, filename: string): boolean;
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;

Use procedures above - they require some initialization (you can finf it in ITD example (I am writing from my head) 上面的使用过程-它们需要一些初始化(您可以在ITD示例中找到它(我在脑海中书写)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM