
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
	<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head><card id="MainCard" title="&#x6B22;&#x8FCE;&#x5149;&#x4E34;"><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a><br/>&nbsp;</p><p><b>&#x6807;&#x9898;&#x3A;</b> &#x4D;&#x6F;&#x64;&#x75;&#x6C;&#x61;&#x72;&#x20;&#x49;&#x6E;&#x6E;&#x6F;&#x53;&#x65;&#x74;&#x75;&#x70;&#x20;&#x44;&#x65;&#x70;&#x65;&#x6E;&#x64;&#x65;&#x6E;&#x63;&#x79;&#x20;&#x49;&#x6E;&#x73;&#x74;&#x61;&#x6C;&#x6C;&#x65;&#x72;&#x5B;&#x8F6C;&#x5D;</p><p><b>&#x4F5C;&#x8005;&#x3A;</b> &#x64;&#x6E;&#x61;&#x77;&#x6F;</p><p><b>&#x65E5;&#x671F;&#x3A;</b> &#x32;&#x30;&#x31;&#x36;&#x2D;&#x31;&#x31;&#x2D;&#x30;&#x33;&#x20;&#x30;&#x31;&#x3A;&#x35;&#x33;&#x20;&#x50;&#x4D;</p><p><b>&#x5206;&#x7C7B;&#x3A;</b> <a href="wap.asp?do=showLog&amp;cateID=16">&#x57;&#x69;&#x6E;&#x7F16;&#x7A0B;</a></p><p><b>&#x5185;&#x5BB9;&#x3A;</b> Introduction<br/>This article contains a modular InnoSetup install script that downloads (if setup files don&#39;t exist locally) and installs various dependencies like .NET Framework 1.1/2.0/3.5/4.0/4.6 o&#114; C++ Redistributable 2005/2008/2010/2012/2013/2015 on 32-bit and 64-bit Windows.<br/>Background<br/>Once upon a time, I needed an installer for my .NET applications. I knew that I could use the &#34;genius&#34; ClickOnce installer, but in my opinion it has a bad interface and is not very handy. Then I came across a script for InnoSetup that had everything I wanted, but unfortunately it was only for .NET 1.1. So, I spent quite a bit of time in InnoSetup to modify it to my needs and extending it vastly.<br/>Details<br/>The source code is written modular and is structured like this:<br/>&#xB7;setup.iss - contains the basic setup wh&#101;re you include the modules (products) you need. They need to be included at the top like #include &#34;scripts\products\dotnetfx11.iss&#34; and then you only have to call their main function inside the [Code] part like dotnetfx11();<br/>&#xB7;bin - contains the final output of the installer<br/>&#xB7;src - contains the application files of your program<br/>&#xB7;scripts<br/>&#160;&#160;&#160;&#160;&#x251C;products.iss - contains the shared code for the product scripts. You only have to change the [CustomMessages] part and [Files] part (inclusion of isxdl language files)<br/>&#160;&#160;&#160;&#160;&#x251C;isxdl - contains the downloader DLL for the setup (if there is something to download) and its language files (e.g. german.ini). This is the place wh&#101;re you can put your language files for the isxdl downloader in.<br/>&#160;&#160;&#160;&#160;&#x251C;products - contains the scripts for products which are required by the application (e.g. .NET Framework 2.0)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx11.iss - .NET Framework 1.1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx11lp.iss - .NET Framework 1.1 Language Pack<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx11sp1.iss - .NET Framework 1.1 + Service Pack 1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx20.iss - .NET Framework 2.0<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx20lp.iss - .NET Framework 2.0 Language Pack<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx20sp1.iss - .NET Framework 2.0 + Service Pack 1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx20sp1lp.iss - .NET Framework 2.0 Service Pack 1 Language Pack<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx20sp2.iss - .NET Framework 2.0 + Service Pack 2<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx20sp2lp.iss - .NET Framework 2.0 Service Pack 2 Language Pack<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx35.iss - .NET Framework 3.5<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx35lp.iss - .NET Framework 3.5 Language Pack<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx35sp1.iss - .NET Framework 3.5 + Service Pack 1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx35sp1lp.iss - .NET Framework 3.5 Service Pack 1 Language Pack<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx40client.iss - .NET Framework 4.0 Client Profile<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx40full.iss - .NET Framework 4.0 Full<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfx46.iss - .NET Framework 4.6<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;ie6.iss - Internet Explorer 6<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;iis.iss - Internet Information Services (just a check if it is installed)<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;jet4sp8.iss - Jet 4 + Service Pack 8<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;kb835732.iss - Security Up&#100;ate (KB835732) which is required by .NET Framework 2.0 Service Pack 1 on Windows 2000 Service Pack 4<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;mdac28.iss - Microsoft Data Access Components (MDAC) 2.8<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;msi20.iss - Windows Installer 2.0<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;msi31.iss - Windows Installer 3.1<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;msi45.iss - Windows Installer 4.5<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;sql2005express.iss - SQL Server 2005 Express + Service Pack 3<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;sql2008express.iss - SQL Server 2008 Express R2<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;sqlcompact35sp2.iss - SQL Server Compact 3.5 + Service Pack 2<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;vcredist2005.iss - Visual C++ 2005 Redistributable<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;vcredist2008.iss - Visual C++ 2008 Redistributable<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;vcredist2010.iss - Visual C++ 2010 Redistributable<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;vcredist2012.iss - Visual C++ 2012 Redistributable<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;vcredist2013.iss - Visual C++ 2013 Redistributable<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;vcredist2015.iss - Visual C++ 2015 Redistributable<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;wic.iss - Windows Imaging Component<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;winversion.iss - helper functions to determine the installed Windows version<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;fileversion.iss - helper functions to determine the version of a file<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;stringversion.iss - helper functions to correctly parse a version string<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;dotnetfxversion.iss - helper functions to determine the installed .NET Framework version including service packs<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#x251C;msiproduct.iss - helper functions to check for installed msi products<br/>Most of the time you need to tweak the setup.iss because of different Windows version checks and inclusion of your required dependencies.<br/>If a dependency (product) is not installed, the script checks if the product&#39;s setup exists inside the dependencies directory which is configurable in products.iss. By default it is: .\MyProgramDependencies. If they don&#39;t exist there, it tries to download them (except for Windows service packs). This means a support for offline installing via CD o&#114; DVD is also possible.<br/>The installation routine of the dependencies is automatic, and they run in quiet o&#114; semi quiet mode. Therefore no user interaction is needed (except for Internet Explorer 6). This setup script uses [CostumMessages] so that you can easily add multi-language support to your setup and easily configure settings (like the offline dependencies directory) without looking at the [Code] part.<br/>Applications used for the script are:<br/>&#xB7;Inno Setup - setup engine (version 5.5.6)<br/>&#xB7;ISTool - extends Inno Setup but I just needed the isxdl.dll downloader (version 5.3.0)<br/>---------------------------------------------------- &#x5B89;&#x88C5;&#x793A;&#x4F8B; ----------------------------------------------------<br/>[1].&#x539F;&#x6587;&#x94FE;&#x63A5;&#xFF1A;http://www.codeproject.com/Articles/20868/NET-Framework-Installer-for-InnoSetup<br/>[2].&#x6E90;&#x7801;&#x4E0B;&#x8F7D;&#xFF1A;http://www.mzwu.com/pic/201611/innodependencyinstaller.zip<br/>[3].&#x4E2D;&#x6587;&#x8BD1;&#x6587;&#xFF1A;http://www.cnblogs.com/yplong/p/4261244.html</p><p> + <a href="#CommentCard">&#x67E5;&#x770B;&#x5F53;&#x524D;&#x65E5;&#x5FD7;&#x8BC4;&#x8BBA;</a> (0)</p><p>&nbsp;<br/><br/><a href="wap.asp?do=Login">&#x767B;&#x5F55;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.627&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="postCommentCard"><p><b>&#x6807;&#x9898;&#x3A;</b> <a href="#MainCard">&#x4D;&#x6F;&#x64;&#x75;&#x6C;&#x61;&#x72;&#x20;&#x49;&#x6E;&#x6E;&#x6F;&#x53;&#x65;&#x74;&#x75;&#x70;&#x20;&#x44;&#x65;&#x70;&#x65;&#x6E;&#x64;&#x65;&#x6E;&#x63;&#x79;&#x20;&#x49;&#x6E;&#x73;&#x74;&#x61;&#x6C;&#x6C;&#x65;&#x72;&#x5B;&#x8F6C;&#x5D;</a></p><p><br/>你没有权限发表评论</p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.627&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card><card id="CommentCard"><p>&#x6682;&#x65E0;&#x8BC4;&#x8BBA;</p><p><a href="#MainCard">&#x8FD4;&#x56DE;</a></p><p><br/>&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;</p><p><a href="wap.asp">&#x6728;&#x5B50;&#x5C4B;</a></p><p><a href="http://www.pjhome.net/wap.asp">PJBlog3&nbsp;v3.2.9.518</a>&nbsp;Inside.</p><p>Processed&nbsp;In&nbsp;0.627&nbsp;ms</p><do type="prev" label="&#x8FD4;&#x56DE;"><prev/></do></card>
</wml>
