Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7011007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:04:21+00:00 2026-05-27T22:04:21+00:00

How can I schedule a task using delphi 7 like Google updater? I’m not

  • 0

How can I schedule a task using delphi 7 like Google updater?
I’m not using the registry because it gets detected by Kaspersky antivirus as a false alarm.
Anything I add in the registry as a start-up item gets detected as a trojan so I decided to use task schedule

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:04:21+00:00Added an answer on May 27, 2026 at 10:04 pm

    The following piece of code shows how to delete and create the task which will run the application at system startup with system privileges. It uses the following command line:

    However the Task Scheduler since Windows Vista supports force creation of tasks, I wouldn’t use it for backward compatibility with Windows XP, where this flag doesn’t exist.
    So the example below tries to delete the task (if already exists) and then create the new one.

    It executes these commands:

    schtasks /delete /f /tn “myjob”
    schtasks /create /tn “myjob” /tr “C:\Application.exe” /sc ONSTART /ru “System”

    /delete – delete the task
    /f – suppress the confirmation
    /create – create task parameter
    /tn – unique name of the task
    /tr – file name of an executable file
    /sc – schedule type, ONSTART – run at startup
    /ru – run task under permissions of the specified user

    And here is the code:

    uses
      ShellAPI;
    
    procedure ScheduleRunAtStartup(const ATaskName: string; const AFileName: string;
      const AUserAccount: string);
    begin
      ShellExecute(0, nil, 'schtasks', PChar('/delete /f /tn "' + ATaskName + '"'),
        nil, SW_HIDE);
      ShellExecute(0, nil, 'schtasks', PChar('/create /tn "' + ATaskName + '" ' +
        '/tr "' + AFileName + '" /sc ONSTART /ru "' + AUserAccount + '"'),
        nil, SW_HIDE);
    end;
    
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      ScheduleRunAtStartup('myjob', 'C:\Application.exe', 'System');
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using java.util.Timer to schedule a periodic task. At one point, I'd like to
I'd like to start using the Task Parallel Library , as this is the
I have code where I schedule a task using java.util.Timer . I was looking
I want to know how to schedule a task using the command prompt. Now
i am using Windows and i need to schedule a php task in this.
I've started using the task queue to schedule a time-intensive task to run in
I am using springs task scheduler(ConcurrentTaskScheduler) to schedule my tasks. I am using the
I have some task which I want to schedule and I did not work
I want to write a windows service which the user can schedule. i.e, the
Our application needs a simple scheduling mechanism - we can schedule only one visit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.