How to embed other application during deployment my application? - c#

I am trying to make the setup file of my appllication. i already made the deployment process and also been success to build the setup file as .msi file. but to run my application on other computer there need othe software to install like SQL server 2005 so that my database file can support on that system. also it need some other software to install. so i want to embed on my software the all necessary s/w and suppossed to install during installing my application. so i need to know what to do during deployment to attach these software.
what the solution for it in C#?

Usually you'll do this through your application's installer (ie, InstallShield, Inno-Setup, etc). Installers generally have the capability to launch other programs and/or incorporate other install scripts. Also, some installers will allow for hands-off installations (usually done with command-line switches), so that the install of the dependent program is seamless.

Related

VS102 Setup including the Setup file for Postgresql Database and Scripts

I am trying to create a windows installer which will include both the application setup files as well as the setup file for the Postgresql Database(if not present in the installed system) with some ddl scripts which will run post installation.
Request you to please guide me on how should i go ahead with meeting the requirement.
WiX allows you to create installer bundles. This means you can package PostgreSQL and your application in a single installer and let it install PostgreSQL (and other prerequisites) before your application. Other installer solutions have similar capabilities.

How can I create a fully distributable C# application with a proper install?

Is it possible to create a fully-distributable application using C# that installs in a "proper" location (i.e. C:\Program Files\MyAppName) using only Visual Studio?
I'm new to creating stand-alone apps and I have created a first simple test app, but now wish to develop a home inventory-type application. It requires the distributable SQL Server database (which I used in my test app), and I would like it to install to a "normal" location. Right now, it seems to install to C:\Users\%Username%\AppData\Local\Apps\2.0.
Can this be done with C#, or does it require some 3rd party installation creation package?
As long as they don't rely on assemblies in the GAC, etc. .NET applications are standalone / "fully-distributable" by default. The most common way that I install my applications to other machines is by copying the output folder, (bin\Release for example) to my desired install location. For applications that are to be downloaded off of a website, zipping the folder should be sufficient, and the user can unzip to any location that they wish.

install ef 5 on server

I develop a web application on Microsoft .Net 4 and Entity Framework 5. When I upload the project on my web farm it doesn't work. I believe that Entity Framework is not installed on my web farm. So I contacted my host to support this particular issue.
They said:
Send us a download and installation instructions, with any
requirements to install Entity Framework.
Except we utilize a link from directly within Visual Studio through Nuget.
How do you load the proper deployment information onto a server, since you can't directly deploy with Nuget since they don't have Visual Studio installed?
Server Information:
Windows Server 2008 R2 64 Bit
Nuget link I used to install Entity Framework.
If possible please guide me or reference a place where I can solve this deployment issue. Any help would be greatly appreciated. Thank you for your assistance.
In order to successfully launch your project on a deployment server you should ensure that your application has a Deployment Package to be installed on the server.
Deployment Considerations can be found here:
You have a lot of things you need to consider, but Entity Framework does have a lot of choices and flexibility. Some of your choices:
Click Once Security and Deployment
Windows Installer Deployment
What Is a ClickOnce Application?
A ClickOnce application is any Windows Presentation Foundation
(.xbap), Windows Forms (.exe), console application (.exe), or Office
solution (.dll) published using ClickOnce technology. You can publish
a ClickOnce application in three different ways: from a Web page, from
a network file share, or from media such as a CD-ROM. A ClickOnce
application can be installed on an end user's computer and run locally
even when the computer is offline, or it can be run in an online-only
mode without permanently installing anything on the end user's
computer. For more information, see Choosing a ClickOnce Deployment
Strategy.
ClickOnce applications can be self-updating; they can check for newer
versions as they become available and automatically replace any
updated files. The developer can specify the update behavior; a
network administrator can also control update strategies, for example,
marking an update as mandatory. Updates can also be rolled back to an
earlier version by the end user or by an administrator. For more
information, see Choosing a ClickOnce Update Strategy.
Because ClickOnce applications are isolated, installing or running a
ClickOnce application cannot break existing applications. ClickOnce
applications are self-contained; each ClickOnce application is
installed to and run from a secure per-user, per-application cache.
ClickOnce applications run in the Internet or Intranet security zones.
If necessary, the application can request elevated security
permissions. For more information, see Securing ClickOnce
Applications.
How does a Windows Installer Deployment work?
Windows Installer
deployment enables you to create installer packages to be distributed
to users; the user runs the setup file and steps through a wizard to
install the application. This is accomplished by adding a Setup
project to your solution. When built, the project creates a setup file
that you distribute to users; the user runs the setup file and steps
through a wizard to install the application.
That is a brief description of a few ways, you can find examples here: Once you actually have your host load your deployment package it should run without any issues. Hopefully this points you in the correct direction.

Windows installer and setup application into one file?

I have written a application in C# using visual studio, I have made a project set up file which as created to files for me in my debug.
The Windows Installer and the setup application are both needed, but i would like to merge them into one, like when you download an app the installer its just one file.
Could some one please show me how to do this, or just point me towards a good source.
Thanks in advance.
If you're using Visual Studio's built-in setup project template to generate your installer, then you don't need the setup.exe file at all.
The only thing you need to distribute is the .msi file. That contains everything that a user would need to install your application. The setup.exe file is simply a stub that launches the setup routines from information in the .msi file, which is a database that the Windows Installer uses to install your application. And since these files can be launched by double-clicking on them if the Windows Installer service is installed, you really don't need to distribute the setup.exe bootstrapper if you don't want to.
Some special reasons that you might want to distribute a setup.exe file are:
You expect for some reason that your users might not have the required version of the Windows Installer installed on their computer. This is getting to be pretty rare nowadays, especially considering how widespread broadband Internet connections are and how pushy OS vendors are getting with pushing automatic updates. But if your users are "disconnected" (in many senses of the word), you might want to use a setup executable to verify the presence of the necessary version of the Windows Installer, install it if it isn't there, and then launch your .msi file to perform the install. (You cannot run a .msi file if you do not have Windows Installer installed.)
You need to support multiple languages. In this case, the setup.exe file can perform a language transformation on the .msi file before launching the installer.
You want to manage the installation of several .msi files in sequence. The way that Windows Installer is designed, it's difficult to chain installations of .msi files, which makes it difficult to install dependencies before or after you install your own application's files. A setup.exe file is not subject to the limitations of the Windows Installer, so it can be used to chain these and precisely manage the order of installation.
In general, creating your own setup.exe file (or using one of the many third-party installer software packages to create it for you) gives you significantly greater flexibility. You essentially have complete control over the installation process, rather than having to follow the rules of Windows Installer.
But 83.44% of the time, this isn't necessary and you should follow the much simpler route of using an .msi file. This also allows system administrators to automate installs across machines that they manage (for example, throughout a corporate network), something that is not supported for raw executable files.

Why do I need an install wizard? How do I create one?

If I create a WPF or WinForms app, I can launch it by its executable in Debug folder. Why do all programs come with an install wizard and how do I create one for my WPF/ WinForms app?
Programs usually come with an installer because it can put the program in a known location, add things to the start menu, add registry keys, etc.
You can create an installer using NSIS.
installers will be run (most of the time) by administrators. This will allow you to modify protected things of the system during setup such as the file system (Program Files folder), registry and install services and such.
The actual program then will not need these privileges and can be run by non-admins.
Also: Microsoft Logo requirements make the use of Windows Installer (the service that installs MSIs and adds them to your control panel for easy removal) mandatory.
While deploying a windows based application to a client machine we need to take care about several aspects like installation location,Registry values and to ensure that the required version of .Net framework is present in the client machine.Such kinds of things can be automated using an installer.You can create an installer by using the setup and deployment project or using clickonce
Check the below links for more
Setup and Deployment Projects
Deploying a WPF Application (WPF)
Deploying a Standard WPF Application Using ClickOnce and Visual Studio
WPF 3.5 SP1 Deployment
For example, almost any program produced by Visual Studio 2010, if copied to a freshly installed Windows XP system, will fail to run. This is what installers do well that is hard to get right: dependencies.

Categories

Resources