Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
systems:innosetup_installer [2011/09/16 10:09] smayr |
systems:innosetup_installer [2020/08/26 12:06] (current) ajdavis |
||
---|---|---|---|
Line 109: | Line 109: | ||
function isxdl_SetOption(Option, | function isxdl_SetOption(Option, | ||
external ' | external ' | ||
- | |||
const | const | ||
Line 192: | Line 191: | ||
</ | </ | ||
- | == Detecting .NET 4.0 Framework & Installing It == | + | == Detecting .NET 4.0 Framework & Installing It If Missing |
=== Method 1 === | === Method 1 === | ||
Source: http:// | Source: http:// | ||
- | innosetup checking for 4.0 framework and installing if missing | + | <code inno> |
- | Found a script online and tweaked it a bit. Figure others would like it to | + | |
[CustomMessages] | [CustomMessages] | ||
dotnetmissing=This application requires Microsoft Framework 4.0 which is not yet installed on this computer. Would you like to download it now? | dotnetmissing=This application requires Microsoft Framework 4.0 which is not yet installed on this computer. Would you like to download it now? | ||
+ | . . . | ||
+ | [Code] | ||
function InitializeSetup(): | function InitializeSetup(): | ||
var | var | ||
- | ErrorCode: Integer; | + | |
- | netFrameWorkInstalled : Boolean; | + | netFrameWorkInstalled : Boolean; |
- | isInstalled: | + | isInstalled: |
begin | begin | ||
- | result := true; | + | |
- | // Check for the .Net 4.0 framework | + | |
- | isInstalled := 0; | + | isInstalled := 0; |
- | netFrameworkInstalled := RegQueryDWordValue(HKLM, | + | netFrameworkInstalled := RegQueryDWordValue(HKLM, |
- | if ((netFrameworkInstalled) and (isInstalled <> 1)) then netFrameworkInstalled := false; | + | if ((netFrameworkInstalled) and (isInstalled <> 1)) then begin |
+ | | ||
+ | end; | ||
- | + | | |
- | + | if (MsgBox(ExpandConstant(' | |
- | + | begin | |
- | if netFrameworkInstalled = false then | + | ShellExec(' |
- | begin | + | |
- | if (MsgBox(ExpandConstant(' | + | |
- | mbConfirmation, | + | end; |
- | begin | + | result := false; |
- | ShellExec(' | + | end; |
- | ' | + | |
- | '','', | + | |
- | end; | + | |
- | result := false; | + | |
- | end; | + | |
end; | end; | ||
+ | </ | ||
=== Method 2 === | === Method 2 === | ||
Source: http:// | Source: http:// | ||
- | This code checks, downloads and installs it if needed. | + | This code checks, downloads and installs it if needed. |
+ | <code inno> | ||
[CustomMessages] | [CustomMessages] | ||
dotnetfx40_title=.NET Framework 4.0 | dotnetfx40_title=.NET Framework 4.0 | ||
+ | dotnetfx40_size=48.1 MB | ||
- | en.dotnetfx40_size=48.1 MB | + | . . . |
- | [code] | + | [Code] |
const | const | ||
- | dotnetfx40_url = ' | + | |
procedure dotnetfx40(); | procedure dotnetfx40(); | ||
var | var | ||
- | version: cardinal; | + | |
begin | begin | ||
- | RegQueryDWordValue(HKLM, | + | |
- | if version <> 1 then | + | if version <> 1 then begin |
- | AddProduct(' | + | AddProduct(' |
- | '/q / | + | '/q / |
- | CustomMessage(' | + | CustomMessage(' |
- | CustomMessage(' | + | CustomMessage(' |
- | dotnetfx40_url); | + | dotnetfx40_url); |
+ | end; | ||
end; | end; | ||
+ | </ | ||
== Installer Tips == | == Installer Tips == | ||
=== Restart Computer === | === Restart Computer === | ||
- | When an installer, after its installation, | + | When an installer, after its installation, |
< | < | ||
Line 279: | Line 280: | ||
==== How To Do A Clean Boot Using the System Configuration Utility ==== | ==== How To Do A Clean Boot Using the System Configuration Utility ==== | ||
- | 1. Click " | + | # |
- | 2. In " | + | # In " |
- | 3. Click " | + | # Click " |
- | 4. Click " | + | # Click " |
- | 5. Click " | + | # Click " |
- | 6. Click " | + | # Click " |
- | 7. Restart computer | + | # Restart computer |
- | 8. Insert the < | + | # Insert the < |
When the installation is complete you must restore your computer from a clean boot. | When the installation is complete you must restore your computer from a clean boot. | ||
- | 1. Click " | + | # |
- | Note: you can choose to do the following steps or just click " | + | # In " |
- | 2. In " | + | # Click " |
- | 3. Click " | + | # Click " |
- | 4. Click " | + | # Click " |
- | 5. Click " | + | # Restart computer |
- | 6. Restart computer | + | |
------------------------------------------------------------------ | ------------------------------------------------------------------ | ||
Line 304: | Line 304: | ||
> With a customer we run in to the following problem. | > With a customer we run in to the following problem. | ||
> | > | ||
- | > He starts the setup and a a random point it gets killed (not an normal | + | > He starts the setup and at a random point it gets killed (not an normal |
> stop).... | > stop).... | ||
> | > | ||
- | > Weh I use the /LOG option the log also just stops at a point en no | + | > When I use the /LOG option, the log also just stops at a point and no |
- | > closing/ | + | > closing/ |
- | > folders are still there. This suggest that (probebly | + | > folders are still there. This suggest that (probably |
> aka virusscanner) is killing the installer process... | > aka virusscanner) is killing the installer process... | ||
+ | == Plugin: File Downloader IDP == | ||
+ | |||
+ | * Download: [[https:// | ||
+ | * Uses: FTP, HTTP and HTTPS protocols | ||
+ | |||
+ | Example: | ||
+ | <code inno> | ||
+ | #include < | ||
+ | |||
+ | [Files] | ||
+ | Source: " | ||
+ | Source: " | ||
+ | Source: " | ||
+ | |||
+ | [Icons] | ||
+ | Name: " | ||
+ | |||
+ | [Code] | ||
+ | procedure InitializeWizard(); | ||
+ | begin | ||
+ | idpAddFileSize(' | ||
+ | idpAddFileSize(' | ||
+ | idpAddFileSize(' | ||
+ | |||
+ | idpDownloadAfter(wpReady); | ||
+ | end. | ||
+ | </ |