AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Chris
Expertise
I can answer pretty much any question relating to VB.NET and its use in a Windows environment. I specialize in ASP.NET web development and MSSQL database access.

Experience
I have over 5 years of industry experience using VB.NET and other .NET technologies for web and database development.

Education/Credentials
I have some college education, but does it really matter in this field of work?

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > how to create setup disk in VB.NET 2005

Topic: VB.NET



Expert: Chris
Date: 8/18/2007
Subject: how to create setup disk in VB.NET 2005

Question
Sir, I would like to know how to create a setup disk in VB 2005?

Answer
I'm assuming you're working with a Windows Forms project, instead of a Web Project.  If that's the case, then it's really easy to make an installer for your program:

Open your project, make sure it compiles correctly first, then click the File menu, pick Add, and then New Project.  In the Add New Project dialog box, expand Other Project Types and then pick Setup and Deployment in the left pane.  Choose Setup Wizard in the right pane, give your setup project a name (one that's different than the main project, such as ProjectSetup), and click OK.

Click Next past the wizard's introduction screen, choose "Cerate a setup for a Windows application" and hit Next.  Now you'll have to pick which parts of your program to deploy.  Normally, you only need "Primary Output from <your main project name here>" - this is the EXE and the various assemblies (DLLs) it depends on.  Your main project would be the one with the form that will load on startup.  You might also need to pick Content Files, if your project has things like gif/jpg files it expects to be in the folder the program gets installed into.  Only choose Source Files if you want people to get the actual source code as well.  You may want to include the Debug Symbols if you expect to debug it on the machine it's installed onto.  Click Next, and if you need to include any other files that are not part of your project in the installer (such as an .ico file for the shortcut to your program that will be created), this is where to do it, and then click Next again.  Review your choices, and click Finish.

That's pretty much it, except you'll have to instruct it on how to create your application's shortcut.  You'll see a new window with a number of special folders listed in the left pane.  Click on Application Folder, and then right-click on "Primary Output from <your main project>" and choose "Create Shortcut to Primary Output from ...".  Give it a name, this is what the user will see for the shortcut.  Now right-click the shortcut and pick Cut.  Click on "User's Programs Menu" in the left pane, and then right-click in the right pane and pick Add -> Folder.  Give it a title, then right-click on the new folder and Paste the shortcut there.  If you want to assign a custom icon to the shortcut, click on the new folder in the left pane, then click on the icon in the right pane.  In the properties window, find the Icon property, expand the dropdown, and pick Browse, then click Browse again in the dialog box that pops up.  If you selected to include an icon file in the next to last step of the New Setup Project Wizard, it will be in your Application Folder, so navigate there in the Browse dialog box, and select that icon file, and click OK.

That should be about it.  You can also right-click on "File System on Target Machine" in the left pane, and add other special folders, if you have more specific installation requirements.  If you want to specify things such as the name of the program being installed (so it shows up correctly in the Control Panel -> Add/Remove Programs dialog), click on the Setup Project in Visual Studio's Solution Explorer, and you can change these settings in the Properties window.

Hope this helps!


Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.