none
How to create good/friendly setups in .net/visual studio? RRS feed

  • Question

  • I'm creating setups for my application in Visual Studio.

    But there are many problems - i can't manage to create setups that 'upgrade' my products (even by using Orca and changing .msi files).

    I can't uninstall my software because user need my .msi all the time (most users delete installation package after the software is installed - that's a normal thing)

    http://i43.tinypic.com/95pv9j.jpg

    How to create setups that don't trouble user, developer, any one ! ?

     

    Regards,

    Lukas

    Friday, April 30, 2010 11:54 AM

Answers

  • At a quick glance at your question, ClickOnce deployment seems to be an easy and hassle-free way to manage your setup. ClickOnce will handle your install and download scenarios without the need to keep the msi around or handle upgrades.

    For more information on ClickOnce, go to http://msdn.microsoft.com/en-US/library/t71a733d(v=VS.2010).aspx

    For a more complete answer, Visual Studio offers different ways for you to solve your deployment problem. Depending on the nature of the application you are deploying you can choose from multiple deployment tools offerings. First you need to decide whether you want to go with Windows installer deployment or ClickOnce deployment. This document (http://msdn.microsoft.com/en-us/library/e2444w33(VS.2010).aspx) will help you identify what works best for your application and business needs.

    If you do choose the Windows Installer Deployment, you have a couple of options:

    If you are using Visual Studio 2010, you can easily use InstallShield Limited Edition that is available for download. Follow the steps in the announcement section in: http://social.msdn.microsoft.com/Forums/en-US/winformssetup/threads

    You can also use Setup and deployment projects to handle your deployment. For more information about Setup projects, go to http://msdn.microsoft.com/en-us/library/wx3b589t(VS.80).aspx

    For more advanced users Windows Installer XML (WiX) offers complete control over your setup. For more information about WiX go to: http://wix.sourceforge.net/

     


    Mohamed Hegazy
    Saturday, May 1, 2010 12:34 AM
  • RemovePreviousVersions in a setup project should just work. It would help to post issues in the ClickOnce and Setup/Depoyment Projects forum (under the Windows Forms section). This is a little old but stll relevant:

    http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

    It is not (or should not) be normal to delete MSI files after install. If you install Office, Visual Studio, or any number of other products there will be times when it will ask for the installation medium again. Repair, adding features etc etc.

    However it is very unusual to have an uninstall ask for the installation source. I don't think I've ever known a Visual Studio setup project do that. Is it possibly something you changed using Orca?

     


    Phil Wilson
    Saturday, May 1, 2010 7:26 PM
  • Hello,

    In addition, you may post your issue on the corresponding language general forum or ClickOnce and Setup & Deployment Projects Forum so you can get better and quicker response as this forum here is for the setup of .net framework.

    Thanks for your understanding.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Monday, May 3, 2010 9:47 AM
    Moderator

All replies

  • At a quick glance at your question, ClickOnce deployment seems to be an easy and hassle-free way to manage your setup. ClickOnce will handle your install and download scenarios without the need to keep the msi around or handle upgrades.

    For more information on ClickOnce, go to http://msdn.microsoft.com/en-US/library/t71a733d(v=VS.2010).aspx

    For a more complete answer, Visual Studio offers different ways for you to solve your deployment problem. Depending on the nature of the application you are deploying you can choose from multiple deployment tools offerings. First you need to decide whether you want to go with Windows installer deployment or ClickOnce deployment. This document (http://msdn.microsoft.com/en-us/library/e2444w33(VS.2010).aspx) will help you identify what works best for your application and business needs.

    If you do choose the Windows Installer Deployment, you have a couple of options:

    If you are using Visual Studio 2010, you can easily use InstallShield Limited Edition that is available for download. Follow the steps in the announcement section in: http://social.msdn.microsoft.com/Forums/en-US/winformssetup/threads

    You can also use Setup and deployment projects to handle your deployment. For more information about Setup projects, go to http://msdn.microsoft.com/en-us/library/wx3b589t(VS.80).aspx

    For more advanced users Windows Installer XML (WiX) offers complete control over your setup. For more information about WiX go to: http://wix.sourceforge.net/

     


    Mohamed Hegazy
    Saturday, May 1, 2010 12:34 AM
  • RemovePreviousVersions in a setup project should just work. It would help to post issues in the ClickOnce and Setup/Depoyment Projects forum (under the Windows Forms section). This is a little old but stll relevant:

    http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

    It is not (or should not) be normal to delete MSI files after install. If you install Office, Visual Studio, or any number of other products there will be times when it will ask for the installation medium again. Repair, adding features etc etc.

    However it is very unusual to have an uninstall ask for the installation source. I don't think I've ever known a Visual Studio setup project do that. Is it possibly something you changed using Orca?

     


    Phil Wilson
    Saturday, May 1, 2010 7:26 PM
  • Hello,

    In addition, you may post your issue on the corresponding language general forum or ClickOnce and Setup & Deployment Projects Forum so you can get better and quicker response as this forum here is for the setup of .net framework.

    Thanks for your understanding.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Monday, May 3, 2010 9:47 AM
    Moderator
  • Thank you for links, I didn't know about  ClickOnce and Setup & Deployment Projects Forum  (there is no global view at all forums, only a few from .net - http://social.msdn.microsoft.com/Forums/en-US/category/netdevelopment )

    My setup is regular setup project from VS2008.

    Setting RemovePreviousVersions in properties is far not enough. I had to use Orca tool and change priority of RemovePreviousVersions to 1450 (default is 6550), anyway - upgrading installed application still has a lot of problems :/ it's easier to uninstall and then install new version.

    But, It's a total misunderstanding to demand by installer to have installation file (.msi) just to uninstall application !!

    I think that this setup project from VS2008 is good just to install something simple (and forget about uninstalling, reinstalling or upgrading - it won't work properly).

    I can use ClickOnce on one simpler application (tested, thanks for links again), but I have a little more complicated app too - windows service and systray application working on user account - and it's a big pain to make this setup project works as it should (install everything, or uninstall and turn off windows service before removing)

    Thursday, May 20, 2010 8:11 AM
  • As I said before I've never known a VS setup project (or most others either) require the original install image in order to do an uninstall unless:

    1. It's an upgrade and the files on disk have been altered in some way.

    2. An uninstall custom action is doing something that causes Windows to attempt to resolve the source.

    So you've got an unusual situation. Setup projects DO work properly in the areas you're referring to. However you've never properly described the original problem you had that made you start using Orca. All you've said is that it didn't work (whatever that means) so you edited it with Orca and now you get a dialog asking for the CD image that you didn't expect.  


    Phil Wilson
    Thursday, May 20, 2010 6:31 PM
  • You are right.

    I'm using custom actions

    public partial class ServiceInstaller : Installer

    to install/start/stop/uninstall windows service. maybe that's a problem, still I think that Windows should make a copy of installer (or assembly with actions) to use it during uninstallation (maybe to windows\installer ? )

    Maybe that's the reason why upgrading software doesn't work ?

    Friday, May 21, 2010 8:11 AM