Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set task to run on system startup with cmd/schtasks

I am a bit confused on how to schedule a task to run on system startup as SYSTEM with schtasks command line and I have read MS's documentation on schtasks.exe. Can someone here help me.

like image 469
user2527738 Avatar asked Jul 03 '13 01:07

user2527738


2 Answers

The following command schedules the MyApp program to run every time the system starts, beginning on March 15, 2001: the date is optional.

schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc onstart /sd 03/15/2001
like image 62
Santanu Kumar Avatar answered Oct 01 '22 13:10

Santanu Kumar


Using /RU SYSTEM makes a task run as the system.

For additional info, see http://support.microsoft.com/kb/814596

like image 37
fpintos Avatar answered Oct 01 '22 12:10

fpintos