Solved

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

Posted on 2013-01-04
1
846 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
[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
1 Comment
 
LVL 15

Accepted Solution

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

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual C# Windows Project - Clone Form 4 35
Adjust the codes 3 59
Load XML element 3 40
C# rename a class and update all references efficiently 6 47
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

740 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