none
How to add the .net setup file into a project setup file? RRS feed

  • Question

  • We have developed the project using c#. We have created the setup file of our project, while installing the project, first it should check in that system, wthr .net framework is there or not, if it is not there means automatically it has to install the .net framework. so for that purpose how to add the .net setup file into my project setup file?

     

    Friday, August 18, 2006 3:43 PM

All replies

  • If you are using Studio 2005 it is incredibly easy. Select the Setup project in the Solution Explorer, right-click and select Properties. Click on the Prerequisites button. Then you'll get a list of built-in installers for Dot Net, VC runtime, SQL Express, etc. Select the one(s) you want. Be sure to do this for both debug and release builds. These installers are called Bootstrappers in that they check for their own existence and install themselves if necessary.

    When your setup program starts, it will check for (in your case) whether Dot Net is installed. If not, a small dialog pops up with a list of the prerequisite(s) you selected that are not yet installed, and tells you "they're not installed. Can I install them now?" (so you have one last chance to abort). Note that if you decline to install the prerequisites, your installer will NOT be invoked.

    This bootstrapper mechanism is extensible and you can create your own bootstrapper package and add it to the list of prerequisites. It's really cool.

    I'm told that Studio 2003 has a plug-in available that supports Bootstrappers, but I'm not sure how it works. MSDN has several references to it when you search on "bootstrapper packages".

    HTH

    • Proposed as answer by 4848285 Tuesday, May 11, 2010 3:12 AM
    Friday, August 18, 2006 4:38 PM
  • hi,

    Thank u very much for ur timing help, its working fine. its automatically installing the .net framework,

    thank u.

    Saturday, August 19, 2006 8:42 AM
  • hi,

     could u pls help me ,and let me no that when the setup detects that .net framwork is not installed it is directed to website to install automatically in your case?if not then u can definetly help me.

     I want to install windows installer2.0 ,.net framework  and sqlexpress from the place where application is stored,i have selected the option of installing the prerquisites from the same path as the application while selecting the prequisites.

    but when i try to run the setup it shows me the message that ".net framework is required to run this application and u can install it from web.select yes to go the website and then try again to install the application".

    second problem when i install .net framework from the setup which i have packed along  with the application it get installed properly,and  then when i try again to install the application it get installed properly.without having the sqlexpress installed.

    Kindly send me the solutions ,that would be greatly appreciated.

    thanks in advance

     

    Regards,

    Govind.u.sharma

    Saturday, August 26, 2006 11:05 AM
  • hi,

     could u pls help me ,and let me no that when the setup detects that .net framwork is not installed it is directed to website to install automatically in your case?if not then u can definetly help me.

     I want to install windows installer2.0 ,.net framework  and sqlexpress from the place where application is stored,i have selected the option of installing the prerquisites from the same path as the application while selecting the prequisites.

    but when i try to run the setup it shows me the message that ".net framework is required to run this application and u can install it from web.select yes to go the website and then try again to install the application".

    second problem when i install .net framework from the setup which i have packed along  with the application it get installed properly,and  then when i try again to install the application it get installed properly.without having the sqlexpress installed.

    Kindly send me the solutions ,that would be greatly appreciated.

    thanks in advance

     

    Regards,

    Govind.u.sharma

    Saturday, August 26, 2006 11:08 AM
  •  

    If you are using Studio 2005 it is incredibly easy. Select the Setup project in the Solution Explorer, right-click and select Properties. Click on the Prerequisites button. Then you'll get a list of built-in installers for Dot Net, VC runtime, SQL Express, etc,Windows Installer 2.0. Select the one(s) you want. Be sure to do this for both debug and release builds. These installers are called Bootstrappers in that they check for their own existence and install themselves if necessary.

    When your setup program starts, it will check for (in your case) whether Dot Net is installed. If not, a small dialog pops up with a list of the prerequisite(s) you selected that are not yet installed, and tells you "they're not installed. Can I install them now?" (so you have one last chance to abort).Automatically it will paste the .net framework, windows installer 2.0,sql express in ur setup file location,  Note that if you decline to install the prerequisites,  your installer will NOT be invoked.

    Try this method, Surely it will work, All the best

     

     






    Saturday, August 26, 2006 12:37 PM
  • hi,

     

    thank u for ur fast response ,i have accomplished my task half ,as when the setup tries to install sqlexpress ,it detects some problem and the setup fails.being very new to create setup ,i can't understand what is the problem.when i checked log file i was not able to find the problem it is facing.

    the log file contents are as follows:

    The following properties have been set:
    Property: [AdminUser] = true {boolean}
    Property: [ProcessorArchitecture] = Intel {string}
    Property: [VersionNT] = 5.1.2 {version}
    Running checks for package '.NET Framework 2.0', phase BuildList
    Running external check with command line "C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\dotnetfx\dotnetchk.exe"
    Process exited with code 0
    Setting value '0 {int}' for property 'DotNetInstalled'
    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet Explorer'
    Read string value '6.0.2900.2180'
    Setting value '6.0.2900.2180 {string}' for property 'IEVersion'
    The following properties have been set for package '.NET Framework 2.0':
    Property: [DotNetInstalled] = 0 {int}
    Property: [IEVersion] = 6.0.2900.2180 {string}
    Running checks for command 'dotnetfx\instmsia.exe'
    Result of running operator 'ValueExists' on property 'VersionNT': true
    Result of checks for command 'dotnetfx\instmsia.exe' is 'Bypass'
    Running checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe'
    Result of running operator 'ValueExists' on property 'Version9x': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.0.3': false
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.0': true
    Result of checks for command 'dotnetfx\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
    Running checks for command 'dotnetfx\dotnetfx.exe'
    Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled' and value '0': false
    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
    Skipping FailIf because Property 'Version9X' was not defined
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.0.3': false
    Result of running operator 'ValueNotExists' on property 'IEVersion': false
    Result of running operator 'VersionLessThan' on property 'IEVersion' and value '5.01': false
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false
    Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Install'
    '.NET Framework 2.0' RunCheck result: Install Needed
    Running checks for package 'Windows Installer 2.0', phase BuildList
    The following properties have been set for package 'Windows Installer 2.0':
    Running checks for command 'InstMSI\instmsia.exe'
    Result of running operator 'ValueExists' on property 'VersionNT': true
    Result of checks for command 'InstMSI\instmsia.exe' is 'Bypass'
    Running checks for command 'InstMSI\instmsiw.exe'
    Result of running operator 'ValueExists' on property 'Version9x': false
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '2.0': true
    Result of checks for command 'InstMSI\instmsiw.exe' is 'Bypass'
    'Windows Installer 2.0' RunCheck result: No Install Needed
    Running checks for package 'SQL Server 2005 Express Edition', phase BuildList
    Running external check with command line "C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\SqlExpress\SqlExpressChk.exe"
    Process exited with code 1
    Setting value '1 {int}' for property 'SQLExpressInstalled'
    The following properties have been set for package 'SQL Server 2005 Express Edition':
    Property: [SQLExpressInstalled] = 1 {int}
    Running checks for command 'SqlExpress\sqlexpr32.exe'
    Result of running operator 'ValueEqualTo' on property 'SQLExpressInstalled' and value '0': false
    Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionNT' and value '5.1': true
    Result of checks for command 'SqlExpress\sqlexpr32.exe' is 'Bypass'
    Running checks for command 'SqlExpress\sqlexpr32.exe'
    Result of running operator 'ValueEqualTo' on property 'SQLExpressInstalled' and value '0': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.1': false
    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
    Result of running operator 'ValueExists' on property 'Version9x': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.1.2': false
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false
    Result of checks for command 'SqlExpress\sqlexpr32.exe' is 'Install'
    'SQL Server 2005 Express Edition' RunCheck result: Install Needed
    EULA for components '.NET Framework 2.0' was accepted.
    EULA for components 'SQL Server 2005 Express Edition' was accepted.
    Copying files to temporary directory "C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\"
    Copying from 'C:\Documents and Settings\vishal\Desktop\WindowsApplication2\Setup1\Debug\dotnetfx\dotnetfx.exe' to 'C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\dotnetfx\dotnetfx.exe'
    Copying from 'C:\Documents and Settings\vishal\Desktop\WindowsApplication2\Setup1\Debug\SqlExpress\sqlexpr32.exe' to 'C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\SqlExpress\sqlexpr32.exe'
    Running checks for package '.NET Framework 2.0', phase BeforePackage
    Running external check with command line "C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\dotnetfx\dotnetchk.exe"
    Process exited with code 0
    Setting value '0 {int}' for property 'DotNetInstalled'
    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet Explorer'
    Read string value '6.0.2900.2180'
    Setting value '6.0.2900.2180 {string}' for property 'IEVersion'
    The following properties have been set for package '.NET Framework 2.0':
    Property: [DotNetInstalled] = 0 {int}
    Property: [IEVersion] = 6.0.2900.2180 {string}
    Running checks for command 'dotnetfx\dotnetfx.exe'
    Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled' and value '0': false
    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
    Skipping FailIf because Property 'Version9X' was not defined
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.0.3': false
    Result of running operator 'ValueNotExists' on property 'IEVersion': false
    Result of running operator 'VersionLessThan' on property 'IEVersion' and value '5.01': false
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false
    Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Install'
    '.NET Framework 2.0' RunCheck result: Install Needed
    Verifying file integrity of C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\dotnetfx\dotnetfx.exe
    WinVerifyTrust returned 0
    File trusted
    Installing using command line '"C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\dotnetfx\dotnetfx.exe"  /q:a /c:"install /q /l"'
    Process exited with code 0
    Running checks for package '.NET Framework 2.0', phase AfterPackage
    Running external check with command line "C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\dotnetfx\dotnetchk.exe"
    Process exited with code 1
    Setting value '1 {int}' for property 'DotNetInstalled'
    Reading value 'Version' of registry key 'HKLM\Software\Microsoft\Internet Explorer'
    Read string value '6.0.2900.2180'
    Setting value '6.0.2900.2180 {string}' for property 'IEVersion'
    The following properties have been set for package '.NET Framework 2.0':
    Property: [DotNetInstalled] = 1 {int}
    Property: [IEVersion] = 6.0.2900.2180 {string}
    Running checks for command 'dotnetfx\dotnetfx.exe'
    Result of running operator 'ValueNotEqualTo' on property 'DotNetInstalled' and value '0': true
    Result of checks for command 'dotnetfx\dotnetfx.exe' is 'Bypass'
    '.NET Framework 2.0' RunCheck result: Install Succeeded
    Running checks for package 'SQL Server 2005 Express Edition', phase BeforePackage
    Running external check with command line "C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\SqlExpress\SqlExpressChk.exe"
    Process exited with code 1
    Setting value '1 {int}' for property 'SQLExpressInstalled'
    The following properties have been set for package 'SQL Server 2005 Express Edition':
    Property: [SQLExpressInstalled] = 1 {int}
    Running checks for command 'SqlExpress\sqlexpr32.exe'
    Result of running operator 'ValueEqualTo' on property 'SQLExpressInstalled' and value '0': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.1': false
    Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
    Result of running operator 'ValueExists' on property 'Version9x': false
    Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.1.2': false
    Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': false
    Result of checks for command 'SqlExpress\sqlexpr32.exe' is 'Install'
    'SQL Server 2005 Express Edition' RunCheck result: Install Needed
    Verifying file integrity of C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\SqlExpress\sqlexpr32.exe
    WinVerifyTrust returned 0
    File trusted
    Installing using command line '"C:\DOCUME~1\vishal\LOCALS~1\Temp\VSD63.tmp\SqlExpress\sqlexpr32.exe" -q /norebootchk /qn reboot=ReallySuppress addlocal=all instancename=SQLEXPRESS SQLAUTOSTART=1'
    Process exited with code 70038
    Status of package '.NET Framework 2.0' after install is 'InstallSucceeded'
    Status of package 'SQL Server 2005 Express Edition' after install is 'InstallFailed'

     

     

     

    i would thankful to if u can help me to overcome this problem.

    secondly how would i install the database of my application in sqlexpress once it is installed before going to my application installation.

     

    Thanks in advanced .

    Monday, August 28, 2006 5:51 AM
  • hi,

     

     i think once the setup install .net framework 2.0 it requires reboot .that may be the reason why it is not able to install sqlexpress .what should  i do to reboot the system and then continue the installation.pls send me ur suggestion .thanks in advance.

    Monday, August 28, 2006 6:48 AM
  • hi

    once if u r installing .net framework it will not reboot the system, only if u r installing windows installer it will reboot system.

    If u r selecting the windows installer also after rebooting the system automatically it will continue the setup file installation.

    Surely it will work, u try this one & let me know

    All the best

    Friday, September 1, 2006 3:28 PM
  • hi,

    bingo it worked....thanks a lot

    The mistake what i was doing was after completing the installation of .netframework and windows installer 3.1 it was asking for reboot and i was selecting "no".was wrong u should dselect "yes"and once it is reboot it will automatically start installing sql Express followed by my Application.

    Thanks .

    if u can help me by giving ur valuable suggestion on the following issue:

    My application is already having exsisting database which i need to import in sql express during installation of the application.

    i searched on Net but could't find the right information on doing so.

    Thanks for ur help once again.

    have nice day.

    Saturday, September 2, 2006 9:27 AM