I want to build a setup file that contain windows form application that is connected to sql server how can I do that? I want to put the .net framework and sql server in the setup package how can I do that? do I need sql server or sql express in this case? I want to create the database in the installation process how can I do this? I want to check If the requirements are already installed how can I do this? hw can I improve the security of the program from stealing?? please help thanks
note my English language not good enough Smile | :)
That is a lot more than one question, and not easy to answer all at once. Anyway, assuming you're using Visual Studio 2012, you can try creating a new Install Shield project (below).
(It might be easier to help you once you've tried something, and have got a more specific question/problem)
For my projects I use Inno Setup. It lets you customize all aspects of the installer - add/remove different screens, set conditions for installing different files, for example you can check out whether SQL server is installed and install it only if it is not through scripting. Take a look at the FAQ page for more information about the features this tool offers.
There's also a sample Inno Setup file at CodePlex, that should get the job done. I haven't tried it though, so I cannot guarantee whether it works fine or not.
If you want to have installer for tomorrow, than good choice will be WIX (http://wix.sourceforge.net/). It is easy to understand and have a possibility of checking installed frameworks and OS version.
If you wish to have Framework msi installer inside yours, than you can check Wix Bootsrapper. But as far as I know it has poor flexibility to setup install steps. For this propose you can combine Wix with other for example NSIS. You can create application installer by using Wix and Bootsrapper application, which will contains your application MSI and Framework MSI, by using NSIS.
To create database during installation you also can use WIX. You need to create database generation plan, which will contain queries for creating database. This generation plan can be executed as part of the installation process (http://wix.tramontana.co.hu/tutorial/sql/creating-a-database). It is good choice wile you don't need additional information from user. In other case you will need to create custom UI.
From my experience with built in Visual Studio install tools, they're all horrible.
I highly recommend Advanced Installer. It's a very powerful tool to create installers and patches for your software. It should have all the features you need in the free version, including checking for prerequisites such as .NET Framework on the user's machine, and installing things when needed.
Related
this is my first post in stackoverflow, I've always checked this site by searching in google, so I decided to join it myself! I hope to be useful to others
I'm a 3d developer (DirectX), but recently I've started making an SMS gateway using C# and SQL Express, now I'm going to create a setup file for my project (which uses .NET 3.5), what are my options? I've heard that VS 2008 can make setup, is there any sample? how can I include SQL express in my setup app?
also I've downloaded Install Shield 2010 which has a built-in support for VS 2008, I want to make my setup in a way that it detects SQL on target system and if it finds SQL already installed, doesn't try to install it again (the same rule can be applied for .NET), what are my options? how can I make such a setup file?
thanks
With Microsoft's Visual Studio, there is an inbuilt Setup Template which you can use.
Click Once
For your scenario you should take a look at Adding Click once Custom Prerequisites.
Setup And Deployment Application
For your scenario you should take a look at the Walk-through.
Or as you mentioned you have InstallSheild 2010 then:
Install Shield Wizard
Take a look at this Walk-through with Limited Edition
As for SQL Server i think you can usually go as far as SQL Server Compact Edition. (For anything greater you may need to Inform User to install it himself)
I have no personal experience with it, but SQL Server 2008 Compact might be good for this. It is an embedded solution so so you don't actually need to install a server. Alternatively you could look at SQLite, which has native .NET implementations (google for "sqlite .net").
I am wondering how can I make a setup project for each of these projects
Asp.net mvc 2.0
C# cmd line
Application C# web-service
I am using VS 2010 ultimate and I know that I can use the the free edition of install shield for at least the cmd line application. I am not sure about the other 2. I also know about the setup project that you can use. I just need a lot more than the basics so I am not sure how to make either one do these things.
So here is some criteria that each of my setups should be able to do.
Asp.net mvc 2.0 criteria
free (I really don't want to pay for an installer - you can list them just so I am aware of them).
Terms of service
Ability to force a user to setup certain settings. Like connection string, smtp settings. So they should be able to type it in through the setup wizard and the web.config should be updated based on this.
When it installs the stuff it should all be .dlls for all the C# code.
C# cmd line criteria
All criteria as above
I am not sure if this has to be done in the code but I have a html file that contains a template for a message. The path to this file is in the web.config so I a person needs to set this path each time they install it. I tried to do this in code but I could not figure out how to make it find the right path in development and the right path in production. It seems like If you run in VS the path is different.
Web-service
Pretty much everything I covered in the first 2 ones.
Thanks
If I were you, I would choose WiX as a platform for your installers for all these applications. Some reasoning behind this:
it is XML-based, that is, friendly to source control, diffing and merging
it has rich set of tools for most of scenarios you might need (harvesting lots of files, creating upgrades and patches, creating multi-lingual installs, etc.)
it is free and open source
it is production-ready (at least, version 3.0 - later versions are still in beta)
it is used by Microsoft to create installations for such products like MS Office
it has rich community at wix-users#lists.sourceforge.net and StackOverflow
it integrates into the VS like a charm
it is friendly to build engines like NAnt and MSBuild
VS setup project is not my choice because:
it is very limited in set of features-
it encourages bad practices like Installer classes
finally, it was retired by Microsoft
I'm not familiar with InstallShield Limited edition, though.
Hope this overview will help you finding the best option for your case.
Hi
I'm looking to deploy my first .Net 4.0 app.
I know VS comes with an installer project and a free version of InstallShield, however the free version of install shield doesn't do what I need, or so I think, and the MS installer is end of life so don't want to learn it!
What is everyone using? I have in the past used NSIS but it doesn't build MSI's and it was a problem to some people who wanted it as an MSI.
Here is what I need to do during installation, in addition to the normal stuff:
manipulate an XML file on the target machine.
Call a COM object
Any recommendations (i don't have 150+ to spend on an installer)?
WiX is free (as in speech and as in beer), but you're going to hate the learning curve.
You can definitely modify XML files, though.
I have had great success with this tool. It has a free version that has many capabilities out of the box. I think it will do the job for you.
http://www.advancedinstaller.com/
Here is the feature matrix, to tell you what you don't get with the free version:
Feature Matrix
You may or may not have found this already, but it is possible to execute Custom Actions in the InstallShield Limited Edition version bundled with VS2010, using a deployed EXE, VBScript or JavaScript.
The number of points at which you can execute the custom action are greatly reduced in the free version, but should enable you to write the appropriate code to modify the XML file and call the COM object as you require.
Custom actions item can be found in Solution Explorer tree for the InstallShield project, under (5) Define Setup Requirements and Actions.
InstallShield 2010LE can consume merge modules which means you can combine it with WiX to inject things into it that it wasn't intended to do. Also it compliments WiX nicely in that it has the bootstrapper that WiX does not.
If your installer is really simple I'd be willing to set it up for you intially for the cost of a nice lunch.
I have developed a small desktop application in c#(using windows forms). For this project I need mysql, MySql.Data.dll and some property files...
I am ready with my project but I need to burn it on a disk(with Autorun express).
when I run that cd
It should ask me to check whether the system has mysql installed in it or not,if not installed already then it should install now in the specified location
run some database scripts to generate database and relationships and constraints
and finally it should copy my .exe file on to the hard disk (specified location).
Thanks,
srini.
It sounds like you're trying to use autorun to kick off an installer. Take a look at the built-in Installer project in Visual Studio, or take a look at WiX.
"Check whether the system has mysql"
To validate whether the machine you
has MySql, you'll need to define
what you're looking for. As for most
products, you can find them in the
registry. I'm not sure where MySql
puts that info.
"Run some database scripts"
You can kick off a custom action that will
properly install the database.
"Copy my .exe file"
Specify where you want the installer to put your
executable and other binaries
(MySql.Data.dll).
NSIS is another good choice for an installer. I used that one pretty extensively, and am using WiX on my current project mostly just to try a different approach. The one included with Vistual Studio 2005 is very buggy, but I have not tried the included ones for Visual Studio 2008 and later.
NSIS and WiX follow very different approaches for creating the installer file. You may find one or the other easier for you to understand. Both seem to have pretty active communities that will help if you get stuck (or ask here of course).
We are working on deploying a very custom application.
The application is the main program (and only program) that will run on the PC, but it depends on multiple 3rd party installers that must be installed via separate setup programs. Some of these are standard MSI, install shield, other outdated setups, etc.
On top of that we must deploy SQL Server Express 2005, install IIS if it is not found and setup a website.
Our final end user deploying this will be a person with technical experience on a new "out of the box" PC with XP SP3.
What is a good option for developing this? WiX? Visual Studio setup projects may not cut it. There is also the issue of somehow running other MSI's while an MSI is already running.
Would it function better as a standard C# application that requires .Net to be preinstalled? Then it would merely prompt for a few options then run several installers I suppose.
Any thoughts? We'd prefer to stick to C# .Net.
Doesn't XP SP3 already have a .NET runtime installed?
If your end user is someone with technical experience then it seems reasonable to sacrifice some of the "wizardness" of an MSI package for the flexibility of something a little more raw, such as a Ruby script, Powershell script, or .NET console or Winforms app.
This comes down to the benefit vs. cost.
If this is only to be run on a single or small number of target PCs and you have the ability to support the install (even remotely), I would recommend going to a manual install for any 3rd party dependencies.
It will be much easier to provide each package's installer with written instructions and provide than to write/test/debug (and probably still support) a complex, fully automated installer that will only be used once or thrice.
If there will be many installations, the automation will give more benefit.
There is an installer product called Inno Setup that might suit your needs. It allows for custom scripting so you can detect whether all of the dependencies are installed.
If some of them are not installed then with some scripting the installer can download and install the 3rd party dependencies before installing your app. Some help with that can be found at the Code Project article. (http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal.aspx)
The only problem with this route is the scripting language is in pascal.
Just a question, is the company you work for supplying the boxes because if you are then couldn't you pre-install the software? At least that way there is one less thing that can go wrong.
WIX is a fairly flexible way to create the installer (although the learning curve can be quite a bit as the documentation still is lacking). That would probably be your best bet for installing the components that are actually your product's artifacts. Have it check that the required components are installed, but I wouldn't try to launch installers off of it. Instead, like Seth mentioned, write a Powershell script/VBScript (or Console application) that will do the component checking and launch the old installers for user in the order necessary. Of course you would need a way to capture when the installer finishes before continuing on (don't know if VBScript really has that capability, so Powershell/Console app may be a wise choice). And the final installer called would be your product. This way if there's reboots required the installer can be ran the exact same way and would just keep checking for required components and firing off installers as needed.