|
Hi,
this bug nummber is a reference to our internal bug tracking system. Don't care about that.
Here are the two functions:
function IsWin2008R2(): boolean;
var
winVersion : TWindowsVersion;
begin
GetWindowsVersionEx(winVersion);
Result := (winVersion.Major = 6) and (winVersion.Minor = 1) and (winVersion.ProductType <> VER_NT_WORKSTATION);
end;
function IsWin2012(): boolean;
var
winVersion : TWindowsVersion;
begin
GetWindowsVersionEx(winVersion);
Result := (winVersion.Major = 6) and (winVersion.Minor = 2) and (winVersion.ProductType <> VER_NT_WORKSTATION);
end;
Regarding to Windows8(.1): No I didn't try that because since we support windows8 we upgraded to .NET4.0.
Regards,
Harald
|
|
|
|
|
Hi! I have a question on your iss file on inno setup.
#define MyAppSetupName 'MyProgram'
#define MyAppVersion '4.0'
OutputBaseFilename={#MyAppSetupName}-{#MyAppVersion}
Can you explain this code?
|
|
|
|
|
MyAppSetupName and
MyAppVersion are constants, defined by this syntax:
#define ConstantName 'Value'
You can use any constant in the iss file by using {#ConstantName}.
InnoSetup will compile you setup program and replace all constants by their respective values.
|
|
|
|
|
Thanks your article..
I can get useful tips of Inno Setup. Great Job!(:
|
|
|
|
|
Amazing, helped me loads and saved me so much time.
|
|
|
|
|
How can i Check chrome is installed or not.
if not i want to download and install.
|
|
|
|
|
I want to Install Java if not installed.
|
|
|
|
|
This is an awesome system. I know I will use this quite a bit.
If I could give a 10 I would!
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Here are the changes to detect 4.5
dotnetfxversion.iss
[Code]
type
NetFXType = (NetFx10, NetFx11, NetFx20, NetFx30, NetFx35, NetFx40Client, NetFx40Full, NetFx45Full);
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);
NetFx45Full:
RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full', 'Release', regVersion);
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;
NetFx45Full:
if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Servicing', regVersion)) then
regVersion := -1;
end;
Result := regVersion;
end;
dotnetfx45full.iss
// requires Windows Vista SP2 (x86 and x64), Windows 7 SP1 (x86 and x64), Windows Server 2008 R2 SP1 (x64), Windows Server 2008 SP2 (x86 and x64)
// requires Windows Installer 3.1
// requires Internet Explorer 5.01
// WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
// http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992
[CustomMessages]
dotnetfx45full_title=.NET Framework 4.5 Full
dotnetfx45full_size=3 MB - 197 MB
;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
en.dotnetfx45full_lcid=''
de.dotnetfx45full_lcid='/lcid 1031 '
[Code]
const
dotnetfx45full_url = 'http://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe';
procedure dotnetfx45full();
begin
if (not netfxinstalled(NetFx45Full, '')) then
AddProduct('dotNetFx45_Full_setup.exe',
CustomMessage('dotnetfx45full_lcid') + '/q /passive /norestart',
CustomMessage('dotnetfx45full_title'),
CustomMessage('dotnetfx45full_size'),
dotnetfx45full_url,
false, false);
end;
|
|
|
|
|
You also need to add the following lines to your setup.iss file:
#define use_dotnetfx45full
in the head
#ifdef use_dotnetfx45full
#include "scripts\products\dotnetfx45full.iss"
#endif
below the block starting with #ifdef use_dotnetfx40
and finally
#ifdef use_dotnetfx45full
dotnetfx45full();
#endif
before the section #ifdef use_wic
|
|
|
|
|
Thank you very much for this excellent piece of work. Saved lot's of hours if not days.
|
|
|
|
|
You need to replace the following parameters (to "/passive /norestart") in the procedure below in kb835732.iss script - the installer switches were incorrect:
procedure kb835732();
begin
if (exactwinversion(5, 0) and (minwinspversion(5, 0, 2) and maxwinspversion(5, 0, 4))) then begin
if (not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB835732\Filelist')) then
AddProduct('kb835732.exe',
'/passive /norestart',
CustomMessage('kb835732_title'),
CustomMessage('kb835732_size'),
kb835732_url,
false, false);
end;
end;
|
|
|
|
|
Is it possible for a DirectX version of this script? I am making an installer for a game, and need to install DirectX as a dependency.
Thanks!
|
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:38pm.
|
|
|
|
|
|
great tool btw. it is working fine other than i only require .net 4 framework client, so i disabled all others in setup.iss except
#define use_dotnetfx40
i then placed dotNetFx40_Client_setup.exe in the following folder
bin\MyProgramDependencies
but when i compile the setup.exe it is still only 5 mb in size which is all my app files it is not including the 40mb dotNetFx40_Client_setup.exe within the setup.exe??
|
|
|
|
|
i even took you initial example program and just used it and did the same thing with the same results? i even copied the
MyProgram-4.0.exe
MyProgramDependencies
with the dotNetFx40_Client_setup.exe in the MyProgramDependencies folder, to the host witout .net client 4.0 and still it wanted to go download .net 4 client from msft??
|
|
|
|
|
Make sure that you added the executable in the [Files] section if you want it included in your setup.exe
Also, I really need to install the dependencies offline. For my software, I only need dotNetFx40_Full_setup.exe. I placed the executable in bin/MyProgramDependencies, but it still just tries to download from the site regardless.
Is there something I'm missing?
|
|
|
|
|
There is no word to say how thankful I am for this article.
I've been waiting for a software company for over one year to release a new version of their installer software (which I will be able to upgrade for free) and during this time I've been waiting for be able to realease my own software.
Now, thanks to you, I don't have to wait any longer. My software is complete and I can finally publish it. Thank you man, you are the best!
|
|
|
|
|
Hi,
I needed the compact database version 4.0 for my project. Here my code for use:
[CustomMessages]
sqlcompact40_title=SQL Server Compact 4.0
sqlcompact40_titlex64=SQL Server Compact 4.0 x64
en.sqlcompact40_size=2.5 MB
de.sqlcompact40_size=2.5 MB
en.sqlcompact40_sizex64=2.3 MB
de.sqlcompact40_sizex64=2.3 MB
[Code]
const
sqlcompact40_url = 'http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCERuntime_x86-ENU.exe';
sqlcompact40_urlx64 = 'http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCERuntime_x64-ENU.exe';
procedure sqlcompact40();
begin
if (not IsWin64 and not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU')) then
begin
AddProduct('SSCERuntime_x86-ENU.exe', ' /i /passive /norestart',
CustomMessage('sqlcompact40_title'),
CustomMessage('sqlcompact40_size'),
sqlcompact40_url,
false, false);
end else if (IsWin64 and (not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU') and not RegKeyExists(HKLM, 'Wow6432Node\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU'))) then
begin
AddProduct('SSCERuntime_x64-ENU.exe', ' /i /passive /norestart',
CustomMessage('sqlcompact40_titlex64'),
CustomMessage('sqlcompact40_sizex64'),
sqlcompact40_urlx64,
false, false);
end;
end;
modified 12-Jul-12 10:39am.
|
|
|
|
|
patch for vcredist2010.iss - the two issues fixed are a) detection on x64/ia64 (note the second version check) and b) checking for "Installed" instead of "Install" entry:
procedure vcredist2010();
var
version: cardinal;
version2: cardinal;
begin
RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\' + GetString('x86', 'x64', 'ia64'), 'Installed', version);
RegQueryDWordValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\' + GetString('x86', 'x64', 'ia64'), 'Installed', version2);
if ((version <> 1) and (version2 <> 1)) then
AddProduct('vcredist2010' + GetArchitectureString() + '.exe',
CustomMessage('vcredist2010_lcid') + '/passive /norestart',
CustomMessage('vcredist2010_title'),
CustomMessage('vcredist2010_size' + GetArchitectureString()),
GetString(vcredist2010_url, vcredist2010_url_x64, vcredist2010_url_ia64), false, false);
end;
|
|
|
|
|
BTW, I don't know if that affects all installations on x64/ia64 systems - or only such where at least once a x86 version of the runtime had been installed prior installation of the x64/ia64 version. At least on my system, the first node didn't have any entry - and the second node had one for x86+x64.
|
|
|
|
|
Hey stfx.
Amazing work!
Wanted to let you know I've added my own danish translation that I use for my projects. Message me privately if you wanna use it.
Best regards,
myl
|
|
|
|
|
Hello,
i get the message "An error occured while installing..."
Maybe you have to answer this often, but i have no solution for my Inno Setup setup.
I use win7 and want to add the jet4 software to my program
How can i solve it?
|
|
|
|
|