首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 其他开发语言 >

Inno Setup 在安装包自定义页面里怎么实现自动下载并且自动安装过程

2012-03-09 
Inno Setup在安装包自定义页面里如何实现自动下载并且自动安装过程,求高手指教如题!!!在安装包里自定义一

Inno Setup 在安装包自定义页面里如何实现自动下载并且自动安装过程,求高手指教
如题!!!
在安装包里自定义一个页面,内有RadioButton,ComboBox等,如何实现自动下载

一个附件并且自动安装这一过程,该附件链接地址已有,求高手指教,希望能给

点例子或代码,谢谢!!!

[解决办法]
参考:

Delphi(Pascal) code
function InitializeSetup: Boolean;var Path:string;           ResultCode: Integer;           dotNetV2RegPath:string;           dotNetV2DownUrl:string;           dotNetV2PackFile:string;       begin            dotNetV2RegPath:='SOFTWARE\Microsoft\.NETFramework\policy\v2.0';   dotNetV2DownUrl:='\\lg-fs\Rnd\Software\1.Free to Install\Standard\dotnet framework\2.0\NetFx20SP1_x86.exe';            dotNetV2PackFile:='{src}\NetFx20SP1_x86.exe';            if RegKeyExists(HKLM, dotNetV2RegPath)    then begin                  Result := true;       end            else begin                  if MsgBox('.Net Framework2.0 Running Environment not installed, install it now?', mbConfirmation, MB_YESNO) = idYes        then begin                              Path := ExpandConstant(dotNetV2PackFile);                        if(FileOrDirExists(Path))            then begin                              Exec(Path, '/q', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);                          if RegKeyExists(HKLM, dotNetV2RegPath)             then begin                Result := true;                           end                           else begin             MsgBox('Fail to install .Net Framework2.0, system will be not working, setup will quit!',mbInformation,MB_OK);                       end                        end                        else begin                if MsgBox('Install directory does not contain .Net Framework setup package锛宒o you want to download it to install now?', mbConfirmation, MB_YESNO) = idYes                then begin                    Path := ExpandConstant('{pf}\Internet Explorer\iexplore.exe');                                        Exec(Path, dotNetV2DownUrl , '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);                                        MsgBox('Please install .Net Framework2.0锛宼hen run this setup',mbInformation,MB_OK);                                        Result := false;                              end                else begin                                       MsgBox('.Net Framework2.0 is not installed, system will be not working, setup will quit!',mbInformation,MB_OK);                                    Result := false;                              end                        end                  end       else begin           MsgBox('.Net Framework2.0 is not installed, system will be not working, setup will quit!',mbInformation,MB_OK);           Result := false;       end;   end;   StopInfoLogService();end; 

热点排行