Solved

execute exe during install.

Posted on 2012-04-05
13
178 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
  • 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now