Exforsys

VB.NET 2005

  1. VB.NET 2005 Free Training
  2. The .NET Framework Architecture Part 1
  3. The .NET Framework Architecture Part 2
  4. Application Class and Message Class
  5. Implementing Class Library Object
  6. Visual Studio.NET Namespaces
  7. .NET Assemblies
  8. Differences between VB.NET 1.0 and VB.NET 2.0
  9. Introducing VB.NET Windows Forms
  10. Visual Studio Windows Forms Designer
  11. Exploring the Forms Designer generated code
  12. Setting and Adding Properties to Windows Form
  13. Implementing Inheritance
  14. Event Handling In Visual Basic .NET
  15. Building Graphical Interface elements
  16. .NET Common Windows Forms Controls Part 1
  17. .NET Common Windows Forms Controls Part 2
  18. Common Controls and Handling Control Events
  19. DomainUpDown and NumericUpDown Controls
  20. Dialog Boxes in Visual Basic .NET
  21. Visual Studio Adding Controls to Windows Form
  22. VB.NET Validation Controls
  23. Working with Menu Controls
  24. VB.NET MDI Applications
  25. .NET Exceptions
  26. VB.NET Creating and Managing Components Part 1
  27. VB.NET Creating and Managing Components Part 2
  28. Simple Data Binding
  29. .NET Complex Data Binding
  30. .NET Data Form Wizard
  31. Data Manipulation with ADO.NET
  32. SQL Server Stored Procedures
  33. SQL Server Ad Hoc Queries
  34. Finding and Sorting Data in DataSets
  35. ADO.NET Object Model
  36. Working with DataSets
  37. Using XML Data
  38. Working with File System in .NET
  39. Creating Web Service
  40. Instantiating - Invoking Web Services, Creating Proxy Classes with WSDL
  41. Web Reference and Web Services
  42. Web Services - SOAP, WSDL, Disco and UDDI
  43. Web Application Testing in VB.NET 2005
  44. Web Application Tracing and Debugging
  45. Working with Legacy Code and COM Components
  46. ActiveX Controls and Legacy Code
  47. Windows Application Testing
  48. VB.NET Windows Application Testing
  49. Tracing VB.NET Windows Application
  50. Debugging Windows Applications In Visual Studio.NET 2005
  51. Deploying Windows Applications In Visual Studio.NET 2005
  52. Customizing Setup Project in Visual Studio.NET 2005
  53. Shared Assembly
  54. Microsoft .NET Creating Installation Components
  55. The Registry Editor in Visual Studio.NET 2005
  56. The File Types Editor

Ads


Home arrow Technical Training arrow VB.NET 2005

The File Types Editor

Page 1 of 2
Author : Exforsys Inc.     Published on: 9th Aug 2005    |   Last Updated on: 24th Dec 2007

The File Types Editor

The File Types Editor can be used to create the required registry to establish a file association for the application being installed. A file association is simply a link between a particular file extension and a particular application. For example, the file extension .xls is normally associated with Microsoft Excel.

Ads

  • Add and Delete Document Types and Associated File Extensions in the File Types Editor.
  • The File Types Editor can be used to specify document types and file extensions that will be associated with your application when it is installed on a target computer.
  • Once installed, the extension and file type description will appear in the file types list in Windows.

There are three steps involved in associating a file type with your application:

1. adding a document type
2. associating a file extension
3. and associating an executable file

To add a document type

1. Select the File Types on Target Machine node in the File Types Editor.
2. On the Action menu, click Add File Type.
3. A new document type node is added and the default name is highlighted.
4. Type a descriptive name for the new document type.

To associate a file extension

1. Select a Document Type node in the File Types Editor.
2. In the Properties window, select the Extensions property and type an extension.

Note : Valid file extensions cannot be preceded by a period — enter the extension using the form xxx rather than .xxx. You can enter multiple extensions by separating them with a semicolon (xxx;yyy).

To associate an executable file

1. Select a Document Type node in the File Types Editor.
2. In the Properties window, click the ellipsis button () next to the Command property.
3. In the Select item in project dialog box, click the Add File button.
4. Select an executable file to associate with the file type.

Note A file type can only be associated with one installed executable file. To associate more than one executable file with a file type, you must first specify conditions for each executable file to ensure that only one will be installed for a given installation.

The User Interface Editor

The Interface Editor is used to manage the application installation interface. The editor allows us to define the dialog boxes that are displayed to the user and in what order they are shown.

The editor uses a treeview with two root nodes: Install and Admin. Below each of these nodes there are three nodes that represent the stages of the installation: Start, Progress, and End. Each of the three stages can contain a number of dialog boxes that will be displayed to the user when the resulting Windows Installer package is run. A default set of dialog box is predefined when we create the deployment project. The default dialog boxes that are present depend on the type of deployment project; Setup Project or Web Setup Project. However, if you are creating a Web Setup Project the Installation Folder dialog box will be replaced by an Installation Address dialog box.

Installation Mode
We’ll start by taking a look at the two modes that the installation runs: Install and Admin. These basically distinguish between an end user installing and a system administrator performing a network setup.

To use the Admin mode of the resulting Windows Installer Package msiexec.exe can be used with the /a command line parameter.

msiexec.exe /a .msi

The Start Stage
The Start stage is the first stage of the installation and contains the dialog boxes that need to be displayed to user before the actual installation of the files begins. This stage is commonly used to ask the user to select the base installation folder for the application and to ask the user what parts of the system he would like to install. Another very commonly task of this stage is to ask the user what their name is and what organization they work for. At the end of this stage the Windows installer service will determine how much disk space is required on the target machine and check that this amount of space is available. If the space is not available, the user will receive an error and the installation will not continue.

The Progress stage
The progress stage is the second stage of the installer and is where the actual installation of the file occurs. There isn’t usually interaction in this stage of installation. There is normally one dialog box that indicated the current progress of the installation. The current progress of the installation is calculated automatically

The End Stage
One the actual installation of the files has finished, the installer moves into the End stage. The most common use of this stage is to inform the user that the installation has completed successfully. It is often used to provide the option of running the application straight away or to view any release notes.

The Custom Actions Editor

The Custom Actions Editor allows the developer specify additional actions to be performed on the target computer at the end of an installation. For example, he might want to run a program that associates a server component with a particular message queue.

Custom actions must be compiled as a .dll or .exe file, or added to a project as a script or assembly before they can be added to a deployment project. Actions can only be run at the end of an installation.

The editor contains four folders, each corresponding with a phase of installation: Install, Commit, Rollback, and Uninstall.

Custom actions are run in the same order that they are displayed in the editor. Custom actions can be reordered via dragging with the mouse or via the Cut and Paste commands on the Edit menu.

Ads

Adding and Removing Custom Actions in the Custom Actions Editor

The Custom Actions Editor is used to specify custom actions to be run during installation on a target computer. Cstom actions that are contained in the outputs of a project can be added in the solution, including .dll files, .exe files, or Microsoft .NET Framework installation components, or compiled custom actions can be added as files or components.

The order of execution can also be controlled for custom actions.

The four actions that are defined in the editor are defined in the following table.

Events and Description

InstallThe actions defined for this event will be run when the installation of the files has finished, but before the installation has commited Commit - The actions defined for this event will be run when the installation has been committed and has therefore been successful.RollbackThe actions defined for this event will be run when the installation fails and rolls back the machine to the same state as before the install was started. Uninstall - The actions for this event will be run when the application is being uninstalled from the machine.



 
This tutorial is part of a VB.NET 2005 tutorial series. Read it from the beginning and learn yourself.

VB.NET 2005

  1. VB.NET 2005 Free Training
  2. The .NET Framework Architecture Part 1
  3. The .NET Framework Architecture Part 2
  4. Application Class and Message Class
  5. Implementing Class Library Object
  6. Visual Studio.NET Namespaces
  7. .NET Assemblies
  8. Differences between VB.NET 1.0 and VB.NET 2.0
  9. Introducing VB.NET Windows Forms
  10. Visual Studio Windows Forms Designer
  11. Exploring the Forms Designer generated code
  12. Setting and Adding Properties to Windows Form
  13. Implementing Inheritance
  14. Event Handling In Visual Basic .NET
  15. Building Graphical Interface elements
  16. .NET Common Windows Forms Controls Part 1
  17. .NET Common Windows Forms Controls Part 2
  18. Common Controls and Handling Control Events
  19. DomainUpDown and NumericUpDown Controls
  20. Dialog Boxes in Visual Basic .NET
  21. Visual Studio Adding Controls to Windows Form
  22. VB.NET Validation Controls
  23. Working with Menu Controls
  24. VB.NET MDI Applications
  25. .NET Exceptions
  26. VB.NET Creating and Managing Components Part 1
  27. VB.NET Creating and Managing Components Part 2
  28. Simple Data Binding
  29. .NET Complex Data Binding
  30. .NET Data Form Wizard
  31. Data Manipulation with ADO.NET
  32. SQL Server Stored Procedures
  33. SQL Server Ad Hoc Queries
  34. Finding and Sorting Data in DataSets
  35. ADO.NET Object Model
  36. Working with DataSets
  37. Using XML Data
  38. Working with File System in .NET
  39. Creating Web Service
  40. Instantiating - Invoking Web Services, Creating Proxy Classes with WSDL
  41. Web Reference and Web Services
  42. Web Services - SOAP, WSDL, Disco and UDDI
  43. Web Application Testing in VB.NET 2005
  44. Web Application Tracing and Debugging
  45. Working with Legacy Code and COM Components
  46. ActiveX Controls and Legacy Code
  47. Windows Application Testing
  48. VB.NET Windows Application Testing
  49. Tracing VB.NET Windows Application
  50. Debugging Windows Applications In Visual Studio.NET 2005
  51. Deploying Windows Applications In Visual Studio.NET 2005
  52. Customizing Setup Project in Visual Studio.NET 2005
  53. Shared Assembly
  54. Microsoft .NET Creating Installation Components
  55. The Registry Editor in Visual Studio.NET 2005
  56. The File Types Editor
 

Comments