none
Installation project error

    Question

  • Hi,

    I have prepared an installation project using visual studio setup and deployement project and added an installer class for installing sql server based on the condition that i have specified on the installer i.e install application with sql server OR install application using Existing SQL Server ,alos i have added 

    SQL Server setup with my installation setup ,now when i choose install application with SQL Server ,sql server setup starts but in between it gives some windows handle problem and the setup didnot continue after that rather the SQL Server setup opens a window displaying RETRY and CANCEL but clicking on them nothing happens  ,also it hangs my setup too, i ahve searched net what the problem is but didnot find any answer alos in msdn i read an article that while installing SQL Server Windows handle is not any problem but it is creating problem with my setup please help..................................

    Thursday, May 17, 2012 6:31 AM

Answers

  • You can't install SQL from a custom action. You cannot install ANY MSI-based setup from a Visual Studio custom action. That's why things like SQL Express are prerequisites. You need a different way to get your SQL installed.

    Phil Wilson

    Thursday, May 17, 2012 4:30 PM
    Moderator
  • If I Select Instal SQL Server then the SQL Server Installation should start and my installation should wait until sql server installation should finish and after sql server installation is finished then my installation should continue..............

    Based on my knowledge, the custom action is running at the end of the installation. You can't do custom action before instillation.

    You can use custom action to do some trick to install SQL Server, see the link below.

    http://www.codeproject.com/Articles/33883/Invoke-another-MSI-from-an-MSI

    However, if  you want to do custom action before installation, I afraid there is no way.

    A possible workaround is creating a UI application to check the user input and install the Sql server and then create a custom bootstrapper for the UI application, http://msdn.microsoft.com/en-us/library/ms165429.aspx.

    I'm never tried this before but I think this should works. However, your user might doesn't like it as it start the custom bootstrapper at the first time and then msi started again.

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 18, 2012 8:20 AM
    Moderator
  • It looks like a similar issue 

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/07d3eaf5-cb52-412f-9f13-f9ffd8e2876b/#7567d45f-14ec-4560-970c-a3c2afb19f09

    You can actually control the installation of SQL server through Custom Prerequisite.

    you can design some UI part on your custom prerequisite, ask user opinion about installing SqlServer etc.


    Best Regards Sanjay Pant [Metadesign Solutions]

    Friday, May 18, 2012 9:04 AM

All replies

  • You can't install SQL from a custom action. You cannot install ANY MSI-based setup from a Visual Studio custom action. That's why things like SQL Express are prerequisites. You need a different way to get your SQL installed.

    Phil Wilson

    Thursday, May 17, 2012 4:30 PM
    Moderator
  • Thanks for replying but its client requirement to prepare installation like that only .........

    Friday, May 18, 2012 6:44 AM
  • Hi Rohit,

    As Phil's opinion, you can't install any MSI-based setup from a custom action.

    What confused me is that what your client need this two opinion as Prerequisites will check if it has been installed and it will installed according to the Install check result.

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 18, 2012 7:33 AM
    Moderator
  • Thanks for the guidence ,

    Actually client requirement is during installation,the installation should ask whether to install sql server or not (used default window present in User Interface of the Deployement Project, with two radio buttons first asking Install SQL Server and second asking Do not install SQL Server),and If I Select Instal SQL Server then the SQL Server Installation should start and my installation should wait until sql server installation should finish and after sql server installation is finished then my installation should continue..............

     

    I have done all that but problem is coming when i am installing SQL Server from my setup.............

    Friday, May 18, 2012 7:46 AM
  • If I Select Instal SQL Server then the SQL Server Installation should start and my installation should wait until sql server installation should finish and after sql server installation is finished then my installation should continue..............

    Based on my knowledge, the custom action is running at the end of the installation. You can't do custom action before instillation.

    You can use custom action to do some trick to install SQL Server, see the link below.

    http://www.codeproject.com/Articles/33883/Invoke-another-MSI-from-an-MSI

    However, if  you want to do custom action before installation, I afraid there is no way.

    A possible workaround is creating a UI application to check the user input and install the Sql server and then create a custom bootstrapper for the UI application, http://msdn.microsoft.com/en-us/library/ms165429.aspx.

    I'm never tried this before but I think this should works. However, your user might doesn't like it as it start the custom bootstrapper at the first time and then msi started again.

    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 18, 2012 8:20 AM
    Moderator
  • It looks like a similar issue 

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/07d3eaf5-cb52-412f-9f13-f9ffd8e2876b/#7567d45f-14ec-4560-970c-a3c2afb19f09

    You can actually control the installation of SQL server through Custom Prerequisite.

    you can design some UI part on your custom prerequisite, ask user opinion about installing SqlServer etc.


    Best Regards Sanjay Pant [Metadesign Solutions]

    Friday, May 18, 2012 9:04 AM