The Kinetic Jump site navigation header requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Welcome Guest Search | Active Topics | Log In | Register

How to install .Net 4.0 runtime using AppLife? Options
Edhy
#1 Posted : Friday, July 02, 2010 4:45:01 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18
I am upgrading my applications to .Net 4 and need to send the .Net 4 runtime libraries to my application using AppLife Update.

Checking on MS site, I only found 2 installers:
  1. Microsoft .NET Framework 4 (Web Installer)
  2. Microsoft .NET Framework 4 (Standalone Installer)
These 2 files are in executable (.exe) format not MSI, so what I am doing in AppLife script is this:
  1. Create an action to copy the web installer dotNetFx40_Full_setup.exe to the "Update Package Directory" folder.
  2. Create a Dynamic Action to basically execute this program like this:
        If System.IO.File.Exists(FileName) Then
            System.Diagnostics.Process.Start(FileName)
        End If

The above worked but I am not getting any feedback from the web installer into AppLifeUpdate, so I don't know if something when wrong in order to Rollback the update if needed.  I know that using the "Execute MSI" will give me the feedback, but we don't have an MSI for .Net 4.0 runtimes.

Is there a better way to do this?


Edhy Rijo
brianh
#2 Posted : Tuesday, July 06, 2010 1:20:34 PM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Edhy,

 

You can deploy the .Net 4.0 framework within an update to your deployed software using AppLife Update. There are a few things to consider as you plan this.

 

  1. The framework is ~50 MB.  The client without the framework currently installed will need to download this whether the installer is included in your application update, or downloaded as the update is executed.  If your application downloads updates in the background, and your users dont have to wait for that download, you might prefer to include the full framework in your update.  On the other hand, if you suspect most of your clients already have the 4.0 framework, you might prefer to include the web installer, so that the clients that already have it wont need to download it.  And finally, if its possible that your clients wont have web access (internal clients), you'll have to include the full installer with your update.

  2. The framework installer takes time to execute.  If you are using the AppLife Update Windows Service for permissions elevation, you wont be able to show the framework installer progress window.  In this case, it might be better to include the full install in your update, minimizing the amount of time the framework installer needs to run.

 

Here's how to deploy the .Net 4.0 framework within an update:

 

1.  Detect whether the 4.0 framework is currently installed, so that the actions that install the update can be conditionally executed.

 

2.  Include either the full framework install package or the web installer.  This can be placed in the update package directory so that they are removed automatically when the update completes.


 

3.  Install the .Net Framework if it isnt already installed.  Use the appropriate command line arguments to require user interaction, passively install, or quietly install.  Inspect the exit code to identify whether a reboot is required.  Use this exit code to conditionally execute a Restart Operating System action.  (Because we need to look at this, using a Dynamic Code action to launch the update is preferred.)


 

4.  Update your host application, just like a normal update.


 

5. Conditionally restart the operating system.

 

There is an example aup project file that demonstrates these steps. The dynamic code action includes more info as code comments.

File Attachment(s):
Install Framework 4 Update example.zip (4kb) downloaded 24 time(s).
brianh attached the following image(s):
framework4updateactionlist.png
Brian Haas
Kinetic Jump Software
Edhy
#3 Posted : Tuesday, July 06, 2010 2:10:42 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18
Hi Brian,

Thanks a lot for the sample, all the steps makes sense, I will study and test right now.


Edhy Rijo
Edhy
#4 Posted : Tuesday, July 06, 2010 2:22:06 PM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18
Brian,

It is very helpful to be able to see how you guys approach an update process, very interesting.

I am now thinking that since the .Net installer update may be needed by multiple applications, could it be possible in AppLife Update to run other scrips as part of an installation so I can have these particular updates like runtimes and other libraries and simply include them in whatever project I may be working on?

I know, this is more a responsibility of the installation tool, but seeing the power of AppLife update it is easy to make sense all this can be accomplish as a regular update process.


Edhy Rijo
brianh
#5 Posted : Wednesday, July 07, 2010 7:28:31 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Edhy,

 

Custom actions are the mechanism for which to build reusable libraries of update functionality.  Custom actions are just classes that inherit from the UpdateAction class, and are compiled into a dll that you can add to your project. They support custom builders and designers for more update build-time support.  All of the activitiy in this action list could be incorporated into a single custom action.  In fact, an action to deploy the .Net 4 framework is planned for the upcoming release of AppLife Update 4.  You can also copy/paste multiple actions from one project to another, providing the ability to maintain a more rudimentary update activity library.

Brian Haas
Kinetic Jump Software
Edhy
#6 Posted : Wednesday, July 07, 2010 9:47:43 AM
Rank: Newbie
Groups: Member

Joined: 10/11/2009
Posts: 18
Hi Brian,

Thanks for the explanation. 

FYI I implemented this in my update and it all worked as expected.  I am using the Web Install since all my customers must have access to the internet to use my application.

Looking forward to the new version and thanks again for the sample code for .Net 4.


Edhy Rijo
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.