|

LogonFlag


(number) The logon flag to use. Choose from:



CONSTANT


VALUE DESCRIPTION


LOGON_NO_OPTION


0


Do not logon with any profile. (Default)


LOGON_WITH_PROFILE


1


Log on, then load the user profile in the HKEY_USERS registry key. Loading the profile can be time-consuming, so it is best to use this value only if you must access the information in the



HKEY_CURRENT_USER registry key.


LOGON_NETCREDENTIALS_ONLY


2


Log on, but use the specified credentials on the network only. This value 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.


Note: The system does not validate the specified credentials. Therefore, the process can start, but it may not have access to network resources.


|