Solved

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

Posted on 2013-01-04
1
733 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
Comment Utility
0

Featured Post

Why do Marketing keep bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now