<?xml version="1.0" encoding="UTF-8"?>
<!--
- Licensed Materials - Property of IBM Corp.
- IBM UrbanCode Build
- IBM UrbanCode Deploy
- IBM UrbanCode Release
- IBM AnthillPro
- (c) Copyright IBM Corporation 2002, 2016. All Rights Reserved.
-
- U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by
- GSA ADP Schedule Contract with IBM Corp.
-->
<plugin xmlns="http://www.urbancode.com/PluginXMLSchema_v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <header>
    <identifier id="com.urbancode.plugin.WindowsSystemTools" version="23" name="Windows System Tools"/>
    <description>The WindowsSystemTools Plugin automates various Windows system tasks.</description>
    <tag>System Utility/Windows/WindowsSystemTools</tag>
  </header>
  <step-type name="Modify ACLs">
    <description>Assign ACLs to files or folders.</description>
    <properties>
      <property name="directoryOffset" required="true">
        <property-ui type="textBox"
                     description="The working directory to use when executing this command. This is relative to current working directory."
                     label="Directory Offset"
                     default-value="."/>
      </property>
      <property name="caclsPath">
        <property-ui type="textBox" label="CACLS Path"
                       description="The path to the (X)CACLS executable. For example: C:\Windows\System32"/>
      </property>
      <property name="caclsType" required ="true">
        <property-ui type="selectBox"
                     label="CACLS Type"
                     description="Select whether to use cacls, xcacls, or icacls to modify permissions"/>
        <value label="CACLS">cacls</value>
        <value label="ICACLS">icacls</value>
        <value label="XCACLS">xcacls</value>
      </property>
      <property name="includeSubfolders">
        <property-ui type="checkBox"
                     label="Include subdirectories"
                     description="Check this option to change ACLs of specified files in the current directory and all subdirectories. Adds /T option."/>
      </property>
      <property name="editInstead">
        <property-ui type="checkBox"
                     label="Edit ACLs instead of replacing"
                     description="Check this option to edit ACL instead of replacing it. Adds /E option. This option cannot be used with ICACLS"/>
      </property>
      <property name="ignoreAccessDenied">
        <property-ui type="checkBox"
                     label="Continue on access denied errors"
                     description="Check this option to continue on access denied errors. Adds /C option."/>
      </property>
      <property name="grantRights">
        <property-ui type="textAreaBox"
                     label="Grant User Access Rights"
                     description="A list of new line separated permissions in the form of user:perm;spec where
                                   perm can be: R Read
                                                C Change (write)
                                                F Full control
                                                P Change Permissions (Special access)
                                                O Take Ownership (Special access)
                                                X EXecute (Special access)
                                                E REad (Special access)
                                                W Write (Special access)
                                                D Delete (Special access)."/>
      </property>
      <property name="revokeUser">
        <property-ui type="textBox"
                     label="Revoke user's rights"
                     description="Revoke specified user's access rights (only valid with 'Edit ACLs instead of replacing' option unless using ICACLS). Uses /R option."/>
      </property>
      <property name="replaceUserRights">
        <property-ui type="textAreaBox"
                     label="Replace User's Access Rights"
                     description="A list of new line separated permissions in the form of user:perm where
                                   perm can be: N None
                                                R Read
                                                C Change (write)
                                                F Full control."/>
      </property>
      <property name="denyUser">
        <property-ui type="textBox"
                     label="Deny user accesss"
                     description="Deny specified user access. Uses /D option (/deny in ICACLS). If using XCACLS or CACLS, specify the user. With ICACLS, this denies specified rights to the user, requiring an input of the form, user:perm"/>
      </property>
      <property name="noVerify">
        <property-ui type="checkBox"
                     label="Replace without verify"
                     description="Replace user's rights without verify. Adds /Y option. Only valid with 'Use XCACLS' option."/>
      </property>
      <property name="files" required="true">
        <property-ui type="textAreaBox"
                     label="File filter"
                     default-value="."
                     description="A file filter to limit the files/folders to modify."/>
      </property>
    </properties>
    <post-processing>
      <![CDATA[
        if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]>
    </post-processing>

    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="modifyACLs.groovy"/>
      <arg file="${PLUGIN_INPUT_PROPS}"/>
      <arg file="${PLUGIN_OUTPUT_PROPS}"/>
    </command>
  </step-type>
  <step-type name="Log off Notification">
    <description>Sends a message warning to logged on users to log off</description>
    <properties>
      <property name="message" required="true">
        <property-ui type="textBox" label="Message Text" description="Specify the message that will be displayed to users logged on to the server" />
      </property>
      <property name="serverVersion" required="true">
        <property-ui type="selectBox" label="Windows Server Version" description="Select the server version the plugin will run on" />
          <value label="2003">2003</value>
          <value label="2008">2008</value>
      </property>
      <property name="retry" required="true">
        <property-ui type="textBox" label="Number of Times to Retry" description="This determines the amount times the plugin willcheck for logged on users before failing the deploy" />
      </property>
      <property name="waitInSec" required="true">
        <property-ui type="textBox" label="Wait Time Between Retries(Seconds)" description="This specifies the amout of time to wait between retries" />
      </property>
      <property name="server">
        <property-ui type="textBox" label="Server to Query" description="This specifies the server to query active sessions" />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="sendLogOffMsg.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Reboot">
    <description>Reboot the os</description>
    <properties>
      <property name="time" required="true">
        <property-ui type="textBox" label="Time" description="The time in seconds to wait to reboot." />
      </property>
      <property name="agentServiceName" required="false">
        <property-ui type="textBox" label="Agent Service Name" description="If Windows machine restarts but the step is failing, enter the Agent Service Name here." hidden="true"/>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/air-plugin-command.jar:lib/CommonsUtil.jar:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar" />
      <arg file="reboot.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Check File Contents">
    <description>Check file contents against a regular expression.</description>
    <properties>
      <property name="directoryOffset">
        <property-ui type="textBox"
                     description="The working directory to use when executing this command. This is relative to current working directory."
                     label="Directory Offset"/>
      </property>
      <property name="fileName" required="true">
        <property-ui type="textBox"
                     label="File to scan"
                     description="The name of the file to scan."/>
      </property>
      <property name="regex" required="true">
        <property-ui type="textBox"
                     label="Regular Expression"
                     description="The regular expression used to scan the file contents."/>
      </property>
      <property name="failOnFound">
        <property-ui type="checkBox"
                     label="Fail if a match was found"
                     description="Check this option to fail the step if a match was found. Default is to fail if a match is not found."/>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="checkFileContents.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Add Or Overwrite Registry Key">
    <description>Adds or Overwrites a Key to the Registry</description>
    <properties>
      <property name="regKey" required="true">
        <property-ui type="textBox" label="Registry Key" description="Specify the Registry Key (ie HKLM\Software\MyCo)" />
      </property>
      <property name="regType" required="true">
        <property-ui type="selectBox" label="Registry Value Type" description="Select the data type for the Registry Value Name." />
          <value label="REG_SZ">REG_SZ</value>
          <value label="REG_MULTI_SZ">REG_MULTI_SZ</value>
          <value label="REG_BINARY">REG_BINARY</value>
          <value label="REG_DWORD_BIG_ENDIAN">REG_DWORD_BIG_ENDIAN</value>
          <value label="REG_DWORD">REG_DWORD</value>
          <value label="REG_DWORD_LITTLE_ENDIAN">REG_DWORD_LITTLE_ENDIAN</value>
          <value label="REG_NONE">REG_NONE</value>
          <value label="REG_EXPAND_SZ">REG_EXPAND_SZ</value>
      </property>
      <property name="regName" required="true">
        <property-ui type="textBox" label="Registry Value Name" description="Specify the Registry Value Name" />
      </property>
      <property name="regData" required="true">
        <property-ui type="textBox" label="Registry Value Data" description="Specifies the Registry Value Data" />
      </property>
      <property name="force">
        <property-ui type="checkBox" label="Force Registry Overwrite " description="This will overwrite the existing registry key" />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="registryKey.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>

  <step-type name="Export Registry Subkey to File">
    <description>Exports registry subkey to a file</description>
    <properties>
      <property name="regKey" required="true">
        <property-ui type="textBox" label="Registry Key" description="Specify the Registry Key to export (ie HKLM\Software\MyCo)" />
      </property>
      <property name="destPath" required="true">
        <property-ui type="textBox" label="Destination File" description="Destination file for export (i.e. example.reg, c:/path/to/example.reg)"/>
      </property>
      <property name="force">
        <property-ui type="checkBox" label="Force File Overwrite " description="When enabled, this step will overwrite the destination file if it exists" />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="registryExport.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Import Registry Files">
    <description>Imports a file containg registry keys</description>
    <properties>
      <property name="sourceDir" required="true">
        <property-ui type="textBox" label="Source Directory" default-value="." description="Specify the Source Directory" />
      </property>
      <property name="includes" required="true">
        <property-ui
            type="textAreaBox"
            label="Include Files"
            default-value="**/*.reg"
            description="Enter a new line separated set of file filters to import intothe registry."/>
      </property>
      <property name="excludes">
        <property-ui
            type="textAreaBox"
            label="Exclude Files"
            description="Enter a new line separated set of file filters for the files to exclude from the execution."/>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="registryFile.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Configure DCOM Settings">
    <description>Configure DCOM Settings</description>
    <properties>
       <property name="enableRemote">
        <property-ui type="checkBox" label="Enable Remote DCOM" description="This will Enable Remote DCOM " />
      </property>
      <property name="authLevel" required="true">
        <property-ui type="selectBox" label="Authentication Level" description="Select the DCOM Authentication Level" />
          <value label="None">1</value>
          <value label="Connect">2</value>
          <value label="Call">3</value>
          <value label="Packet">4</value>
          <value label="Packet Integrity">5</value>
          <value label="Packet Privacy">6</value>
      </property>
      <property name="impersonLevel" required="true">
        <property-ui type="selectBox" label="Impersonation Level" description="Select the DCOM Impersonation Level" />
          <value label="Anonymous">1</value>
          <value label="Identify">2</value>
          <value label="Impersonate">3</value>
          <value label="Delegate">4</value>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="dcomConfig.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Create Message Queues">
    <description>Create Message Queues</description>
    <properties>
      <property name="queues">
        <property-ui type="textAreaBox"
                     label="Non-Transactional Queues"
                     description="A new line separated list of non-transactional message queues to create.
                                  Ex: .\newQueue1 or .\Private$\newPrivateQueue1"/>
      </property>
      <property name="transQueues">
        <property-ui type="textAreaBox"
                     label="Transactional Queues"
                     description="A new line separated list of transactional message queues to create.
                                  Ex: .\newQueue1 or .\Private$\newPrivateQueue1"/>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="create_message_queues.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Enable Windows Features">
    <description>Enable specific Windows Features. This only works with Windows 7 family of Windows.</description>
    <properties>
      <property name="directoryOffset">
        <property-ui type="textBox"
                     label="Directory Offset"
                     description="Specify a sub-directory of the current working directory where you want the
                     command to execute" />
      </property>
      <property name="commandPath">
        <property-ui type="textBox"
                     label="Dism executable location"
                     description="The path including the dism executable unless on the path." />
      </property>
      <property name="features" required="true">
        <property-ui type="textAreaBox"
                     label="Features"
                     description="A comma and/or new-line separated list of features to enable. Do not include
                                 /featurename:" />
      </property>
      <property name="options">
        <property-ui type="textAreaBox"
                     label="Additional Options"
                     description="A comma and/or new-line separated list of additional options to be supplied to
                                  the dism command." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="enable_windows_features.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Disable Windows Features">
    <description>Disable specific Windows Features. This only works with Windows 7 family of Windows.</description>
    <properties>
      <property name="directoryOffset">
        <property-ui type="textBox"
                     label="Directory Offset"
                     description="Specify a sub-directory of the current working directory where you want the
                     command to execute" />
      </property>
      <property name="commandPath">
        <property-ui type="textBox"
                     label="Dism executable location"
                     description="The path including the dism executable unless on the path." />
      </property>
      <property name="features" required="true">
        <property-ui type="textAreaBox"
                     label="Features"
                     description="A comma and/or new-line separated list of features to disable. Do not include
                                 /featurename:" />
      </property>
      <property name="options">
        <property-ui type="textAreaBox"
                     label="Additional Options"
                     description="A comma and/or new-line separated list of additional options to be supplied to
                                  the dism command." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="disable_windows_features.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Create Windows Event Log">
    <description>Creates a new event log and a new event source.</description>
    <properties>
      <property name="logName" required="true">
        <property-ui type="textBox"
                     label="Log Name"
                     description="The Name of the event log." />
      </property>
      <property name="source" required="true">
        <property-ui type="textBox"
                     label="Sources"
                     description="A comma separated list of the names of the event log sources, such as
                                  application programs that write to the event log." />
      </property>
      <property name="categoryResourceFile">
        <property-ui type="textBox"
                     label="Category Resource File"
                     description="Specifies the path to the file that contains category strings for the source events.
                                  This file is also known as the Category Message File." />
      </property>
      <property name="messageResourceFile">
        <property-ui type="textBox"
                     label="Message Resource File"
                     description="Specifies the path to the file that contains message formatting strings for the
                                  source events. This file is also known as the Event Message File." />
      </property>
      <property name="parameterResourceFile">
        <property-ui type="textBox"
                     label="Parameter Resource File"
                     description="Specifies the path to the file that contains strings used for parameter substitutions
                                  in event descriptions. This file is also known as the Parameter Message File." />
      </property>
      <property name="powershellExe">
        <property-ui type="textBox"
                     label="Powershell executable location"
                     description="The path including the powershell executable unless on the path." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="new_event_log.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Log off Sessions">
    <description>Logs off sessions on a server</description>
    <properties>
      <property name="sessionFilter">
        <property-ui
            type="textBox"
            label="Session name filter"
            description="Provide a regular expression if you want to filter the sessions affected by this step by name.
                        Leave blank for all sessions." />
      </property>
      <property name="sessionStateFilter">
        <property-ui
            type="textBox"
            label="Session state filter"
            default-value="(?i)Active"
            description="Provide a regular expression if you want to filter the sessions affected by this step by their
                        state. Leave blank for all session states." />
      </property>
      <property name="retry" required="true">
        <property-ui
            type="textBox"
            label="Number of Times to Retry"
            default-value="0"
            description="This determines the amount times the plugin will check for logged on users before forcing
                        sessions to log off. Set to 0 if you don't want to wait." />
      </property>
      <property name="waitInSec" required="true">
        <property-ui
            type="textBox"
            label="Wait Time Between Retries (seconds)"
            default-value="5"
            description="This specifies the amount of time to wait between retries." />
      </property>
      <property name="server">
        <property-ui
            type="textBox"
            label="Server to Query"
            description="This specifies the server to query for sessions." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="logOffSessions.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Create Windows Scheduled Task">
    <description>Creates a new scheduled task for Windows.</description>
    <properties>
      <property name="taskName" required="true">
        <property-ui type="textBox"
                     label="Task Name"
                     description="The Name of the scheduled task." />
      </property>
      <property name="taskRun" required="true">
        <property-ui type="textBox"
                     label="Executable Location"
                     description="The absolute path to the executable to be run for this task." />
      </property>
      <property name="scheduleType" required="true">
        <property-ui type="selectBox"
                     label="Schedule Type"
                     description="The type of the schedule to be created." />
        <value label="Minute">MINUTE</value>
        <value label="Hourly">HOURLY</value>
        <value label="Daily">DAILY</value>
        <value label="Weekly">WEEKLY</value>
        <value label="Monthly">MONTHLY</value>
        <value label="Once">ONCE</value>
        <value label="On Startup">ONSTART</value>
        <value label="On Logon">ONLOGON</value>
        <value label="On Idle">ONIDLE</value>
      </property>
      <property name="modifier" required="false">
        <property-ui type="textBox"
                     label="Type Modifier"
                     description="The modifier to invoke schtasks with. Please refer to your Operating System documentation for allowed values for the schedule type." />
      </property>
      <property name="day">
        <property-ui type="textBox"
                     label="Day"
                     description="Day of the week or month to run the task. The wildcard character (*) specifies all days. Allowed values are MON, TUE, WEB, THU, FRI, SAT, SUN and for monthly schedules 1-31."/>
      </property>
      <property name="month">
        <property-ui type="textBox"
                     label="Month"
                     description="Month for the schedule. The wildcard character (*) specifies all months."/>
      </property>
      <property name="idletime">
        <property-ui type="textBox"
                     label="Idle Time"
                     description="Amount of idle time to wait before running the scheduled for ONIDLE type. Valid values are 1 - 999 minutes. This value will be ignored for other schedule types."/>
      </property>
      <property name="starttime">
        <property-ui type="textBox"
                     label="Start Time(HH:mm)"
                     description="The start time to run the task. This value is required for Once schedule type."/>
      </property>
      <property name="duration">
        <property-ui type="textBox"
                     label="Duration(HH:mm)"
                     description="The duration to run the task. This value will be ignored for schedule types that it is invalid for."/>
      </property>
      <property name="startdate">
        <property-ui type="textBox"
                     label="Start Date(mm/dd/yyyy)"
                     description="The first date that this schedule should run on. This value will be ignored for schedule types that it is invalid for."/>
      </property>
      <property name="enddate">
        <property-ui type="textBox"
                     label="End Date(mm/dd/yyyy)"
                     description="The last date that this schedule should run on. This value will be ignored for schedule types that it is invalid for."/>
      </property>
      <property name="username">
        <property-ui type="textBox"
                     label="Username"
                     description="Value specifies the user under which the Schtasks Windows command will run as." hidden="true"/>
      </property>
      <property name="password">
        <property-ui type="secureBox"
                     label="Password"
                     description="Specifies the password for the Username. Required if a value for Username is given." hidden="true"/>
      </property>
      <property name="usernameRU">
        <property-ui type="textBox"
                     label="Task Username"
                     description="Value specifies the user under which the task will run as." hidden="true"/>
      </property>
      <property name="passwordRP">
        <property-ui type="secureBox"
                     label="Task Password"
                     description="Specifies the password for the Task Username. Required if a value for Task Username is given." hidden="true"/>
      </property>
      <property name="additionalArgs">
        <property-ui type="textAreaBox"
                     label="Additional Arguments"
                     description="List additional command line arguments. Delimit the argument sets by commas or new lines and separate argument and value pairs by spaces. For example: /U admin /P pass, /RU adminB /RP passB" hidden="true"/>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="create_sched.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Delete Scheduled Task">
    <description>Delete a scheduled task for Windows.</description>
    <properties>
      <property name="taskName" required="true">
        <property-ui type="textBox"
                     label="Task Name"
                     description="The Name of the scheduled task." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="delete_sched.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Run Scheduled Task">
    <description>Run a scheduled task.</description>
    <properties>
      <property name="taskName" required="true">
        <property-ui type="textBox"
                     label="Task Name"
                     description="The Name of the scheduled task." />
      </property>
      <property name="immed" required="true">
        <property-ui type="checkBox"
                     label="Immediately"
                     description="Check to run this task immediately." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="run_sched.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="End Scheduled Task">
    <description>End a scheduled task.</description>
    <properties>
      <property name="taskName" required="true">
        <property-ui type="textBox"
                     label="Task Name"
                     description="The Name of the scheduled task." />
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="end_sched.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
  <step-type name="Delete Registry Key">
    <description>Deletes a Key from the Registry</description>
    <properties>
      <property name="regKey" required="true">
        <property-ui type="textBox" label="Registry Key" description="Specify the Registry Key (ie HKLM\Software\MyCo)." />
      </property>
      <property name="regValue">
        <property-ui type="textBox" label="Registry Value" description="Specify a single value of a Registry key to delete."/>
      </property>
      <property name="failNotFound">
        <property-ui type="checkBox" label="Fail if not found" description="Check this box if you want the process to fail if the registry key isn't found."/>
      </property>
    </properties>
    <post-processing><![CDATA[
    if (properties.get("exitCode") != 0) {
            properties.put(new java.lang.String("Status"), new java.lang.String("Failure"));
        }
        else {
            properties.put("Status", "Success");
        }
     ]]></post-processing>
    <command program="${GROOVY_HOME}/bin/groovy">
      <arg value="-cp" />
      <arg path="classes:lib/securedata.jar:lib/jettison-1.1.jar:lib/commons-codec.jar:lib/CommonsUtil.jar" />
      <arg file="deleteKey.groovy" />
      <arg file="${PLUGIN_INPUT_PROPS}" />
      <arg file="${PLUGIN_OUTPUT_PROPS}" />
    </command>
  </step-type>
</plugin>
