|
Thanks for this! Exactly what I needed! I have one problem though, after it installs Windows Installer 4.5 it says that there was an error during installation of the dependency and the computer needs to restart. Really, it is just that install Windows Installer 4.5 requires a restart and after we reboot, everything works great. I removed the /norestart flag from the script and we are still running into this error. Is there a way to require a restart but not show it as an error to the user?
|
|
|
|
|
Nick Olsen wrote: Thanks for this! Exactly what I needed! I have one problem though, after it installs Windows Installer 4.5 it says that there was an error during installation of the dependency and the computer needs to restart. Really, it is just that install Windows Installer 4.5 requires a restart and after we reboot, everything works great. I removed the /norestart flag from the script and we are still running into this error. Is there a way to require a restart but not show it as an error to the user?
I am having the same problem while installing MSI 4.5. Did you managed to resolve it??
Thanks cheers!
|
|
|
|
|
I did not ever resolve it. Let me know if you find a solution.
|
|
|
|
|
Hi Nick,
The post by jtitley on the 25 Jun 10 did help me resolved it. You will need to modify the products.iss file
Good Luck!
Cheers
|
|
|
|
|
Good information, but I am having problems installing the Sql Server compact package.When I do the install it does the download fine but I get an error message no matter what I try with .iss code.
"SQL Server Compact 3.5 SP2 Runtime"
"Command line option syntax error. Type Command /? for help."
Microsoft says it has to do with language issues But I can't find any problems. Does anyone have an idea on how to find out what exactly the syntax error is or how to prevent this error. The package does not install after clicking OK.
|
|
|
|
|
First: compliments for your amazing work!
But I have a error during compile:
products.iss line 114
Column10:Invalid prototype for "PrepareToInstall"
I don't know code language of .iss files, but I have a long experience in setup.
Can you help me please ?
Thank you, bye
Claudio
|
|
|
|
|
Hi!
It seems to work if you correct that line as mentioned in the thread "Script broken in 5.3.8 (a)..."
I did the same before reading this because I found that exact line as the prototype in the ISS help pages.
A parameter has been added to PrepareToInstall to indicate if a reboot is required.
(just compiled an empty project with all .net versions enabled to have a fast way to install them all e.g. on a new PC, I consider to make 1.1 an user's choice and post it).
Regards, Rune B.
P.S.
MS has deprecated .net 1.1, and it currently does not install on my PC after I removed it because the latest security Patch did not work.
Are all or at least most 1.1 compiled programs supposed to run if 2.0 and above are installed?
If it is not present it's no longer offered by MS update.
What I found points in that direction. If it's true it would be wrong to require Net 1.1 to be installed in that case, except if there is an incompatibility in the application.
|
|
|
|
|
Same error too. I´m using Inno Setup 5.3.10 and IS Tool 5.3.0.1
Any solution ??? Plz i rly need this script.
|
|
|
|
|
I'm new to inno setup and I need some help setting up the script, previously I installed my applications so I made sure to have the dependencies already available before hand, but I need to pass a cd with a setup to make things easier for others. I was looking for a good script and I found this one, it's very good but I want to know if all the files listed inside the "dependencies" readme are necessary (I want to make it so the person doesn't have to download anything), my application needs to have installed .net 3.5 sp1 and the access runtime for office 2007 (to use a accdb database). I have downloaded this files to include:
WindowsInstaller-KB893803-v2-x86 (windows installer 3.1)
dotnetfx35.exe (.net framework 3.5 sp1 standalone)
AccessRuntime.exe (access 2007 runtime)
Do I need to include more files?, which scripts do I need to edit?, sorry for the newbie question, thanks in advance.
|
|
|
|
|
First of all, I'd like to thank for stfx, for this great article (and Inno Setup Project) (It's exactly what I needed to deploy my project.) But recently I switched to Visual Studio Express 2010 and compiled it against .NET Framework 4.0 Client Profile.
I was wondering how hardit would be to add, .NET 4.0 Client Profile checking, to the Inno Setup project?
@stfx
Or/And if your planing to update this article to add .NET Framework 4.0 Client Profile in the installer?
Also I think (correct me if I'm wrong) the beta version of Inno Setup has .NET 4.0 constants (Whatever that means)
""""
5.3.10-dev (?)
* Added .NET Framework 4.0 constants {dotnet40}, {dotnet4032}, and {dotnet4064}. An exception will be raised if an attempt is made to expand these constants on a system with no .NET Framework version 4.0 present.
* Minor tweaks.
""""
Does this mean you can add checking for .NET Framework 4.0 in the installer?
|
|
|
|
|
agreed this article rocks, but as jonny asks, possible to extend it to support .NET4 and .NET4ClientProfile ?
Looks like it is modulised enough, but don't fully understand the coding behind InnoSetup scripts.
|
|
|
|
|
Hey,
Here we go, these two should work
.NET Framework 4 (Full)
Put the below code into a file named "dotnetfx40.iss"
[CustomMessages]
dotnetfx40_title=.NET Framework 4.0
en.dotnetfx40_size=48.1 MB
de.dotnetfx40_size=48,1 MB
[Code]
const
dotnetfx40_url = 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe';
procedure dotnetfx40();
var
version: cardinal;
begin
RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Install', version);
if version <> 1 then
AddProduct('dotNetFx40_Full_x86_x64.exe',
'/q /norestart',
CustomMessage('dotnetfx40_title'),
CustomMessage('dotnetfx40_size'),
dotnetfx40_url);
end;
.NET Framework 4 (Client)
Put the below code into a file named "dotnetfx40client.iss"
[CustomMessages]
dotnetfx40_title=.NET Framework 4.0 Client Profile
en.dotnetfx40_size=48.1 MB
de.dotnetfx40_size=48,1 MB
[Code]
const
dotnetfx40_url = 'http://download.microsoft.com/download/5/6/2/562A10F9-C9F4-4313-A044-9C94E0A8FAC8/dotNetFx40_Client_x86_x64.exe';
procedure dotnetfx40client();
var
version: cardinal;
begin
RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Client', 'Install', version);
if version <> 1 then
AddProduct('dotNetFx40_Client_x86_x64',
'/q /norestart',
CustomMessage('dotnetfx40_title'),
CustomMessage('dotnetfx40_size'),
dotnetfx40_url);
end;
Don't forget to add the lines #include "dotnetfx40.iss" or #include "dotnetfx40client.iss" at the top of your setup file script.
Anthony
|
|
|
|
|
Hello,
Firstly, thank you for your scripts. They are a life-saver and I love how I can control every aspect of the installation.
I am using your script to install .NET 3.5 Client Profile + my application. The download / install ratio is about 45%. And I keep improving it , it started on about 30%.
I am logging all user actions into a variable and at the end of install process I open a webpage with the contents of the variable in the querystring. That allows me to know exactly where users have problems.
This lead me to a finding that biggest drop out is on failed Windows Installer 3.1 installations. Only about 10% of users that don't have MSI3.1 are able to install it successfully (I do checks for Windows XP before to ensure MSI3.1 can be installed - so 90% of MSI3.1 install attempts fails on systems where it should succeed).
I cannot figure out why is it so. When I simulate the installation on Windows XP with no MSI 3.1 the installation process is quite smooth and success.
I don't know how to debug failure of Windows Installer , the only thing I know is that Result Code of MSI 3.1 installation is 1603 - FATAL ERROR.
My install script checks following:
initwinversion();<br />
<br />
RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v3.5', 'Install', version);<br />
if version <> 1 then begin<br />
if not minwinspversion(5, 0, 3) then begin<br />
MsgBox(FmtMessage(CustomMessage('depinstall_missing'), [CustomMessage('win2000sp3_title')]), mbError, MB_OK);<br />
exit;<br />
end;<br />
if not minwinspversion(5, 1, 2) then begin<br />
MsgBox(FmtMessage(CustomMessage('depinstall_missing'), [CustomMessage('winxpsp2_title')]), mbError, MB_OK);<br />
exit;<br />
end;<br />
msi31('3.1');<br />
ie6('5.0.2919');<br />
AddProduct('DotNetFx35ClientSetup.exe','/lang:enu /qb /norestart',CustomMessage('dotnetfx35_title'),CustomMessage('dotnetfx35_size'), dotnetfx35_url);<br />
end
Any ideas how to figure out what is wrong?
P.S (just a side not, all those % ratios have been measured on 1000's of installations and I have double checked them to ensure they are correct)
|
|
|
|
|
First, sorry for my bad english
Second, thanks to stfx for that great tool!
I used this tool to write a setup for a C# project, that needs MSI 3.1, .NET-Framework 3.5 and SQL Server Compact 3.5.
But SQL Server Compact 3.5 is only available as .msi package! For this reason I changed the lines in "products.iss":
...
//if Exec(products[i].File, products[i].Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then begin
if ShellExec('', products[i].File, products[i].Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then begin // %%SH: ShellExec() installiert auch MSI-Pakete
...
With this change it is also possible to install .msi files!
greetings, Sascha
|
|
|
|
|
You may choose not to fix this, but these scripts seem broken on 5.3.8(a) Inno build. The error is "products.iss Line 114, Column 10 Invalid prototype for PrepareToInstall". Unless, maybe I'm doing something wrong (I just downloaded everything and tried compiling setup.iss without making any change ). I'd love to use these scripts, but from looking at the Inno changelog, it's important to use the latest version of that as well, as it has numerous fixes for Windows 7.
|
|
|
|
|
I just changed line 114 in products.iss to read: function PrepareToInstall(var NeedsRestart: Boolean): String;
Let me know if this is the wrong fix, I'm new to all this.
|
|
|
|
|
|
Same error too. I´m using Inno Setup 5.3.10 and IS Tool 5.3.0.1
Any solution ??? Plz i rly need this script.
|
|
|
|
|
This function declaration has changed in newer inno setup versions. It's declaration is now:
function PrepareToInstall(var NeedsRestart: Boolean): String;
See the inno help file for more information.
|
|
|
|
|
I confirm that this fixes the error.
|
|
|
|
|
Hi!
This is the best and easiest to use solution I found on the net to install dependencies...
However, at least for completeness, it would be nice if other often used runimes would be added too.
(despite it would be easy to implement ourselves using the existing examples, except for the hassle to find the newest version at MS)
Of course in case of MSVC I might compile static to avoid having to run the MSVC++ installer, except if you include a third party binary dll or executable which requires these (not recommended by MS).
To check the existence of the runtime some recommend just to try to load the main DLL of the runtime in a try ... catch block.
With MSVC 6 one could still include the needed DLLs (and there is an example on the inno setup homepage),
but with managed code etc. in newer versions the only option seems to be to run the msvc_redist installer to install the runtime correctly.
Regards, Rune B.
P.S. how stable are the cryptic links at MS? Will they continue to exist?
Would it be an option to skip downloading if the download already lies next to the installer of the app?
If giving the app to someone on a share or media one could put the required runtimes right next to it.
(like the open source impementation "The Ur-Quan Masters" installer of "Star Control II" does for it's addons,
this would give the user the advantage of the silent install even if not havining the app's installer do the download itself.)
|
|
|
|
|
Hi,
I set the DependenciesDir to "Resources".
the installer is located here:
D:\install\setup.exe
I was expecting that the installer will look in D:\install\Resources\ for needed dependencies.
I don't want them to be downloaded.
For example I am trying to install .NET 3.5 and .NET 3.5 SP1.
According to dotnetfx35.iss and dotnetfx35sp1.iss the installer should look for dotnetfx35.exe and dotnetfx35sp1.exe in the DependenciesDir.
I don't know what is wrong but it keeps trying to download these files.
Any advice?
Other than that, I really like your work! Makes things easier a lot. Thanks for that!
Best
Ronny
|
|
|
|
|
Hi!
Just now.I did it.
(but try dotnetfx20.exe)
products.iss
<pre>#include "isxdl\isxdl.iss"
[CustomMessages]
;DependenciesDir=MyProgramDependencies
DependenciesDir=.\
</pre>
It change dafault("MyProgramDependencies") to ".\" ,same folder ok.
So, I think you change
DependenciesDir=Resources
and set
d:\install\Resources\dotnetfx35.exe and dotnetfx35sp1.exe
Regards
Yamada (from Japan)
|
|
|
|
|
Hi,
I saw code to create setup for 32 bit and 64 bit machine.
All things are same except source file name.
My question is :
If I have same exe to run on 32 and 64 bit machine and I want to create one setup, Shell i have to build in "ArchitecturesInstallIn64BitMode=x64 ia64".
|
|
|
|
|
Hi, does anybody have any suggestion for downloading Windows Installer 4.5 ?
Thanks
Petr
|
|
|
|
|