How to add .NET Framework 3.5 and SQL Server Compact 3.5?

Mar 27, 2009 at 4:05 PM
Hi,

Is it possible to add .NET 3.5 to the list of required components to choose from? The same goes for SQL server compact 3.5.

Thankful for any help.

Regards,
Jonas
Mar 27, 2009 at 7:08 PM

Jonas,

you can easyly add them by yourself. The list of components you see is just a list of templates (or examples  if you want it that way). Just modify a pre defined component the way you want it.

Regards,
Tom

Mar 30, 2009 at 6:17 AM
Ok, sounds good. Sorry for being lazy to ask another question on where I do these modifications? I searched through the install folders for any configuration files without luck (probably missed it...). 
Coordinator
Mar 30, 2009 at 1:16 PM

Jonas,

I think you meant "required components to choose from during installation", not during design time of the setup.

You need to create a configuration, a component called .NET 3.5 and add an installed check to it that looks into registry to find out whether .NET 3.5 is installed.

I think a good idea might be to download a 1.6 beta (http://dotnetinstaller.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=23955) that has a new users guide in it with a nice Getting Started section that talks notably about checks.

You can use the InstalledCheck configuration element to check whether a component is already installed. For example, you can check if .NET Framework 1.1 is installed by reading this registry key SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322\Install. InstalledChecks can be combined with operating system checks which filter components depending on the target OS and with processor architecture checks which check the operating system or hardware architecture.

Please don't hesitate to send feedback about documentation, I am spending quite a bit of time on it.

Does this help?

-dB.

Mar 30, 2009 at 1:36 PM
Well, that too  ;-)

What I would want as end-result is that the user starts the setup and is (possibly) notified that he/she does not have .NET 3.5 SP1 and/or SQL Server Compact 3.5 SP1 on their computer. In order to proceed installation these needs to be installed, so clicking on "Continue" would install both of these components and finally installs the product in my msi.

In order to achieve this I presume it is easiest to add these two components to the list of components so that was my first question -> How to add these to DNI template so that they exist in the list for "checking".

By selecting/checking them in the list, do I then have to add checks manually or do I configure the "control information" in the template? I.e. where to look for SQL Server in the registry or so.

Regards,
Jonas
Coordinator
Mar 30, 2009 at 2:08 PM
The easiest way to achieve this is not to add these to the list of components. It's more work than less. Forget about the template, just do it for your installer with Installer Editor. Once you have good checks, you can contribute them to DNI for other people to use, in templates. It's a whole different story.
Apr 20, 2009 at 12:33 PM
Hi,

I've had some time now to try this and it seems to work just fine (thanks!), but I have some questions that you perhaps could answer.

1. The upgrade scenario I'm looking for will have to call the previos versions main exe in order to perform an export of configuration data from a database before the upgrade is performed. Is it possible to add a bat file or similar to my dotNetInstaller setup? That is, if I create  the bat file and move it between the preconditional installs and the main MSI, will dotNetInstaller "execute" the bat file? If no, is there some other way to accomplish this.

2. My assumption was that, when running the setup, the preconditions (in my case .NET Framework and SQL Server compact) would only turn up in the list of components to install if they were missing? But they are present in the list even though they exist on my computer. Have I missed some settings or is this the intented result?

3. When the msi has executed (seemingly ok), the dotNetInstaller window does not close automatically even though the "auto close if installed" is set to true. Does this mean that somthing went wrong?


Thankful for your advise,
/Jonas

Coordinator
Apr 20, 2009 at 1:07 PM
  1. Add a cmdfile component (one that runs a program) with a condition invserse for your older version being installed. If the older version is installed, the component will show and execute. You can embed the .bat or whatever tool calls the main executable in the setup. You can then call it from the support files directory (your cmd component's command line will be something like #CABPATH\Export.bat).
  2. Your conditions that define wether the component is installed are wrong. dotNetInstaller creates a log file which can help you figure out why. Remember that conditions yield whether a component is installed.
  3. Auto close if installed will only work if you have no more components to install. Since your conditions are probably wrong (2) you are seeing dotNetInstaller come back to the first screen - it still needs to install those components.

cheers
-dB.

May 14, 2009 at 1:06 PM

Hi,

I can't get the embedding to work. My goal is to have a single executable including the prerequisites and my msi. But I have tried most ways regarding embedding but can not get it to work.

1. Should I add "Embed File" to my components (like the .net framework and the sql server compact db) or will they be embedded when I use the embed dependencies option when creating the exe?

2. When trying to use the embed file I use the #APPPATH constant and then add the relative path to these executables, but I still get CabLib Error that says it cannot add these files. Do you have any advise on this?

Thankful for your advise,
/Jonas

May 14, 2009 at 1:48 PM

Ok, stupid mistake. Didn't notice that the sql server package was an msi, not an exe!

BUT, now the embedding works fine but when running my setup I get an msi errorcode = 1619. Also, my command component that is supposed to install .NET framework also fails. Any ideas?

 

/Jonas

May 14, 2009 at 2:22 PM

If it might help, this is the "package" used for the sql server msi:    #APPPATH\SupportFiles\sqlCompact35\SSCERuntime-ENU-x86.msi

And the "command" used for the .net fx:     "#APPPATH\SupportFiles\dotNet35\dotnetfx35setup.exe" /q /norestart

 

/Jonas

May 14, 2009 at 4:42 PM

Finally, solved it!

Coordinator
May 15, 2009 at 12:55 PM

I am glad you solved it. Do post the details for other people having issues. Also, 1.6 has a much simpler model for embedding files.

Jun 10, 2009 at 8:04 AM

Hi again,

just wondering if there is a possibility to hide already installed components instead of showing them as xxxxxxx (Installed)?

 

Regards,

/Jonas

Coordinator
Jun 10, 2009 at 6:04 PM

Yes in the next 1.6 release. You should try the beta (make sure to re-edit and re-safe the configuration file). There's a new option dialog_show_installed.

Jun 21, 2009 at 8:08 PM

Hi,

a question regarding the DNI license. Can I change the finished setup file properties or is that controlled as part of the license? If it is allowed to be changed, is it possible to control from the configuration somewhere? The reason is that our customers might be somewhat confused when the setup is labelled with the DevAge name instead of ours.

Also, I have the same issue as posted in another thread, where the installer does not close after installing the last msi (this has no installed check). Can I workaround this?

Thanks a lot, DNI is really useful !

Coordinator
Jun 22, 2009 at 2:28 AM

Yes you can change this. This is not controller as part of any license. The installers have a fileattributes property that can contain name/value pairs.

 <fileattributes>
  <fileattribute name="FileDescription" value="..." />
  <fileattribute name="LegalCopyright" value="(c) ..." />
  <fileattribute name="ProductName" value="..." />
  <fileattribute name="CompanyName" value="..." />
 </fileattributes>

The names of the file attributes depend on the OS. The following are pre-defined:

Comments InternalName ProductName
CompanyName LegalCopyright ProductVersion
FileDescription LegalTrademarks PrivateBuild
FileVersion OriginalFilename SpecialBuild

See http://msdn.microsoft.com/en-us/library/ms647464(VS.85).aspx for details.

Coordinator
Jun 22, 2009 at 2:31 AM

On your closing of the installer with optional components: I don't have a solution for you. This is still a work-item, http://dotnetinstaller.codeplex.com/WorkItem/View.aspx?WorkItemId=3047. As usual with feature requests I can't make any promises.