Back to Geneos FAQ

How to add a confirmation prompt for user configured commands

Users can configure commands to help carrying out routine operational scripts and procedures. This article provides an example such that the Active Console displays a confirmation dialog before the actual command is executed.

Users can make use of the userInput option to prompt for additional command details. We have created an example for a command to run on the Active Console. The input parameter is assigned as a boolean (true or false) variable, and it is checked before the actual command is executed.

User Command Args

Run day end report job window

The XML configuration for the Geneos command with confirmation test:

<command name="Geneos command with confirmation test">
	<targets>
		<target>/geneos/gateway/directory/probe/managedEntity</target>
	</targets>
	<userCommand>
		<type>script</type>
		<runLocation>client</runLocation>
		<args>
			<arg>
				<static>cmd.exe</static>
			</arg>
			<arg>
				<static>/c</static>
			</arg>
			<arg>
				<static>&quot;if true==</static>
			</arg>
			<arg>
				<concatenate>true</concatenate>
				<userInput>
					<description>Select checkbox to confirm</description>
					<boolean>false</boolean>
				</userInput>
			</arg>
			<arg>
				<concatenate>true</concatenate>
				<static> dir c:\temp&quot;</static>
			</arg>
		</args>
	</userCommand>
</command>
["Geneos"] ["Geneos > Gateway"] ["FAQ"]

Was this topic helpful?