Microsoft.Deployment.WindowsInstaller.Package Handles status messages generated when operations are performed on an or . installPackage.Message += new InstallPackageMessageHandler(Console.WriteLine); Provides access to powerful build, maintenance, and analysis operations on an installation package (.MSI or .MSM). Creates a new InstallPackage object. The file source directory and working directory are the same as the location as the package file. Path to the install package to be created or opened Open mode for the database Creates a new InstallPackage object, specifying an alternate file source directory and/or working directory. Path to the install package to be created or opened Open mode for the database Location to obtain source files and cabinets when extracting or updating files in the working directory. This is often the location of an original copy of the package that is not meant to be modified. If this parameter is null, it defaults to the directory of . Location where files will be extracted to/updated from. Also the location where a temporary folder is created during some operations. If this parameter is null, it defaults to the directory of . If the source location is different than the working directory, then no files will be modified at the source location. Handle this event to receive status messages when operations are performed on the install package. installPackage.Message += new InstallPackageMessageHandler(Console.WriteLine); Sends a message to the event-handler. Message string, containing 0 or more format items Items to be formatted Gets or sets the location to obtain source files and cabinets when extracting or updating files in the working directory. This is often the location of an original copy of the package that is not meant to be modified. Gets or sets the location where files will be extracted to/updated from. Also the location where a temporary folder is created during some operations. Gets the list of file keys that have the specified long file name. File name to search for (case-insensitive) Array of file keys, or a 0-length array if none are found Gets the list of file keys whose long file names match a specified regular-expression search pattern. Regular expression search pattern Array of file keys, or a 0-length array if none are found Extracts all files to the . The files are extracted to the relative directory matching their . If any files have the uncompressed attribute, they will be copied from the . Extracts a specified list of files to the . The files are extracted to the relative directory matching their . List of file key strings to extract If any files have the uncompressed attribute, they will be copied from the . Provides a key (filename) / value (full path) pair where the Binary files can be worked with The path to search for files in. This is NOT recursive. The explicit names to search for. All will be returned if nothing specified. A of the filename/fullpath key value pairs of the directory given. Updates the install package with new files from the . The files must be in the relative directory matching their . This method re-compresses and packages the files if necessary, and also updates the following data: File.FileSize, File.Version, File.Language, MsiFileHash.HashPart* The cabinet compression level used during re-cabbing can be configured with the property. Updates the install package with new files from the . The files must be in the relative directory matching their . This method re-compresses and packages the files if necessary, and also updates the following data: File.FileSize, File.Version, File.Language, MsiFileHash.HashPart?. List of file key strings to update This method does not change the media structure of the package, so it may require extracting and re-compressing a large cabinet just to update one file.

The cabinet compression level used during re-cabbing can be configured with the property.

Consolidates a package by combining and re-compressing all files into a single internal or external cabinet. If an installation package was built from many merge modules, this method can somewhat decrease package size, complexity, and installation time.

This method will also convert a package with all or mostly uncompressed files into a package where all files are compressed.

If the package contains any not-yet-applied binary file patches (for example, a package generated by a call to ) then this method will apply the patches before compressing the updated files.

This method edits the database summary information and the File, Media and Patch tables as necessary to maintain a valid installation package.

The cabinet compression level used during re-cabbing can be configured with the property.

Clears the +R flag on the specified files in the directory of your choice. This base path is prepended to each item in the collection. A collection of filePaths. If the objects within override ToString to return a valid path relative to this method will work. Rebuilds the cached directory structure information accessed by the and properties. This should be done after modifying the File, Component, or Directory tables, or else the cached information may no longer be accurate. Gets a mapping from Directory keys to source/target paths. If the Directory table is modified, this mapping will be outdated until you call . Gets a mapping from File keys to source/target paths. If the File, Component, or Directory tables are modified, this mapping may be outdated until you call . Gets or sets the compression level used by and . If the Directory table is modified, this mapping will be outdated until you close and reopen the install package. Applies a patch package to the database, resulting in an installation package that has the patch built-in. The patch package to be applied Optional name of the specific transform to apply. This parameter is usually left null, which causes the patch to be searched for a transform that is valid to apply to this database. If the patch contains any binary file patches, they will not immediately be applied to the target files, though they will at installation time.

After calling this method you can use to apply the file patches immediately and also discard any outdated files from the package.

Accessor for getting and setting properties of the InstallPackage database. Accessor for getting and setting properties of the database. Gets or sets a property in the database. When getting a property that does not exist in the database, an empty string is returned. To remove a property from the database, set it to an empty string. This has the same results as direct SQL queries on the Property table; it's only meant to be a more convenient way of access. Represents the installation path of a file or directory from an installer product database. Creates a new InstallPath, specifying a filename. The name of the file or directory. Not a full path. Creates a new InstallPath, parsing out either the short or long filename. The name of the file or directory, in short|long syntax for a filename or targetshort|targetlong:sourceshort|sourcelong syntax for a directory. true to parse the short part of the combined filename; false to parse the long part Gets the path of the parent directory. Gets the set of child paths if this InstallPath object represents a a directory. Gets or sets the source name of the InstallPath. Gets or sets the target name of the install path. Gets the full source path. Gets the full target path. Gets the full source path. Represents a collection of InstallPaths that are the child paths of the same parent directory. Gets or sets the element at the specified index. Adds a new child path to the collection. The InstallPath to add. Removes a child path to the collection. The InstallPath to remove. Gets the index of a child path in the collection. The InstallPath to search for. The index of the item, or -1 if not found. Inserts a child path into the collection. The insertion index. The InstallPath to insert. Tests if the collection contains a child path. The InstallPath to search for. true if the item is found; false otherwise Copies the collection into an array. The array to copy into. The starting index in the destination array. Removes an item from the collection. The index of the item to remove. Removes all items from the collection. Gets the number of items in the collection. Gets an enumerator over all items in the collection. An enumerator for the collection. Represents a mapping of install paths for all directories, components, or files in an installation database. Builds a mapping from File keys to installation paths. Installation database. Component mapping returned by . true to use short file names; false to use long names An InstallPathMap with the described mapping. Builds a mapping from Component keys to installation paths. Installation database. Directory mapping returned by . An InstallPathMap with the described mapping. Builds a mapping from Directory keys to installation paths. Installation database. true to use short directory names; false to use long names An InstallPathMap with the described mapping. Builds a mapping of Directory keys to directory paths, specifying root directories for the source and target paths. Database containing the Directory table. true to use short directory names; false to use long names The root directory path of all source paths, or null to leave them relative. The root directory path of all source paths, or null to leave them relative. An InstallPathMap with the described mapping. Creates a new empty InstallPathMap. Gets a mapping from keys to source paths. Gets a mapping from keys to target paths. Gets or sets an install path for a direcotry, component, or file key. Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. Changing an install path does not modify the Database used to generate this InstallPathMap. Gets the collection of keys in the InstallPathMap. Depending on the type of InstallPathMap, they are all directory, component, or file key strings. Gets the collection of InstallPath values in the InstallPathMap. Sets an install path for a direcotry, component, or file key. Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. The install path of the key item. Changing an install path does not modify the Database used to generate this InstallPathMap. Removes an install path from the map. Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. true if the item was removed, false if it did not exist Changing an install path does not modify the Database used to generate this InstallPathMap. Tests whether a direcotry, component, or file key exists in the map. Depending on the type of InstallPathMap, this is the primary key from the either the Directory, Component, or File table. true if the key is found; false otherwise Attempts to get a value from the dictionary. The key to lookup. Receives the value, or null if they key was not found. True if the value was found, else false. Removes all entries from the dictionary. Gets the number of entries in the dictionary. Gets an enumerator over all entries in the dictionary. An enumerator for the dictionary. Provides access to convenient properties and operations on a patch package (.MSP). Creates a new patch package object; opening the patch database in read-only mode. Path to the patch package (.MSP) The PatchPackage object only opens the patch database in read-only mode, because transforms (sub-storages) cannot be read if the database is open in read-write mode. Handle this event to receive status messages when operations are performed on the patch package. patchPackage.Message += new InstallPackageMessageHandler(Console.WriteLine); Sends a message to the event-handler. Message string, containing 0 or more format items Items to be formatted Gets the patch code (GUID) of the patch package. The patch code is stored in the RevisionNumber field of the patch summary information. Gets the list of patch codes that are replaced by this patch package. Array of replaced patch codes (GUIDs) The list of replaced patch codes is stored in the RevisionNumber field of the patch summary information. Gets the list of product codes of products targeted by this patch package. Array of product codes (GUIDs) The list of target product codes is stored in the Template field of the patch summary information. Gets the names of the transforms included in the patch package. Array of transform names The returned list does not include the "patch special transforms" that are prefixed with "#"

The list of transform names is stored in the LastSavedBy field of the patch summary information.

Gets the names of the transforms included in the patch package. Specifies whether to include the "patch special transforms" that are prefixed with "#" Array of transform names The list of transform names is stored in the LastSavedBy field of the patch summary information. Gets information about the transforms included in the patch package. Array containing information about each transform The returned info does not include the "patch special transforms" that are prefixed with "#" Gets information about the transforms included in the patch package. Specifies whether to include the "patch special transforms" that are prefixed with "#" Array containing information about each transform Gets information about a transforms included in the patch package. Name of the transform to extract; this may optionally be a special transform prefixed by "#" Information about the transform Analyzes the transforms included in the patch package to find the ones that are applicable to an install package. The install package to validate the transforms against Array of valid transform names The returned list does not include the "patch special transforms" that are prefixed with "#" If a transform is valid, then its corresponding special transform is assumed to be valid as well. Extracts a transform (.MST) from a patch package. Name of the transform to extract; this may optionally be a special transform prefixed by "#" Location where the transform will be extracted Contains properties of a transform package (.MST). Reads transform information from a transform package. Path to a transform package (.MST file). Reads transform information from the summary information of a transform package. Filename of the transform (optional). Handle to the summary information of a transform package (.MST file). Gets the filename of the transform. Gets the target product code of the transform. Gets the target product version of the transform. Gets the upgrade product code of the transform. Gets the upgrade product version of the transform. Gets the upgrade code of the transform. Gets the target platform of the transform. Gets the target language of the transform, or 0 if the transform is language-neutral. Gets the validation flags specified when the transform was generated. Returns the name of the transform. Distribution specific strings. News URL for the distribution. Short product name for the distribution. Support URL for the distribution. Telemetry URL format for the distribution. VS Extensions Landing page Url for the distribution.