Adding a Custom CustomUserAccounts Table

Windows Installer

Adding a Custom CustomUserAccounts Table

A specification of the sample is that user account information be read from a custom table in the installation database and not hard-coded into the custom action.

Add a custom table to the sample installation database named CustomUserAccounts to hold user account information. See Examples of Database Queries Using SQL and Script for an example of how to add a custom table. Use the following schema for the CustomUserAccounts table. See Column Definition Format for an explanation of the column types.

Column Type Key Nullable Description
UserName s72 Y N Name of user account being created.
Password s72 N Name of property containing the password for the account. This is a public property set on the command line or through an edit control in the user interface. This edit control should have the Password Control Attribute.
Attributes i4 Y Attributes for account. These are defined as the DWORD values for the usri1_flags member of the USER_INFO_1 structure.

 

After the CustomUserAccounts table has been added to the database you may edit this table using Orca, a table editor provided with the Windows Installer SDK, or another editor. Enter the following record in the CustomUserAccounts table to create a password secured user account for a user called TestUser. Note that 512 is the numeric value for UF_NORMAL_ACCOUNT.

CustomUserAccounts Table

UserName Password Attributes
TestUser TESTUSERPASSWORD 512

 


Add the following records to the _Validation table for the custom table.

_Validation Table

Table Column Nullable MinValue MaxValue KeyTable KeyColumn Category Set Description
CustomUserAccounts UserName N Text
CustomUserAccounts Password N Identifier
CustomUserAccounts Attributes Y 0 2147483647 null

 


Continue to Authoring the ActionText and Error Tables.


Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.