Solved

Pass Argument into C# TaskScheduler dll without re-registering the Task

Posted on 2013-01-04
1
811 Views
Last Modified: 2014-11-07
I have this project that I need to basically retrieve a task (Bat) on a remote machine and Run it with some parameters passed into the Arguments of the ExecActions property.

So far I have
TaskSchedulerClass scheduler = new TaskSchedulerClass();
scheduler.Connect(MachineName, null, null, null);
ITaskFolder folder = scheduler.GetFolder("\\");
IRegisteredTask regTask = folder.GetTask(ScheduledTaskName);
regTask.Run(ScheduledTaskParameter);

Open in new window


Upon reading on MSDN I know that you can pass in ExecAction.Arguments as $(Arg0) into the .Run(). what is the correct syntax to pass in the parameter?
0
Comment
Question by:symphony-it
1 Comment
 
LVL 15

Accepted Solution

by:
Minh Võ Công earned 100 total points
ID: 38777257
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

830 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