|
Ah I thought it might be something like that, I tried to use {tmp} but it didn't work (due to a mistype -oops) but have it sorted now, thanks!
I did use Google, but didn't find anything helpful.
If it's the version from your blog, then I've been using it and it's working great for me so far!
Thanks again
|
|
|
|
|
SVN Repo checkout: http://stfx-wow.googlecode.com/svn/trunk/NetFxIS[^]
I incorporated all proper scripts and modifications from the community as well as some custom changes to make the code less redundant, support more 64-bit installers and have more helper functions.
Here are the changes:
* Added own product to check for .netfx version to remove redundant code
* Version strings are now being parsed to fix wrong detection for version numbers above 9
* Implemented mid-install restart support
* Implemented Windows Installer 4.5, .NET Framwork 4.0, Visual C++ 2010 Redistributable, SQL 2008 Express and SQL 3.5 Compact Edition (community)
* Make use of #define in setup.iss (community)
* Use unicode version of Inno Setup as default for better multilanguage support
* Fixed restart on 3010 resultcode from installers
* Fixed missing check Windows 2000 Security Update (KB835732)
* Added support for x64 and IA64 offline files
EDIT: Article has been updated
modified on Saturday, August 27, 2011 6:48 AM
modified 24-Sep-11 3:19am.
|
|
|
|
|
Hi stfx,
Thanks for these scripts. If I can get them working for me they will be very useful.
I have downloaded and tested the new version. I have compiled the scripts using InnoIDE V1.0.0.0078 and Inno Setup version 5.4.2 using the "MyProgram" sample that you provide. When I run the resulting exe on a clean install of Windows XP service pack 2, the msi31.exe (WindowsInstaller-KB893803-v2-x86.exe before renaming and putting in dependencies) does not run correctly, I get the message box giving command line switches, indicationg that incorrect command line switches have been used. In msi31.iss it appears you are using the switches /qb and /norestart. qb appears not to be a valid switch for the msi installer (I believe it may be a switch for msiexec.exe itself). I tried changing the switches to "/passive /norestart". The passive switch seems to work but a restart is required i.e "/norestart" seems to be ignored (truncating maybe?).
'Hope this helps. Let me know if I can provide any more info.
By the way, I also had a problem with the old scripts on the clean install of Windows XP SP2. msi 3.1 would not install before .net fx 2.0 SP2, meaning that the .net install would fail.
Regards,
GJS
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:39pm.
|
|
|
|
|
It seems to be Inno requiring the restart after msi31 is installed and in doing so kills the rest of the setup. Here's the steps I take. Using the latest scripts as downloaded from
http://code.google.com/p/stfx-wow/downloads/list
I comment out the following from the #define statements in setup.iss (my aim is to install a program that just requires .net fx 2.0):
//#define use_iis
//#define use_kb835732
//#define use_msi20
#define use_msi31
//#define use_msi45
//#define use_ie6
//#define use_dotnetfx11
//#define use_dotnetfx11lp
#define use_dotnetfx20
#define use_dotnetfx20lp
//#define use_dotnetfx35
//#define use_dotnetfx35lp
//#define use_dotnetfx40
//#define use_wic
//#define use_vc2010
//#define use_mdac28
//#define use_jet4sp8
//#define use_scceruntime
//#define use_sql2005express
//#define use_sql2008express
I then change the switches in msi31.iss to '/passive /norestart' and save. I can't find any MsgBox statement at all in function InstallProducts in products.iss.
This is what I am seeing:
function InstallProducts: InstallResult;
var
ResultCode, i, productCount, finishCount: Integer;
begin
Result := InstallSuccessful;
productCount := GetArrayLength(products);
if productCount > 0 then begin
DependencyPage := CreateOutputProgressPage(CustomMessage('depinstall_title'), CustomMessage('depinstall_description'));
DependencyPage.Show;
for i := 0 to productCount - 1 do begin
if (products[i].InstallClean and PendingReboot()) then begin
Result := InstallRebootRequired;
break;
end;
DependencyPage.SetText(FmtMessage(CustomMessage('depinstall_status'), [products[i].Title]), '');
DependencyPage.SetProgress(i, productCount);
if SmartExec(products[i], ResultCode) then begin
if (ResultCode = 0) then begin
finishCount := finishCount + 1;
end else if ((ResultCode = 3010) or products[i].MustRebootAfter) then begin
Result := InstallRebootRequired;
break;
end else begin
Result := InstallError;
break;
end;
end else begin
Result := InstallError;
break;
end;
end;
for i := 0 to productCount - finishCount - 1 do begin
products[i] := products[i+finishCount];
end;
SetArrayLength(products, productCount - finishCount);
DependencyPage.Hide;
end;
end;
I then compile the script and put dotnetfx20sp2.exe and msi31.exe in MyProgramDependencies folder and copy this and MyProgram-4.0.exe to the clean install of windows XP SP2 (running on a VM). I disable the network adapter on this machine to check that no downloading is taking place.
I run MyProgram-4.0.exe and accept all the defaults so I get this before hitting the "install" button:
Install dependencies:
Windows Installer 3.1
.NET Framework 2.0 Service Pack 2
Destination location:
C:\Program Files\MyProgram
Start Menu folder:
MyProgram
Additional tasks:
Additional icons:
Create a desktop icon
I then see two dialogs with progress bars (too quick to read) then an Inno dialog box with title "Setup - MyProgram" saying "Preparing to install", then red cross icon and "Windows Installer 3.1 To complete the installation of MyProgram Setup must restart your computer. Would you likie to restart now?" There are two radio buttons with options "Yes, restart now." (selected) and "No, I will restart later." The dialog buttons are Back and Finish. I click finish and the machine restarts. After restart, the installer does not continue (no programs are running at all). In Control Panel - Add/Remove Programs, Windows Installer 3.1 is showing as installed but nothing else - no net fx 2.0 and no "MyProgam".
So, only Windows Installer is being installed, and then requiring a restart which kills the whole setup program.
'Hope that helps. I can send screen shots if that will make things clearer.
Regards,
GJS
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:39pm.
|
|
|
|
|
That works well! Thanks. Following the procedure I detailed above, the instalation proceeds as expected and then Inno requests a restat to complete installation of MyProgram.
Another unrelated issue. I tried to install the same "MyProgram-4.0.exe" on a clean install of Windows XP SP1a, which, of course, should not work. The install proceeds normally until a dialog appears which I think is from the .net fx 2.0 installer. It does halt the installation but it incorrectly mentions .net fx 3.5. The "old" scripts gave a clean msgbox that halted the installtion immediately that it had started. After cancelling the installation, msi3.1 is shown as installed in add/remove programs (no restart requested or carried out).
http://dl.dropbox.com/u/36336706/netfx2_install_dialog.jpg[^]
I'll now try modifying setup.iss to install my test program and report back.
Thanks for your support, stfx.
|
|
|
|
|
Message Closed
modified 23-Dec-20 12:38pm.
|
|
|
|
|
Ah, yes, I see it. Thanks.
|
|
|
|
|
Installer of SQL 3.5 Compact Edition (community) doesn't seem to work. I have changed the "scceruntime.iss" to work:
[CustomMessages]
ssceruntime_titlex86=SQL Server Compact 3.5 Service Pack 2 (x86)
ssceruntime_titlex64=SQL Server Compact 3.5 Service Pack 2 (x64)
en.ssceruntime_size=5.3 MB
pl.ssceruntime_size=5,3 MB
[Code]
const
ssceruntime_urlx86 = 'http://go.microsoft.com/fwlink/?LinkId=166085&clcid=0x409';
ssceruntime_urlx64 = 'http://go.microsoft.com/fwlink/?LinkId=166086&clcid=0x409';
procedure ssceruntime();
begin
if (not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5')) then
begin
AddProduct('ssceruntimex86.msi',
'/qb',
CustomMessage('ssceruntime_titlex86'),
CustomMessage('ssceruntime_size'),
ssceruntime_urlx86,
false, false);
if(IsX64()) then
AddProduct('ssceruntimex64.msi',
'/qb',
CustomMessage('ssceruntime_titlex64'),
CustomMessage('ssceruntime_size'),
ssceruntime_urlx64,
false, false);
end;
end;
But it doesn't always work. Do you have some solution for that?
|
|
|
|
|
Hello!
Well, I found some typo...
line 27:
#define use_scceruntime
line 161:
#ifdef use_scceruntime
#include "scripts\products\scceruntime.iss"
#endif
but different name in line: 272
#ifdef use_ssceruntime
ssceruntime();
#endif
|
|
|
|
|
|
When compiling I get an error-Unknown Identifier 'init' for the lines of code:
init windows version
initwinversion();
I get an error message-Unknown Identifier 'check' for the line:
check if dotnetfx20 can be installed on this OS
I get an error message-Unknown Identifier 'iis' for the line:
if (not iis()) then exit;
Other than those problems the code compiles, but I suspect they are very important lines of code and without them the Windows version may not be found.
|
|
|
|
|
I need a bit of info on the following parameters:
AddProduct('dotnetfx11.exe','/q:a /c:"install /qb /l"',
I do not understand what these parameters do!
I am trying to do this:
[CustomMessages]
ie9_title=Internet Explorer 9
en.ie9_size=1 MB - 18.5 MB
de.ie9_size=1 MB - 18,5 MB
[Code]
const
ie9_url = 'http://view.atdmt.com/action/UMIRF_IE_IE9WW_InternationalDL?href=http://download.microsoft.com/download/C/6/8/C686FAEB-45AD-49C1-8E8B-4C0311A842EB/IE9-Windows7-x86-hrv.exe';
procedure ie9(MinVersion: string);
var
version: string;
begin
RegQueryStringValue(HKLM, 'Software\Microsoft\Internet Explorer', 'Version', version);
if version > MinVersion then
AddProduct('ie9.exe',
'/quiet /norestart /closeprograms',
CustomMessage('ie9_title'),
CustomMessage('ie9_size'),
ie9_url);
end;
The parameters I am interested in (when installing IE9) are /quiet /norestart /closeprograms, when I use them as you can see above, the installation fails (no significant error code) and is not "silent" i.e. the progress bar and other stuff = visible.
I therefore require assistance in using parameters with AddProduct method, please point me in the right direction.
Does someone have a functional:
- java 1.6 JRE .iss?
- firefox (a recent version) .iss?
I would also need help with using already downloaded files with my iss, i.e. currently the script is ALWAYS downloading the installation package from the url that I provided, and I would like it to check for the existence of a file in a specific directory and use that if it finds it.
|
|
|
|
|
That was what I exactly was looking for... also this article also generate contribution from other members... Best
|
|
|
|
|
Hi all,
I got problem. The download page does not Unicode at all. This issue can be reproduced by following the steps below:
0. On an Locale=English Windows XP machine.
1. Create a file scripts\isxdl\chinese.ini with all strings translated into Chinese
(I have tried encoding the file with Unicode, Chinese - CodePage 936, UTF-8, UTF-8 without signature)
2. Add "cn.isxdl_langfile=chinese.ini" to scripts\products.iss
3. Add chinese to [Languages] section in the MainSetup.iss script file
Current behavior:
=================
when the Setup is downloading the required dependency from the Internet (say .Net Framework 4.0), the download page cannot display Chinese characters at all.
However, if I test it on a Locale=Chinese WinXP machine, it displays the Chinese characters pretty well.
Expected behavior:
=================
Whatever the Locale is, the download page should always be able to display all Unicode characters.
My guess is the download module isxdl.dll does not support Unicode at all, because I found all other pages can display Chinese well.
Thanks. Any idea?
Peter
|
|
|
|
|
It's a good start, but should have been updated often and early. I did...
|
|
|
|
|
All,
I updated the scripts using (nearly) all suggestions from the comments below, and fixed the compilation errors on newer versions of Inno Setup (including the Unicode related errors).
Also added support and a sample for installing .NET 4.0 (not from the comments below, but close), and VC++2010 for both x86 and x64 OS's, and MS-SQL Server Express 2008 R2. Then also fixed the download for MS-SQL Express 2005 to grab the SP3 release that will install on Windows Vista and later.
My blog can be found here: tonaday.blogspot.com[^] (use the label InnoSetup if it's out of sight).
HTH,
Ton
|
|
|
|
|
The current version of the script fails to compile. Could anybody please reproduce this issue?
Thanks
Mike
|
|
|
|
|
i get the following when compiling with Inno 5.4.2(a) on Win 7 64bit
Compile started: Monday, Jul 25 2011 at 05:40 PM<br />
---<br />
Compiling script with Inno Setup 5.4.2 (a)<br />
---<br />
[ISPP] Preprocessing.<br />
[ISPP] Preprocessed.<br />
Parsing [Setup] section, line 42<br />
Parsing [Setup] section, line 43<br />
Parsing [Setup] section, line 44<br />
Parsing [Setup] section, line 45<br />
Parsing [Setup] section, line 46<br />
Parsing [Setup] section, line 47<br />
Parsing [Setup] section, line 48<br />
Parsing [Setup] section, line 52<br />
Parsing [Setup] section, line 53<br />
Parsing [Setup] section, line 54<br />
Parsing [Setup] section, line 55<br />
Parsing [Setup] section, line 56<br />
Parsing [Setup] section, line 57<br />
Parsing [Setup] section, line 58<br />
Parsing [Setup] section, line 59<br />
Parsing [Setup] section, line 60<br />
Parsing [Setup] section, line 61<br />
Parsing [Setup] section, line 62<br />
Parsing [Setup] section, line 63<br />
Parsing [Setup] section, line 64<br />
Parsing [Setup] section, line 65<br />
Parsing [Setup] section, line 66<br />
Parsing [Setup] section, line 67<br />
Parsing [Setup] section, line 68<br />
Parsing [Setup] section, line 69<br />
Parsing [Setup] section, line 71<br />
Parsing [Setup] section, line 72<br />
Parsing [Setup] section, line 73<br />
Parsing [Setup] section, line 74<br />
Reading file (WizardImageFile)<br />
File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNIMAGE.BMP<br />
Reading file (WizardSmallImageFile)<br />
File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNSMALLIMAGE.BMP<br />
Preparing Setup program executable<br />
Reading default messages from Default.isl<br />
Parsing [Languages] section, line 77<br />
File: C:\Program Files (x86)\Inno Setup 5\Default.isl<br />
Parsing [Languages] section, line 78<br />
File: C:\Program Files (x86)\Inno Setup 5\Languages\German.isl<br />
Parsing [LangOptions], [Messages], and [CustomMessages] sections<br />
Messages in script file<br />
Reading [Code] section<br />
Parsing [Tasks] section, line 81<br />
Parsing [Tasks] section, line 82<br />
Parsing [Icons] section, line 90<br />
Parsing [Icons] section, line 91<br />
Parsing [Icons] section, line 92<br />
Parsing [Icons] section, line 93<br />
Parsing [Run] section, line 96<br />
Parsing [Files] section, line 2 of O:\Install\InnoSetup\dotnetsetup\scripts\isxdl\isxdl.iss<br />
Reading version info: O:\Install\InnoSetup\dotnetsetup\scripts\isxdl\isxdl.dll<br />
Parsing [Files] section, line 34 of O:\Install\InnoSetup\dotnetsetup\scripts\products.iss<br />
Reading version info: O:\Install\InnoSetup\dotnetsetup\scripts\isxdl\german2.ini<br />
Parsing [Files] section, line 85<br />
Reading version info: O:\Install\InnoSetup\dotnetsetup\src\MyProgram-x64.exe<br />
Parsing [Files] section, line 86<br />
Reading version info: O:\Install\InnoSetup\dotnetsetup\src\MyProgram-IA64.exe<br />
Parsing [Files] section, line 87<br />
Reading version info: O:\Install\InnoSetup\dotnetsetup\src\MyProgram.exe<br />
Compiling [Code] section<br />
---------------------<br />
Compile Error!<br />
File: O:\Install\InnoSetup\dotnetsetup\scripts\products.iss<br />
Line: 114<br />
Error: Column 10:<br />
Invalid prototype for 'PrepareToInstall'
|
|
|
|
|
If there are some componets added to install script then on 'ready to install' page all tasks displayed are multiplaying by nrOfComponents+1.
I tried to find the reson in products.iss with no luck (I'm fresh to this).
Anyone got idea?
Extremely useful article!
modified on Wednesday, December 15, 2010 5:31 PM
|
|
|
|
|
I found the problem, flag 'Check: InitializeSetup;' in [TYPES] caused this issue.
|
|
|
|
|
how to show .net framework intsall progress (like 52% ) in main installer .
|
|
|
|
|
I also want to know how to change the script to show the installation progress (not the downloading progress).
|
|
|
|
|
How i install the XP Service Pack 2 automatic?
Download and install..
|
|
|
|
|