|
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.
|
|
|
|
|
Great script! I needed to install SQL Server 2014 LocalDB and implemented it this way
Add file scripts\products\sql2014localdb.iss
(there are a few other minor changes to do to the main file to link to this new file, just copy/paste the code you find for SQL2008 and adapt it for this new file)
[CustomMessages]
sql2014localdb_title=SQL Server 2014 LocalDB
en.sql2014localdb_size=36.6 MB
;de.sql2014localdb_size=36,6 MB
en.sql2014localdb_size_x64=43.1 MB
;de.sql2014localdb_size_x64=43,1 MB
[Code]
const
sql2014localdb_url = 'http://care.dlservice.microsoft.com/dl/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2032BIT/SqlLocalDB.msi';
sql2014localdb_url_x64 = 'http://care.dlservice.microsoft.com/dl/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/LocalDB%2064BIT/SqlLocalDB.msi';
procedure sql2014localdb();
var
version: string;
begin
if not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Microsoft SQL Server Local DB\Installed Versions\12.0') then
begin
if (not IsIA64()) then
AddProduct('SqlLocalDB.msi',
'/QB IACCEPTSQLLOCALDBLICENSETERMS=YES',
CustomMessage('sql2014localdb_title'),
CustomMessage('sql2014localdb_size' + GetArchitectureString()),
GetString(sql2014localdb_url, sql2014localdb_url_x64, ''),
false, false);
end;
end;
|
|
|
|
|
Thanks for sharing ! Great job.
|
|
|
|
|
When the wic exe is provided the script appears to insist on downloading it anyway. I did a little digging and the '_x86' is not getting inserted into the filename because it uses GetArchitectureString which returns empty string for x86. To get around it I just created a 2nd version of GetArchitectureString that returns '_x86' and used that version in the wic script. Not sure if there is a similar problem in other scripts, only noticed it today when doing an install CD that included wic. I suppose I could have also just removed the '_x86' from the wic installers I downloaded. Anyway I thought I should mention it in case someone else hit upon it.
function GetArchitectureString(): String;
begin
if IsX64() then begin
Result := '_x64';
end else if IsIA64() then begin
Result := '_ia64';
end else begin
Result := '';
end;
end;
function GetArchitectureStringWithX86(): String;
begin
if IsX64() then begin
Result := '_x64';
end else if IsIA64() then begin
Result := '_ia64';
end else begin
Result := '_x86';
end;
end;
procedure wic();
begin
if (not IsIA64()) then begin
//only needed on Windows XP SP2 or Windows Server 2003
if ((exactwinversion(5, 1) and exactwinspversion(5, 1, 2)) or (exactwinversion(5, 2))) then begin
if (not FileExists(GetEnv('windir') + '\system32\windowscodecs.dll')) then
AddProduct('wic' + GetArchitectureStringWithX86() + '_' + GetConvertedLanguageID() + '.exe',
'/q',
CustomMessage('wic_title'),
CustomMessage('wic_size'),
GetString(wic_url, wic_url_x64, '') + GetConvertedLanguageID() + '.exe',
false, false);
end;
end;
end;
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:37pm.
|
|
|
|
|
Yes, since it didn't appear it the readme list I had assumed it would work with the default names directly off the microsoft website. An updated readme with the expected wic name formats would be helpful. Thank you.
Edit: Perhaps if there is a general rule about removing 'x86' from installer names, that should also be noted in the readme as well. Looking back at the readme, I should perhaps have noticed the implied rule via the pattern in the naming.
|
|
|
|
|
I tried your script.
Its not installing silently.
Its needed user interaction for .Net Framework 4.0 & VC 2010.
modified 29-Jul-14 3:22am.
|
|
|
|
|
Hello,
your .net framework installation script save my time.
can you help me to install crystal Report Runtime from Web ?
thanks
Kalpesh
|
|
|
|
|
This will install the VC Runtime 2012 Update 4.
[CustomMessages]
vcredist2012_title=Visual C++ 2012 Redistributable
en.vcredist2012_size=6.3 MB
de.vcredist2012_size=6,3 MB
en.vcredist2012_size_x64=6.4 MB
de.vcredist2012_size_x64=6,4 MB
;There isn't an IA64 version :(
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
en.vcredist2012_lcid=''
de.vcredist2012_lcid='/lcid 1031 '
[Code]
const
vcredist2012_url = 'http:
vcredist2012_url_x64 = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe';
procedure vcredist2012();
var
version: cardinal;
begin
RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\11.0\VC\Runtimes\' + GetString('x86', 'x64', ''), 'Installed', version);
if (version <> 1) then
AddProduct('vcredist2012' + GetArchitectureString() + '.exe',
CustomMessage('vcredist2012_lcid') + '/passive /norestart',
CustomMessage('vcredist2012_title'),
CustomMessage('vcredist2012_size' + GetArchitectureString()),
GetString(vcredist2012_url, vcredist2012_url_x64, ''),
false, false);
end;
EDIT: Fixed wrong version in registry key.
What do you get when you cross a joke with a rhetorical question?
modified 21-Jun-14 11:21am.
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:37pm.
|
|
|
|
|
If you don't have the ArchitecturesInstallIn64BitMode option set, the install will always be x86, so Is64BitInstallMode will be false , causing all methods that get strings/filenames/etc to return the x86 version.
I have tested this, and it works (I accidentally deleted the script I used to test while cleaning out some files on my HDD, so I can't share it). I am not sure why it didn't work for the person that first reported this, as this isn't really an issue, as InnoSetup takes care of it for us.
What do you get when you cross a joke with a rhetorical question?
|
|
|
|
|
Something about the path for the x86 redistributable:
the constant: vcredist2012_url is pointing to the file vcredist_x84.exe and the correct one is: vcredist_x86.exe
|
|
|
|
|
I'd vote this higher if I could
It is superb and so very well organised.
It was such a pain trying to get .NET installed before I found this, now it's a breeze.
|
|
|
|