locked
How do I pass the Path property of a target as an arguement to Console Task ? RRS feed

  • Question

  • I have a console task which executes an EXE as shown in the code below. Here i want to pass the path property of a target monitoring object as an argument to the executable. I am not able to figure out how to specify the Path property for the monitoring target.

    Console task specification:
    ...............................

     <ConsoleTasks>
          <ConsoleTask ID="ShowWebPage" Accessibility="Internal" Enabled="true" Target="xx.Monitoring.Component" RequireOutput="false">
            <Assembly>Tasks.ShowWebPage</Assembly>
            <Handler>ShellHandler</Handler>
            <Parameters>
              <Argument Name="WorkingDirectory" />
              <Argument Name="Application">LaunchHelper.exe</Argument>
              <Argument>LaunchWeb</Argument>
              <Argument>$Target/Property[Type='xx.Monitoring.Component']/ManagerID$</Argument>
              <Argument>$Path$</Argument> - Here I Need to pass monitoring object's path
            </Parameters>
          </ConsoleTask>
          <ConsoleTasks/>

    ...........................

    I tried few options given in the links below. But couldn't make it working.

    http://msdn.microsoft.com/en-us/library/ee533748.aspx

    http://blogs.technet.com/b/kevinholman/archive/2007/12/12/adding-custom-information-to-alert-descriptions-and-notifications.aspx

    Variables that I tried:

    $Path$
    $Target/Property/Path$
    $Target/Property[Type='xx.Monitoring.Component']/Path$
    $Target/Path$

    Could you help me with the correct syntax?

    Thanks,
    satheesh

    Thursday, December 5, 2013 1:51 PM

All replies