Delphi Quickly Enumerate Among Windows Task Schedulers With Flexible Component Suite

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
Quickly Enumerate Among Windows Task Schedulers With Flexible Component Suite
By Anbarasan March 16, 2021

Do you need to list down the Task Schedulers in your machine from your Delphi App programmatically? How to enumerate among the Task Schedulers quickly ? Don’t know how to do. Don’t worry. Для просмотра ссылки Войди или Зарегистрируйся System Information Management Suite’s helps to enumerate the Task Schedulers, we will learn how to use the MiTeC_TaskScheduler_TLB’s TTSTasks in this blog post.

Platforms: Windows.

Installation Steps:

You can easily install this Component Suite from GetIt Package Manager. The steps are as follows.
  1. Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select Components in Categories->Components->Trail -MiTec system Information Component Suite 14.3 and click Install Button.
  2. Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? click yes and continue.
  3. It will download the plugin and installs it. Once installed Click Restart now.
How to run the Demo app:
  • Navigate to the System Information Management Suite trails setup, Demos folder which is installed during Get It installation e.g) C:UsersDocumentsEmbarcaderoStudio21.0CatalogRepositoryMiTeC-14.3DemosDelphi23
  • Open the TS project in RAD studio 10.4.1 compile and Run the application.
  • This Demo App shows how to list down the task schedulers created in your machine, enumerate among them and access its properties.
Components used in MSIC TS Demo App:
  • TListView to show the Task schedulers properties.
Implementation Details:
  • A variable is created tslist of TTSTasks. Add list of Task schedulers to tslist using GetTaskList. Loop through the tslist count and add each task scheduler item to the list view. List down the properties such as Name, Path, Description, Author, Image, Version etc. of each Task Scheduler to list view item.
Код:
procedure TwndMain.FormCreate(Sender: TObject);
var
  i: Integer;
  tslist: TTSTasks;
begin
  GetTaskList(tslist);
  for i:=0 to High(tslist) do
    with List.Items.Add do begin
      Caption:=tslist[i].Path;
      tslist[i].
      SubItems.Add(tslist[i].ImagePath+' '+tslist[i].Args);
      SubItems.Add(tslist[i].Author);
    end;
end;
  • Display the Task Scheduler properties as shown below.
1615974222693.png
MiTeC Task Schedulers Demo

It’s that simple to enumerate Task Schedulers and list its properties for your application. Use this MiTeC component suite and get the job done quickly.