Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-01-04
1
Medium Priority
?
973 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 200 total points
ID: 38777257
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

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
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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 …
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…

636 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