Installation Tools for ASP.Net C# application - c#

We have developed an ASP.Net/C#/SQL Server application and use SetupBuilder (from LinderSoft) and MSI for software installation purposes.
We are having all sorts trouble with the MSI component - in that installations regularly fail and we appear to have limited control over the MSI interface/process.
Are there any installation tools that give us more control over the MSI install process and can anyone recommend a better set of tools for software deployment purposes?

WIX provides a lot of control in creating MSI's.
Takes a bit of learning but we have used it for creating MSI's in our projects and it has worked for all of our needs.
From their site:
The Windows Installer XML (WiX) is a toolset that builds Windows
installation
packages from XML source code. The toolset supports a command line
environment that developers may integrate into their build processes
to build MSI and MSM setup packages
Sorry for the generic answer, but if you could provide more details regarding the errors that you are facing or exactly what areas you want to be able to control, then might be able to throw some light on it.

Most asp.net applications i've ever used have had a partly manual installation process, eg they ask you to create a sql server database and user, then copy the application in and update the web.config to reflect the sql user, then create the IIS application manually, and any further installation (eg creating the db schema) is handled automatically by the app the first time you use it.
It's always seemed acceptable to me, so long as everything is documented well i've been happy to accept it, worth considering?
I guess it depends upon the expected technical skills of your target user base...

Related

Is it possible to generate an .msi bundle from an aspnet core web application?

So the current situation is, a client will download an .msi bundle generated from wix, perform the install and enter some specific configuration details afterwards into the application (a windows service/console).
I was looking to streamline this process so all the client has to do is run the installer (no configuration needed), so I was wondering if anyone had any experience with a similar situation.
This is how i image the workflow would run.
User logs into multi-tenant web application => User clicks a download button => Web server collects tenant information => Web server passes configuration into wix (as a build parameter?) => msi is generated with the configuration embeded => User downloads the generated .msi and the world keeps spinning.
Now there are a few things i am unsure of, so here are my questions.
How would you go about running the wix installer from the web application? It's written in C# so would it just launch a cmd window and run msbuild?
If 1. is possible, how would it look/function in Visual Studio. I'm assuming the installer project/installer asset project would both need to be in the build output of the web application, is it possible to copy the raw files into the output? <= is that even a good practice?
It just doesn't seem practical to me, so if anyone has any suggestions on how this can be accomplished, either how I described above or any other methods then I am open to ideas!
Just to clarify, the main goal is to "generate a windows installer at runtime with a tenant configuration embedded"
You can do it from C# for sure. Take a look at the Wix extensions for CakeBuild for example: https://github.com/cake-build/cake/tree/33b83fdbc24a7d3d1bafc4cd7c7df0a204162e3b/src/Cake.Common/Tools/WiX
As to packaging 'content' files up with your web application you can do that too, the wix project files are no different than any other asset as far as the website is concerned.
Also, to run processes from a dot net application there's a bunch of work to do around redirecting and logging the output, you may wish to look into some of the process handling packages on Nuget that can do this for you.
Performance may be an issue for you, plus ways to secure the downloadable MSI in case you only want one user to get it. You may also need to look into code signing if you aren't already. Other than that it should be fairly straightforward.

Install WPF application using only .Net Framework

I have developed WPF application using VS 2013.
How do I install this application and run in some other PC without Visual Studio, using just only framework?
A good way to distribute WPF applications, is ClickOnce
You can place your application on a server, users can click on the link to install it. If you like, you can provide settings to automatically check for updates.
The application can be made to run in an offline mode, and will make an entry under the Start button as well as in Control Panel to allow uninstall.
It will run in an Isolated Storage sandbox, so this may not be appropriate for all applications, or may require some minor code changes. But, I have had many programs that just worked when turned into ClickOnce deployments.
NOTE: You may want to invest in a code signing cert to remove any warnings the end user will see. Or adjust Code Access Security of the destination machines if they are within your control.
The right answer ready depends on a few factors;
Where are your users (anywhere, corp. network)
How often do you want to update the application, should it be automatic
Will you deploy a database
As it stands this link provides some options
Deploying a WPF Application (WPF)
If you update the questions with more detail, perhaps we can provide more specific suggestions.
The easiest way - ClickOnce. To use it: Project -> Property -> Publish. Another popular option - InnoSetup (http://www.jrsoftware.org/isinfo.php).

Publish Winforms Application to a website

I've built a Winforms Application, and I want to publish it. I'd like to have a link on a website https://sites.google.com/site/satsavvyboardgame/home where I can have the user download the application and have it install on their computer. So far, I haven't found any way to wrap everything up in one package, or successfully publish to the web. What are the specifications for the URL to publish to the web?
Is there any way to package everything into one item (the site won't allow me to upload/download folders), so that the user could download one item, then run that or something in it?
Is there another way to do this that I haven't seen?
I'm using C# Visual Studio 2010 Express, and my application has the code and a couple of XML files that I need to run. All are part of the project, and run fine when I install from a file using the CD publish settings.
I've never published an application before, so any help would be much appreciated. Thanks!
You have 2 general options:
use "ClickOnce" which will enable automatic updates each time the user click to install and have several other benefits such as less problems with priviliges.
Use "Windows-Installer", which allows you more control of how to do and what to do during the installtion phase. However, shamefully, Package & Deployment project types do not exist anymore in vs2012. there are several 3rd party packages you can work with to create your setup-project.
The ClickOnce is preferable if what the user download is a just a simple standalone game application for example.. the MSI is for the more "rich" applications that should make extensive usage in the machine registry and etc..
The table in this link will give you the data you need to make a decision:
http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.80).aspx

Update application silently while running

My App will be initially deployed with Windows Installer.
The key characteristics of the solution I am looking for include:
Support silent update while app is
running (or automatically restart
client)
Easy to maintain and manage packing
process
Avoid complex customizations or
installation scripts
Do you have any ideas on how can I achieve this? Even if it means to modify the app code to support any idea.
Application is .net 2.0
Have you considered using ClickOnce for deployment? It has a facility to programatically check for updates and optionally force them to be installed - see http://msdn.microsoft.com/en-us/library/ms404263.aspx
You can silently update your application by using the Restart Manager (available in Vista and Win7).
Don't forget that a user is not alway the administrator. Since Vista if you sign your Windows Installer package you can update the application without needing administrator rights from the current user.
For all this to work you need to install your application using the Windows Installer technology. You can use Wix to create an xml file and compile it to an .msi package. Wix integrates nicely with VS.
The Proxy Design Pattern will help you achieve this while this is the pattern used for plugins.
Another short explanation is with the Gang of Four - Proxy Design Pattern.
Having an eye out the Shadow Copying of assemblies is definitely useful for the trick, as you shadow copy your updated assembly to your application assemblies folder, then you can make your application aware of changes, then unload the old assembly and load the new one for the changes to take effect, that is, without even having to restart your application, and this will be absolutely transparent for the end-user.
A more simple approach might be the ClickOnce Deployment which you might be interested to read about following the sugested link.

how to run one .msi under parent msi, It throws error "Another installation is in progress..."

I have created custom action dll file with embedded resource as SQL Server Compact Edition msi...this dll is assigned as a custom action in setup project ..but when i run setup msi it will throws error saying that another installation is in progress... I tried process.waitforExit(3000) options in code but still couldnt find solution?
Kindly reply
There are basically two ways of including dependancies to your installation. Either through a bootstrapper that runs before your msi-file or as a merge module. As this is a Microsoft product i doubt that it is available as a merge module.
In other words you should probably use a bootstrapper to your application. Try dotNetInstaller
Another option is MSI chaining, although it was not introduced until MSI 4.5, and will require the target system to have MSI 4.5 or later installed. Right now, only Windows 7 has native support, but there are 4.5 redistributables for the older versions of Windows. Finally, be aware that updating MSI with the 4.5 redistributable usually requires a reboot.
MSI enforces two mutexes. 1) One Execute Sequence per Machine and 2) One UI Sequence per process. While it is technically possible to disregard best practice and call your second MSI from the UI of the first, you will lose the ability to have silent installs and some poor customer out there is going to be disappointed one day.
Either invest in a bootstrapper / chainer or another possibility is SQL Server Compact edition is so small that they also support a private deployment model where you just deploy the assemblies in your application directory. The problem with this approach is if Microsoft ever has security updates for those assemblies they won't be able to service them. You will have to rebuild and deploy your product.
Do you need to support silent install? My recollection is that your install won't acquire the lock on the Installer service until it enters the execute sequence. That means you could kick off the SQL Server install somewhere in your UI sequence.

Categories

Resources