Solved

execute exe during install.

Posted on 2012-04-05
13
182 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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 was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

825 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