473,289 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Add a new task with the task scheduler using C#

Is there a way to add a new task with the task scheduler using C#? For
instance, if you want to add a program to be run at boot time.
Sep 15 '06 #1
4 20185
Joachim wrote:
Is there a way to add a new task with the task scheduler using C#? For
instance, if you want to add a program to be run at boot time.
Look at this:

http://www.codeproject.com/csharp/TSNewLib.asp
Sep 15 '06 #2
The basic stuff can be done with the command line AT but not run on boot or
anything like that.
There is a Win Api for it. A discussion of using it is here:
http://www.tek-tips.com/viewthread.c...=356060&page=7

HTH

Ciaran O'Donnell
"Joachim" wrote:
Is there a way to add a new task with the task scheduler using C#? For
instance, if you want to add a program to be run at boot time.
Sep 15 '06 #3

"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:64**********************************@microsof t.com...
| Is there a way to add a new task with the task scheduler using C#? For
| instance, if you want to add a program to be run at boot time.

The easiest way is to issue a schtasks commandline utility command using
System.Diagnostics.Process.Start

Enter:
schtasks /create /?
from the command line for details and sample or search windows help for
schtasks.

Willy.

Sep 15 '06 #4

"Ciaran O''Donnell" <Ci************@discussions.microsoft.comwrote in
message news:B4**********************************@microsof t.com...
| The basic stuff can be done with the command line AT but not run on boot
or
| anything like that.
| There is a Win Api for it. A discussion of using it is here:
| http://www.tek-tips.com/viewthread.c...=356060&page=7
|

You should use schtasks which is a more powerfull superset of the AT
command.
schtasks can create a task that should run at system start (using the
ONSTART modifier).

Willy.
Sep 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
6
by: Tony Roost | last post by:
I have created a test VB.Net form that will use MS Word to check the spelling of text in an input box The test application runs without a problem and I quit the word application at the end of the...
0
by: Prasad Patil | last post by:
Hi dudes, I have a intranet site, I have a web based form, once the user fills the form, the data entered by the form should get created as a task for some of the predefined users. I need to know...
3
by: Pat | last post by:
A97, WinXP Hello, I am looking for a way to create a task (in the windows task scheduler) from an Access MDB using VBA. I found this great DLL: ...
1
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I'm trying to use the "ref" to return a value, see snippet below. I execute AddTask first, this executes FindTaskByID. The compiler gives me this error... (55): Argument '2': cannot...
4
by: Christina | last post by:
Dear All, How can I pop up the windows task scheduler inside of my .net application? Such as I have a button called Schedule Now, after clicking it, the Add Scheduled Task window will pop up,...
1
by: Myster Edd | last post by:
I have a strange problem that I think deals with security on SQL 2005. I have a scheduled task that runs on a Windows 2000 machine. It calls a vb script which creates a connection to SQL Server. ...
0
by: dhaval0011 | last post by:
Hi, Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. This topic has already been discussed in this forum, and also Mr....
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.