正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- //---------------------------------------------------------------------------
- // OnBegin
- //
- // The OnBegin event is called directly by the framework after the setup
- // initializes.
- //---------------------------------------------------------------------------
- function OnBegin()
- string svCurrentDir;
- begin
- // TO DO: you may change default non-UI setting, for example
- //
- // You may also perform your custom initialization steps, check requirements, etc.
-
- GetCurrentDir(svCurrentDir);
- svCurrentDir = svCurrentDir+"\\dotnetfx20.exe";//这里的dotnetfx20.exe可到官网上下载
- RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); //设置默认的注册表键值根节点
- // 判断是否存在.net
- if (RegDBKeyExist ("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727") < 0) then
- //当上面判断了没有安装.net这个软件时,则启动光盘里
- //dotnetfx.exe安装程序来安装。
- MessageBox ("检测到本机未安装.Net FrameWork 2.0,下一步将会先安装.Net FrameWork 2.0 ", INFORMATION);
- if(LaunchAppAndWait (svCurrentDir ,"", LAAW_OPTION_WAIT)<0) then
- MessageBox ("找不到安装程序或者安装出错,请双击运行dotnetfx20.exe,手动安装", INFORMATION);
- return 0;
- endif;
- endif;
- //SRCDIR 安装源目录的全路径
- //SRCDISK 安装源目录的盘符
- end;
复制代码
|