Navigation:  Object Model Reference > Builder Object >

SyncBuildEx Method

Previous pageReturn to chapter overviewNext page

Performs a synchronous build with logon credentials, waiting for the build to complete before returning.

 

Syntax

 

builder.SyncBuildEx(ByVal flowThreadIdentity As Boolean = False, ByVal processIdentityUserName = "", ByVal processIdentityDomain = "", ByVal processIdentityPassword = "", ByVal logonNetCredentialsOnly As Boolean = True useInteractiveWinStaDesktop As Boolean = True) As BuildCompletionStatus

 

Arguments

 

builder

       Builder object

 

flowThreadIdentity

       Whether to use the impersonated identity of the calling thread for the build thread.  If False, the default identity of the process will be used for the build thread.

 

processIdentityUserName

       The user account name for an logon identity to use for any process started by build actions or script that call RunProgram/Ex or a Run Program or derived action.  This is the name of the user account to log on to. If you use the UPN format, user@DNS_domain_name, the domain field must be blank.  The user account must have the Log On Locally permission on the local computer. This permission is granted to all users on workstations and servers, but only to administrators on domain controllers.  If specified, the process will be created with the specified credentials.  If blank, the process will be created using the default identify of the calling process.

 

       Note: When specifying user credentials, processes started by the build will inherit the environment block of the calling process.

 

processIdentityDomain

       The name of the domain or server whose account database contains the user account specified in processIdentityUserName.  Can be blank or . for the current domain.

 

processIdentityPassword

       The password of the user account for a logon identity to use for any processes started by the build.

 

logonNetCredentialsOnly

       Applies only if credentials are specified in the previous parameters.  If True, processes created by the build will use the specified credentials on the network only. The new process uses the same token as the caller, but the system creates a new logon session within LSA, and the process uses the specified credentials as the default credentials. This can be used to create a process that uses a different set of credentials locally than it does remotely. This is useful in inter-domain scenarios where there is no trust relationship.  The system does not validate the specified credentials. Therefore, the process can start, but it may not have access to network resources.  If False, new processes will load the specified user's profile in the HKEY_USERS registry key unless the UseProfileOptionWithSyncBuildEx option is set to False (in this case, an option value of 0 will be specified when creating processes).  Loading the profile can be time-consuming, so it is best to pass False only if the process must access the information in the HKEY_CURRENT_USER registry key.

 

useInteractiveWinStaDesktop

       Applies only if credentials are specified in the previous parameters.  If False, new processes created by the build will inherit the desktop and window station of the calling process (permission for the specified user account to the inherited window station and desktop are added automatically). If True, the interactive windowstation and desktop will be used by processes created by the build.

 

       Note: Permissions for the specified user account are not automatically added to the interactive window station and desktop when True is passed, and GUI applications will not have full access to draw properly unless the necessary permissions are assigned manually (see here for more details).

 

Return value

       The result of the build.

 

See Also

 

Applies to Builder object