ConnectionSettings method of the Win32_TSClientSetting class
The ConnectionSettings method sets the session settings that apply to the connection and logon process.
Syntax
uint32 ConnectionSettings(
[in] uint32 ConnectClientDrivesAtLogon,
[in] uint32 ConnectPrinterAtLogon,
[in] uint32 DefaultToClientPrinter
);
Parameters
-
ConnectClientDrivesAtLogon [in]
-
Flag enabling or disabling the ConnectClientDrivesAtLogon property which specifies whether the client's drives are automatically connected during the logon procedure.
-
0
-
The client's drives are not automatically connected.
-
1
-
The client's drives are automatically connected.
ConnectPrinterAtLogon [in]
Flag enabling or disabling the ConnectPrinterAtLogon property, which specifies whether all mapped local client printers are automatically connected during the logon procedure.
0
All mapped local printers are not automatically connected.
1
All mapped local printers are automatically connected.
DefaultToClientPrinter [in]
Flag enabling or disabling the DefaultToClientPrinter property which specifies whether print jobs are automatically sent to the client's local printer.
0
Print jobs are not automatically sent.
1
Print jobs are automatically sent.
Return value
Returns 0 on success, otherwise returns a WMI error code. Refer to Remote Desktop Services WMI Provider Error Codes for a list of these values. The method returns an error if the user's connection settings are overridden by the server.
Remarks
Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Microsoft Windows Software Development Kit (SDK). They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Namespace |
Root\CIMv2\TerminalServices |
MOF |
|
DLL |
|