dahall wrote:When you create the ExecAction, you need to specify $(Arg0) for the Arguments value.
td.Actions.Add(new ExecAction("myprogram.exe", "$(Arg0)"));Then, you can call the Run method using the string value you wish to pass as a parameter.
task.Run("My parameter string to pass to myprogram.exe");
Hi Dashall,
Sorry for bothering again but when I did:
td.Actions.Add(new ExecAction("C:\test.bat", "$(Arg0)",null)); task.RootFolder.RegisterTaskDefinition(ScheduledTaskName, td); tasks.Run("hello");It is giving the xml containing too many nodes error. Any ideas?