This is what i have tried but i have a few question to ask
1) Where do we get the taskpath from ? The scheduler is running an application every 1 hour. Is the path equals to the path of the application ?
2)Can i get the last run time exactly like the one displayed in the windows task scheduler because i did not create a task dynamically using this library
string lastruntime;
using (TaskService ts = new TaskService())
{
1) Where do we get the taskpath from ? The scheduler is running an application every 1 hour. Is the path equals to the path of the application ?
2)Can i get the last run time exactly like the one displayed in the windows task scheduler because i did not create a task dynamically using this library
string lastruntime;
using (TaskService ts = new TaskService())
{
Microsoft.Win32.TaskScheduler.Task task = ts.GetTask(@"C:\Program Files (x86)\Google\Update\GoogleUpdate.exe");
if (task!= null)
{
lastruntime = task.LastRunTime.ToString();
}
}