|
Hi,
I had the same problem and I modified the dotnetfxversion.iss file like that and working for me.
[Code]
type
NetFXType = (NetFx10, NetFx11, NetFx20, NetFx30, NetFx35, NetFx40Client, NetFx40Full, NetFx45);
const
netfx11plus_reg = 'Software\Microsoft\NET Framework Setup\NDP\';
function netfxinstalled(version: NetFXType; lcid: string): boolean;
var
regVersion: cardinal;
regVersionString: string;
begin
if (lcid <> '') then
lcid := '\' + lcid;
if (version = NetFx10) then begin
RegQueryStringValue(HKLM, 'Software\Microsoft\.NETFramework\Policy\v1.0\3705', 'Install', regVersionString);
Result := regVersionString <> '';
end else begin
case version of
NetFx11:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v1.1.4322' + lcid, 'Install', regVersion);
NetFx20:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v2.0.50727' + lcid, 'Install', regVersion);
NetFx30:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.0\Setup' + lcid, 'InstallSuccess', regVersion);
NetFx35:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.5' + lcid, 'Install', regVersion);
NetFx40Client:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Install', regVersion);
NetFx40Full:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Install', regVersion);
NetFx45:
begin
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion);
// >= 4.5.0 and <= 4.6.0
Result := (regVersion >= 378389) and (regVersion <= 393295);
Exit;
end;
end;
Result := (regVersion <> 0);
end;
end;
function netfxspversion(version: NetFXType; lcid: string): integer;
var
regVersion: cardinal;
begin
if (lcid <> '') then
lcid := '\' + lcid;
case version of
NetFx10:
//not supported
regVersion := -1;
NetFx11:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v1.1.4322' + lcid, 'SP', regVersion)) then
regVersion := -1;
NetFx20:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v2.0.50727' + lcid, 'SP', regVersion)) then
regVersion := -1;
NetFx30:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.0' + lcid, 'SP', regVersion)) then
regVersion := -1;
NetFx35:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.5' + lcid, 'SP', regVersion)) then
regVersion := -1;
NetFx40Client:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Servicing', regVersion)) then
regVersion := -1;
NetFx40Full:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Servicing', regVersion)) then
regVersion := -1;
NetFx45:
if (RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion)) then begin
if (regVersion = 379893) or (regVersion = 393295) then
regVersion := 2 // 4.5.2
else if (regVersion = 378675) or (regVersion = 378758) or (regVersion = 393295) then
regVersion := 1 // 4.5.1
else if (regVersion = 378389) or (regVersion = 393295) then
regVersion := 0 // 4.5.0
else
regVersion := -1;
end;
end;
Result := regVersion;
end;
Best regards.
|
|
|
|
|
|
Hi,
I think I found a problem in dotnetfxversion.iss!?
When the .NET Framework 4.6 is installed is not regVersion 379893 (4.5.2) but 393295 (4.6) by default.
Issue found here:
begin
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion);
Result := (regVersion >= 378389) and (regVersion <= 379893);
Exit;
end;
And here:
if (RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion)) then begin
if (regVersion = 379893) then
regVersion := 2
else if (regVersion = 378675) or (regVersion = 378758) then
regVersion := 1
else if (regVersion = 378389) then
regVersion := 0
else
regVersion := -1;
end;
Best regards.
modified 4-Aug-15 10:31am.
|
|
|
|
|
Please add 2015 support.
http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe
http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe
|
|
|
|
|
|
This actually helped me with what Ive been researching and trying to achieve independently since the past few weeks. This is actually a total bundle of per-requisites to the application I'm currently building.
Thanks a lot.
|
|
|
|
|
Would it be difficult to add the VSTO 2010 runtime dependency?
|
|
|
|
|
|
Hello, I am using the the sample script and commented out all #define statements except for
use_dotnetfx45
use_vc2012
When I ran the setup file, it seems to have launched the .net45 installer but after a while it displayed the the .net command line syntax message
Usage: Setup[switches] ...
Any idea what is going wrong?
Thanks.
|
|
|
|
|
I've solved my problem.
There are two issues:
1. NET 4.5.1 Install only works when running on a UI session.
Remove /q switch (dotnetfx45.iss). More info here[^]
2. The url for vcredist2012 x86 is incorrect. It should be
vcredist_x86.exe not vcredist_x84.exe (vcredist2012.iss)
|
|
|
|
|
How can I handle the situation where my dependent installers have multiple files rather than a single installer? My system needs to install some hardware drivers, but the driver files have their own dependent ini files which must be in the same folder.
Thanks!
Nick
|
|
|
|
|
hello, can someone explain me in detail how to get the "installer" for dotnetfx40full working?. After 2 hours trying i still cant get it to work. What do i have to add to my installer to make it work :X please help me
|
|
|
|
|
Hi.
In the current version it will always install the client (smaller version)
To fix this. Remove the following code.
#ifdef use_dotnetfx40
if (not netfxinstalled(NetFx40Client, '') and not netfxinstalled(NetFx40Full, '')) then
dotnetfx40client();
#endif
and replace it with this.
#ifdef use_dotnetfx40
if (not netfxinstalled(NetFx40Full, '')) then
dotnetfx40full();
#endif
This should always install the full version even if the client version exists.
Thanks,
David Eaton
|
|
|
|
|
Another issue I just discovered while adding more comments to my setup file: You can't do this:
; Include 3rd-party software check and download support
#include "scripts\products.iss"
#include "scripts\products\stringversion.iss"
#include "scripts\products\winversion.iss"
#include "scripts\products\fileversion.iss"
#include "scripts\products\dotnetfxversion.iss"
; Include modules for required products
#include "scripts\products\msi31.iss"
#include "scripts\products\dotnetfx40client.iss"
#include "scripts\products\dotnetfx40full.iss"
#include "scripts\products\dotnetfx45.iss"
It tells you that ";" is not valid here. True, because the previous include files have left open the [Code] section and whatever comes next or is included next must cope with that forgotten state. Either by starting another section like [Files] or [Setup], or by continuing in code syntax. Comments must be prefixed with "//" here instead of ";".
My suggestion is to never leave any file in a [Code] section and never expect that a file is included in a [Code] section. Here's what I've modified in my files:
- Change "//" comments at the beginning of all files to ";" style.
- Insert the [Code] line at the top of each file that includes only code.
- Add a [Setup] line at the end of all files to revert to non-code syntax.
That way, you can always include any file without knowing how it's exactly structured.
|
|
|
|
|
According to my test, it has a bug that I spotted from reading the code in file "stringversion.iss". I also found this code elsewhere, with the same issue. It says:
1.0 is equal to 1.0.1
compareversion('1.0', '1.0.1') = 0
This doesn't seem exactly correct. The problem is that it just stops comparing whenever one version string has no more numbers. If one has more numbers than the other, they are ignored.
Can this be fixed somehow? I tried to rewrite the whole thing but soon quit again. My brain refuses to produce such low-level commands that were required with the available means. Not even arrays and a string split function available, not even dreaming of regular expressions...
Another requirement I'd have for my use is that it ignores anything after /[0-9.]+/. This isn't currently the case because it can only search for a "." and if the suffix is separated by something else, like in "1.0.1-test", it can only parse (1, 0) but not (1, 0, 1). I'd add a preprocessor for that to trim the version strings to any digits or a dot and stop as soon as I find another character.
I have a nice little C# implementation for all that, but still having trouble to fully correctly use it here (can't unload and delete my DLL anymore). Also, using a .NET DLL would somehow defeat the use of a script that can install .NET if it's not there... Pascal code is sooo weak (little power per code line) and lenghty compared to it.
modified 8-Feb-15 5:33am.
|
|
|
|
|
Thanks for all your work on this. I use InnoSetup, but I didn't realize you could set and install the dependencies. This will help a lot.
|
|
|
|
|
Nice article !
Is it possible to extend this to have a helper to install VSTO ?
Thanks.
Stephane Moinard - CTO at QUALNET - France
|
|
|
|
|
VSTO might depend on current user's profile, If anyone decides to push an app with a deployment tool that thing will work as admin account or system account, and the user part might be missing. Installing vsto that way might cause more troubles than resolves.
Andrzej Demski
IBM / Software Packaging
|
|
|
|
|
Thank you for this reply.
Stephane Moinard - CTO at QUALNET - France
|
|
|
|
|
Hi
I just stumbled across this after spending most of my Saturday trying to get this to type of thing to work - wish I had found it yesterday.
How can I add PowerShell 2 and SQL Native Client 11 to my list, I think I can work out the latter by checking for SQLNCLI11 in the registry, but I am unsure about PowerShell 2.
thanks for this, it has saved me from pulling ALL of my hair out.
Thx
D
|
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:36pm.
|
|
|
|
|
Sweet...
I can't take credit for the work because it's just a couple of people knocking ideas around.
Glad that you put it to good use.
Thanks,
David Eaton
|
|
|
|
|
Please help to install IE 10 / 11 using InnoSetup.
thanks
Kalpesh
|
|
|
|
|
My vote of 5 is fully deserved!
The .Net 4.5 offline installer comes in several localized files, or a series of language-packs (which is even better). Why the related script does not consider this case?
Thanks in advance.
|
|
|
|