 | TaskSchedulerSnapshotCreate Method (TaskServiceConnectionToken, String, CancellationToken, IProgressTupleInt32, String) |
Creates a compressed zip file that contains all the information accessible to the user from the
TaskService instance necessary to
reconstitute its tasks and folders.
Caution |
---|
This method will execute without error even if the user does not have permissions to see all
tasks and folders. It is imperative that the developer ensures that the user has Administrator or equivalent rights before calling this method. |
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic static Task<TaskSchedulerSnapshot> Create(
TaskServiceConnectionToken tsToken,
string path,
CancellationToken cancelToken,
IProgress<Tuple<int, string>> progress
)
Public Shared Function Create (
tsToken As TaskServiceConnectionToken,
path As String,
cancelToken As CancellationToken,
progress As IProgress(Of Tuple(Of Integer, String))
) As Task(Of TaskSchedulerSnapshot)
public:
static Task<TaskSchedulerSnapshot^>^ Create(
TaskServiceConnectionToken tsToken,
String^ path,
CancellationToken cancelToken,
IProgress<Tuple<int, String^>^>^ progress
)
Request Example
View SourceParameters
- tsToken
- Type: Microsoft.Win32.TaskSchedulerTaskServiceConnectionToken
The TaskServiceConnectionToken from which to pull the tasks and folders. - path
- Type: SystemString
The output zip file in which to place the snapshot information. - cancelToken
- Type: System.ThreadingCancellationToken
A cancellation token to use to cancel this asynchronous operation. - progress
- Type: SystemIProgressTupleInt32, String
An optional IProgressT instance to use to report progress of the asynchronous operation.
Return Value
Type:
TaskTaskSchedulerSnapshotAn asynchronous
TaskSchedulerSnapshot instance with the contents of the specified Task Scheduler connection.
See Also