How to create a Setup package by using Visual Studio .NET

This step-by-step article explains how to create a setup package in the Visual Studio .NET development environment. This article also explains the different types of setup projects and how to include files or dependencies in your setup.

Types of deployment projects

There are five types of deployment projects: Merge Module Project, Setup Project, Web Setup Project, and Cab Project. The Setup Wizard is provided to step you through the process of creating deployment projects. The following are guidelines for choosing the right type of deployment project for your project.

 Collapse this tableExpand this table
Project type Purpose
Merge Module project (.msm) Package components that might be shared by multiple applications
Setup project (.msi) Builds an installer for a Windows-based application
Web Setup project (.msi) Builds an installer for a Web application
Cab project (.cab) Creates a cabinet file to download to a legacy Web browser
Setup Wizard (.msi) Helps automate the creation of one of the deployment projects mentioned earlier in this table

Merge Module projects allow you to package files or components into a single module to facilitate sharing. The resulting .msm files can be included in any other deployment project but cannot be deployed on their own.

The distinction between Setup and Web Setup projects concerns the location in which the installer will be deployed:

  • For a Setup project, the installer installs files into a Program Files directory on a target computer.
  • For a Web Setup project, the installer installs files into a Virtual Root directory on a Web server.

Cab projects allow you to create a .cab file to package ActiveX components that can be downloaded from a Web server to a Web browser.

How to create a Setup package

  1. Start a new project by doing one of the following:
    • On the File menu, point to New, and then click Project.

      -or-

    • If you have an project open that you would like to create a setup package for, right-click Solution MyProject (where the name of your project is MyProject) in the Solution Explorer, point to Add, and then click New Project.
  2. In the New Project dialog box, select Setup and Deployment Projects in the Project Type pane, and then select the type of setup that you want in the Templates pane.

    The project is added to the Solution Explorer, and then the File System Editor opens.

  3. In the Properties dialog box, select the ProductName property, and then type the name of your product.

How to add files to the Setup package

  1. In the File System Editor, select the Application Folder node.
  2. Right-click the Application folder, and then on the Action menu, click Add, File. In the Add Files dialog box, browse to select any files that you need to add to your application.

    NOTE: If you already have an application project in your solution, you can add the project outputs by selecting Project Outputs instead of File.

  3. To add an existing merge module to your setup package (this is not possible for a Cab project), right-click the name of your setup package in the Solution Explorer. Click Add, and then click Merge Module. In the Add Modules dialog box, browse to select any merge modules that you need to add to your application.

Create EXE or Setup File in .NET Windows Application

Visual Studio 2005 Setup and deployment Projects provides to make a exe in .NET windows application is easy and rapidly
Visual Studio provides templates for four types of deployment projects: Merge Module Project, Setup Project, Web Setup Project, and Cab Project. In addition, a Setup wizard is provided to help step you through the process of creating deployment projects. You can see the templates and the wizard in the New Project dialog box under the Setup and Deployment Projects node.
The following are guidelines for choosing the right type of deployment project for your project.
1)Merge Module Project : Packages components that might be shared by multiple applications.
2)Setup Project : Builds an installer for a Windows-based application.
3)Web Setup Project : Builds an installer for a Web application.
4)Cab Project : Creates a cabinet file for downloading to a legacy Web browser.
5)Smart Device Cab Project : Creates a Cab project to deploy device applications.
This topic demonstrates deployment using a Setup and Deployment Project.
Setup Projects
Setup projects allow you to create installers in order to distribute an application. The resulting Windows Installer (.msi) file contains the application, any dependent files, information about the application such as registry entries, and instructions for installation. When the .msi file is distributed and run on another computer, you can be assured that everything necessary for installation is included; if for any reason the installation fails (for example, the target computer does not have the required operating system version), the installation will be rolled back and the computer returned to its preinstallation state.
After you have developed your windows apllication,now you want to make a exe.how can? These steps are gives the guidance to you…
1, Go to file menu > click Add > new project >now “Add New Project” Dialog appear.

2.Select “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK.

3.New project appear in solution explorer,for example you give the name “MyEXE”..it will display with this name.

4.right click the MyEXE > go View > click “File System”

5.You can see the “File System on TargetMachine”under  three folders
Application Folder
User’s Desktop
User’s Program Menu

6.Select Application Folder and right click Add>Project Output>select Primary output

7. select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from  primary output name to MyEXE

 

same procedure follows the user’s program menu also

8.If you want to change the Manufactures name for exe,just right click the project go to properties

change the properties as per you requirement

9.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)

 

EXE available @ this location

When you want to install  the EXE on the client machine,you should be installed .NET Framework on that mc because,Applications and controls written for the .NET Framework version 2.0 require the .NET Framework Redistributable Package version 2.0 to be installed on the computer where the application or control runs.

Introduction to postback in asp.net

Today we are going to introduce you to the concept of PostBack in ASP.NET.

PostBack is the name given to the process of submitting an ASP.NET page to the server for processing . PostBack is done if certain credentials of the page are to be checked against a database (such as verification of username and password). This is something that a client machine is not able to accomplish and thus these details have to be ‘posted back’ to the server.

A simple example to illustrate the usage of PostBack is a login page. After the user has typed his username and password, he clicks on the ‘Login’ button. Upon the click, the page is sent to the server to check against the database/XML file to check if the user with supplied details is an authenticated user.

Then there arise certain events ( Listbox Index Changed,RadioButton Checked etc..) in an ASP.NET page upon which a PostBack might be needed. Consider the case in which you have 2 ComboBoxes. Let us say the first ComboBox asks you for the Country you reside in and the second one asks you for the State/Province in that country. Based upon the Country you select, the list of States/Provinces must be shown. Thus, in order to fill the values in the second ComboBox, the selection in the first ComboBox must be known to the server. Thus, as and when an item is selected in the first ComboBox, a PostBack must be done and the appropriate list of items must be filled in the second ComboBox.

To handle these situations, you need to enable the ‘Auto PostBack’ property for those controls whose events are going to trigger some kind of server processing (the case of the first ComboBox in the previous example).

Usage of IsPostBack in ASP.NWT-

IsPostBack is a Boolean property of a page when is set (=true) when a page is first loaded. Thus, the first time that the page loads the IsPostBack flag is false and for subsequent PostBacks, it is true. An important point to be noted here is that each time a PostBack occurs, the entire page including the Page_Load is ‘posted back‘ and executed.

Thus a very common programming practice is that whenever some part of the code is to be executed just the first time a page loads, it is checked against the IsPostBack flag.

If you have not understood the concept clearly, do not worry. Programming examples in subsequent posts will help making this concept clear.

Tough All-Terrain Military Robot Unveiled

Researchers unveiled today a unique unmanned military vehicle prototype that combines mobility, payload-carrying capacity, and ruggedness to aid troops in combat.

The “Crusher” is a 6.5-ton vehicle made of high-strength aluminum tubes and titanium nodes protected by a steel skid plate that can absorb shocks from impacts with rocks and other objects.

The vehicle navigates on its own through tough terrain and overcomes obstacles such as ditches and boulders. It can also carry more than 8,000 pounds in payload and armor.

With electric motors set in the vehicles’ six wheels and powered by a hybrid system that uses a turbo diesel generator, the Crusher can travel almost 26 mph.

“We’re developing Crusher to provide technology insights to the broader Army community to show people what can be done and pave the way for the future,” said John Bares, director of the National Robotics Engineering Center and the principal investigator for the project. “Although it’s not being designed for production, Crusher could be matured further to withstand the rigors of military fielding.”

Automated forces like Crusher might initially be used in support roles and later for tactical functions, researchers predict.

“In five to 10 years, we should see robots working alongside our troops to protect them and help with tasks in the field,” Bares said.

The technologies used in the development of the Crusher can also have potential use in fields such as construction, faming, and mining.

SQL Server Triggers
Triggers are stored procedures which are fired when data is modified in an underlying table. They can evaluate data being added to a table for validation purposes, or can make changes in that or other fields depending on the value of that data. You can use them even to execute a separate stored procedure, or to roll back a data modification or an entire transaction.

In earlier versions of SQL Server, triggers were used to maintain referential integrity. In current versions, constraints and foreign keys are used to accomplish much of those tasks, but triggers are still used to accomplish more complex tasks than that are available to the built in newer tools, such as complex column constraints, evaluation of tables in other databases, complicated defaults, or cascading routines involving multiple changes in multiple tables.

Triggers are created in the Enterprise Manager, or in the Query Analyzer through the object browser. There are also templates for triggers in the Query Analyzer (Edit|Insert Trigger). Triggers can be created with the following syntax:

CREATE TRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] }
[ WITH APPEND ]
[ NOT FOR REPLICATION ]
AS
[ { IF UPDATE ( column )
[ { AND | OR } UPDATE ( column ) ]
[ … n ]
| IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )
{ comparison_operator } column_bitmask [ … n ]
} ]
sql_statement [ … n ]
}
}

Professor Nakamura Makoto !!! Scientist uses inkjet printer to print Human Organs.

This is about an inkjet printer turning into a life saver in the future.

Professor Makoto Nakamura , A professor in the Toyama University, is working on a printer which prints Human Organs. Sounds unbelievable right? but he has the “how to do” formula. He is actually gaining on the idea with proofs.

Pr Makoto Nakamura

Yes, He is talking about actual organs like hearts and kidneys. He has already prooved his idea by printing a tube of cells which are as narrow as the human hair. Nakamura predicts that he would be able to print a heart after about 20 years of hard work and research. Well, these tubes were made with an inkjet printer. Nakamura’s team worked for three years to develop the tubes.

The printer is precise upto one thousandth of a millimeter. a single tube of three millimeters takes one and a half minute to print using Nakamura’s method.

Professor Nakamura started working on this from thirteen years back, when he was a Pediatrician. He dedicated his practice for the noble cause of serving mankind and became a researcher and started contributing to the progress in this field.
Nakamura found out that an inkjet printer’s drops and human calls are about the same size – approximately one hundredth of a millimeter.

In 2003, Nakamura found cells to survive the printing process, and the rest is history.

Let us hope that Nakamura succeeds in his venture and help thousand of heart patients around the world.

Techfizz

GREETINGS!!!