Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 4 - Building an MSI File: Visual Studio and Or...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Building an MSI File: Visual Studio and Orca
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 27
    2004-10-12

    Table of Contents:
  • Building an MSI File: Visual Studio and Orca
  • Building a Package
  • A First Look at Shortcuts
  • More About Properties
  • GUIDs: Product, Upgrade, and Package Codes
  • Into the Package with Programming

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building an MSI File: Visual Studio and Orca - More About Properties


    (Page 4 of 6 )

    Windows Installer properties are the variables that you use to interact with the installation, such as the ProgramFilesFolder property I mentioned. They’re somewhat similar to Environment variables in the sense that they are text-based variables that define other text, standard ones are provided by Windows, and you can define your own and sometimes set the Windows ones. You’ll be looking at properties in detail later, but be aware that they have some important behaviors:

    1. Properties are case-sensitive. If you create your own property name and refer to it later, be sure that you get the case correct.

    2. A property can be public or private. A public property must be in uppercase. If it’s public, you can specify it with a value in a command-line install of a package. Also, because of the way that installations work internally, a public property that you create is also visible throughout most of the installation sequence. You cannot specify private properties in a command-line installation and you can’t propagate them throughout the installation sequences (covered in Chapter 5).

    3. You can treat properties as if they were logical values or data values. I’ll use the built-in VersionNT property as an example. This property tells you whether the system you’re installing on is in the Windows NT family (NT, Windows 2000, Windows 2003, Windows XP). For example, anything you do that depends on Windows Services can be conditioned on VersionNT as if it were a Boolean-valued attribute. It’s not unusual to see VersionNT as a condition in these situations. However, if you look at the actual value of this property you’ll find it returns the version of the NT family that is running. On Windows 2000 this property has the value 500, and on XP the value 501. In other words, it can be used as a Boolean True/False value even though it contains a version value. If you’re a C programmer, you might be familiar with the idea that a value is True if it is non-NULL in spite of its actual value, somewhat like the behavior of some C language variables.

    4. The data type of a property is vague. As you’ve seen, you can treat VersionNT as Boolean-valued even if the actual value of it is 500. If you wanted to check if you were running on Windows 2000 or later, you might check for VersionNT>=500. Does this mean it’s a string or a Boolean or a number? In practice it usually doesn’t matter because the context usually defines how the data type works, but this vagueness might well offend you if you are a programmer with a type-safe sensibility.

    An installer package—a database—contains a Property table, which is where you can define your own properties if you need to give them default values, and also set values for standard installer properties. You aren’t required to declare your own properties in the Property table. Declare them only if you need to give them a default value, because the act of programmatically setting a property name to a value creates the property on the fly.

    Looking at Figure 2-9, you see the Property table of your Notepad package. The table in general is just a list of property names and property values, some uppercase and public, some lowercase and private. Because this list contains both user-defined (added by VS when it built the package) and Windows Installer–defined properties, there’s no way to distinguish between what is a predefined installer property and what isn’t, other than by looking in the SDK to see if it’s defined there. ProductName and Manufacturer are among the standard installer properties that are defined here. Like many other properties, these two end up on the system, where they are available to be retrieved using API calls, or shown to the user in places such as the Add/Remove Programs Control Panel applet. ProductVersion is another installer property that you set, but unlike ProductName and Manufacturer, its value is more than just informational. When you look at upgrades and updating your product, you’ll see that incrementing ProductVersion is a key step in the process.

     
    Figure 2-9.  The Property table

    One of the key properties in an installation is the TARGETDIR property. This is the property that names the product’s primary installation folder. It usually consists of a concatenation of other standard properties, such as [ProgramFilesFolder][Manufacturer]\[ProductName], which is what VS creates as the default location for the application folder.

    This is from The Definitive Guide to Windows Installer, by Phil Wilson, (Apress, ISBN: 1590592972). Check it out at your favorite bookstore today. Buy this book now.

    More Visual Basic.NET Articles
    More By Apress Publishing


       · Hi,I've read this article :building msi file with visual studio and orca and...
     

    VISUAL BASIC.NET ARTICLES

    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...
    - Creating and Drawing a Game Map in VB.NET (F...
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT