![]() (In each of these tables, and in fact most tables related to data transfer, the action is tied to a component. The RemoveFile table is where you specify files that you want to remove during uninstallation (most common case), installation, or both. I’ll repeat the remark in the hope that it will help: Don’t use a custom action if a built-in table and action will do.įor example, my heart sinks every time I see someone using VBScript custom actions and the FileSystemObject to manipulate files, when three tables will handle many common cases: the RemoveFile table, the DuplicateFile table, and the MoveFile table. It has often been remarked that one should avoid using custom actions if a built-in table and action will do. Avoiding custom actions by using the -File tables For example, the DirProperty field of the RemoveFile table accepts a directory property such as AppDataFolder, and does not take brackets. While we’re on the subject, a field that uses the Identifier data type doesn’t need square brackets around it. (See the topic “Formatted” for other expressions that will get expanded, such as for environment variables and and ] for literal square-bracket characters.) On the other hand, the Name and Description fields of the Shortcut table use other data types (Filename and Text), and therefore don’t expand properties. The topic “Registry Table” indicates that the Name and Value fields use the Formatted data type, which means that property values contained in those fields will be expanded. You can tell the data type of a field by looking at the Windows Installer help library topic for the given table. Īs with all things property-related, capitalization (and spelling) matter. ![]() The doesn’t need to be the whole field for example, you can put the following in a registry value and the appropriate parts of the oddly phrased sentence will be expanded at run time: Installed to by from account at on. MSI database fields that use the Formatted data type can take expressions of the form, and the value will be expanded at run time. “How do I create a nested installation?”. ![]() Taking inventory of installed products, features, and components.Launching a batch file in a custom action.Avoiding custom actions by using the -File tables.Just to add to the good (and bad, and terrible) MSI writing already out there, here are some tiny notes and tips that might be useful or interesting or amusing to somebody, somewhere. MSI Tips and Notes - Robert Dickau Windows Installer (MSI) Tips and Notes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |