Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Windows 2000 Task Scheduler (HARD)

Posted on 2002-05-06
12
Medium Priority
?
300 Views
Last Modified: 2012-05-07
Hello,

Does anyone know how to access/add jobs with the Windows 2000 Task Scheduler ?

I need to be able to allocate a new task with a username and password to run at a specific time ?

I need the solution in Visual Basic. I have a solution in Delphi which uses CreateCoInstance and the ITaskScheduler interface....

Any help would be greatly appreciated.

I cannot use the API NetScheduleAdd/Del because it does
not allow me to specifiy a username and password.

I do not want to use the AT command as well.

Thanks in Advance.


0
Comment
Question by:perlita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
  • 2
  • +1
12 Comments
 
LVL 1

Expert Comment

by:delloro
ID: 6993192
<listening>
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6993283
If only they'd used an ini file?
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6993285
If nobody has the answer maybe you could post the code and we could translate into VB.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:krisjob
ID: 6994614
Why do you not want to use the AT command?
0
 

Author Comment

by:perlita
ID: 6995225
Because I want to do this programmatically.
and also I believe that the AT command cannot
set the task to run as a user.
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6995458
perlita, this would be a good one to get going. Only VB can be trusted to set up a backup schedule, if you leave the job to a human, without imagination, something terrible is going to happen.
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6995488
Routing arround in a few places I found some c++ examples so it would be possible to convert to VB.

Firts we need to convert the definitions, if you have the full VS6 installed search on your hard disk for: mstask.h

Now for some head scratching...

The task api is documented, (in greek) within the MSDN.

http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/taskschd/ts_itaskscheduler_9cfm.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/taskschd/ts_about_5js9.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/taskschd/ts_ienumworkitems_738z.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/taskschd/ts_glossary_6um1.asp

back later.....
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6995506
Looks like a Perl or something definition which is closer to VB than C++ defs.

http://www.orionis.com.mx/tallerdelphi/td06_4a.htm
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6995527
I have not found any converted VB declarations for the Task Scheduler so it will take a long time to do.

It would be quicker to create an ActiveX DLL wrapper in C++, sadley that to is going to take a lot of time, more than I have right now.....
0
 
LVL 1

Accepted Solution

by:
delloro earned 1200 total points
ID: 6995544
There is an example here which answers your question.

It is a Visual Basic Example of implementing the
task scheduler free and containing the source code.

http://www.domaindlx.com/e_morcillo/

(You will have to load some type libraries to run this)

It is very good code but not documented very well.

For some more documented active X control you can use:
Altec Data's Task Scheduler control which is very
similiar.

Good Luck.


0
 

Author Comment

by:perlita
ID: 6995550
Thanx.

The comment from Altec and Morcillo will be
enough for me.

0
 
LVL 17

Expert Comment

by:inthedark
ID: 6995943
Nice link delloro...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question