Solved

execute exe during install.

Posted on 2012-04-05
13
185 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

690 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