|
Home
Products Taskbar Manager SafeInput Developer Components
|
Developer Section Frequently Asked Questions: 1. Is it possible to use TaskScheduler Component in a program written in VC++? Ans. Yes. Please look at C++ sample code available in source code section below after the FAQ section. 2. How can I directly retrieve a Task object given its name? Ans. In Visual Basic, use following method: Dim objSchedulerDim objTask Dim name Set objTask = objScheduler.GetTask(name) 3. How can I set an Application name with parameters like "c:\myprogram.exe 10 20"? Ans. Task object has an ApplicationName property. You need to set this property to "c:\myprogram" like below. objTask.ApplicationName = "c:\myprogram.exe" For setting parameters, use Parameters property of Task object like objTask.Parameters = "10 20" After all properties have been set, objTask.SaveTask must be called for values to take effect. Also see documentation for more details. 4. What are the system requirements for using TaskScheduler Component?Ans: Windows NT/2000 or later: Requires Windows 2000 or
later (or Windows NT 4.0 with Internet Explorer 4.0 or later). Ans: All Objects expose ErrorCode property. Always check this property after the call. 6. How can I set Username of the account under which Task is supposed to run?Ans: Username property of Task object is read-only as such. However to modify it, you can use SetAccountInformation method to write new username and password. Note that this method call succeeds if Username/Password combination is valid. e.g. ObjTask.SetAccountInformation "DISNEY\Mickey", "Pluto" Here, Mickey is an account name on machine DISNEY and Pluto is its password. In some cases, where supplied username/password combination is actually not a valid one, the method call would return successfully. In such a case, SaveTask method call (used to commit changes to Task related changes) would fail. 7. Task won't run even Run method returns without error (Errorcode property is 0)?This could happen if the account information (Username/Password) was not set or was invalid. The Run method doesn't set any error code but returns successfully. Source Code: VB Source Code: Full source code available for DemoScheduler application with installation of the TaskScheduler component. Please see '\sample' subdirectory where component was installed. VC++ Sample Code: #include <stdio.h> |
Highlights Awards |
Copyright 2003. Askarya Technologies. All rights reserved.