Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

execute exe during install.

Posted on 2012-04-05
13
Medium Priority
?
188 Views
Last Modified: 2012-04-05
I want to execute an exe (.NET framework install) during a Setup/install project.  How do I do this?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 4
13 Comments
 
LVL 38

Expert Comment

by:PaulHews
ID: 37812189
Include the exe as a file or as a project output in your install project.  Right click your install project in project explorer and select "Custom Actions"  You'll see a tree of custom actions with nodes for Install, Commit, Rollback and Uninstall.  Assuming you only want to lauch the EXE during install, right click the "Install" node, and select "Add Custom Action"  You'll get a dialog that allows you to browse to the output or file.  Select the executable output or file and click "Ok."

If you need to add arguments when you launch the EXE, click the action and locate arguments in the properties for the action.

Note that if it is a .NET project, the installer should be able to install all the prerequisites, so you should have no problems.  If it is a different type of executable, make sure the installer includes all the required runtimes.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812227
project explorer?   You mean solution explorer?  See attached
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812230
See attached
setup1.png
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812291
Also, you state that, "Note that if it is a .NET project, the installer should be able to install all the prerequisites".  And that's exactly what I want.   But I ran my install and it tells me it requires the .NET framework and then takes me to Microsoft Web site.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 37812353
Sorry I thought you wanted to run a custom action.  You want to include .NET framework with your install project.  The best way to do this:

http://stackoverflow.com/questions/6090913/make-an-installation-program-for-c-sharp-applications-and-include-net-framework

Note that it creates a folder with an external file that the bootstrap setup.exe calls, so that must be distributed with your setup files.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812453
That link appears to download the framework as it installs.  I already have the framework install exe.  All I want to do is include it in the install and execute it first.
0
 
LVL 38

Accepted Solution

by:
PaulHews earned 2000 total points
ID: 37812565
All I want to do is include it in the install and execute it first.

There's a technical reason why you can't do that.  While one installation is in progress (your program), you can't start an installation for another (.NET framework.)   This is why MS has provided the means to include it at the same location.

That link appears to download the framework as it installs

No, where step 8 says "check output"  you will see that the .NET framework install is output to a folder next to your install files.  This folder must be included alongside your install files for the bootstrapper to utilize it.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812629
ah, got it!  Thanks.   Let me give it a try....
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812671
arggggg.   The install keeps telling me it requires the .NET framework, and if I click yes, takes me to Microsoft WEB site.  Is this correct?   I want the install done without prompts.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812681
What do I need to distribute?  I was assuming just the msi file.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 37812714
No, the setup.exe, msi file, and the two folders must be distributed.  You can use a self extract file to package them if you want.  You have to run the setup using the setup.exe bootstrapper for it all to work properly.

I just did a test with a simple installer on a virtual machine and it set up the .NET 4 client framework without any visit to the web site.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37812756
ok.  This is for a school project, so I think I'll just do this, distribute the framework exe and run it first.  And also distribute my app.exe.  it should run after .NET is installed.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 37812870
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question