COM 
 
Site navigation



Démo Télécharger Fonctionnalités Ecrans Support Témoignages

Previous Topic

Next Topic

Book Contents

Manage Services - Script

When one of the submit buttons, Start, Restart or Stop is pressed, the script of the Manage Services project is executed as part of the submit button script action execution sequence.

The script uses the following variables:

Variable

Description

%ServiceName%

The name of the service that is selected by the end-user in the form. When the user selects no service, the variable is empty. Otherwise, the value of the variable corresponds with the 3rd column with zero width of the table shown in the form.

%ServiceCommand%

The value of the variable corresponds with the button pressed by the end-user. The value is set as an action when the button is pressed. For each button, the value is different. This button is executed, before the script of the project is executed.

%ComputerName%

The name of the computer that maintains the service. The variable is passed from the other project Collect Services. In a more realistic environment, the variable could be generated or selected in a window of a sequence of wizard windows.

The script first performs some input checking control and then jumps to the correct label and executes the requested action.

The action checks if the script input variable %ServiceName% is empty or does not exist. If this is the case, the end-user did not select a service from the list with services in the form, when one of the buttons was pressed.

When the variable %ServiceName% does not hold a valid value, the script execution proceeds with the action with label Ready.

Next, the script jumps to the section that corresponds with the button pressed.

Note that the variable %ServiceCommand% is set as an action when one of the submit buttons is pressed. The value of the variable corresponds with the button: START, RESTART of STOP. In the script, exactly these values are used as labels. The Go to label %ServiceCommand% simply continues script action execution at one of the labels.

The Execute service command actions are simple to configure. For each of the actions, the Computer property is set to the variable %ComputerName% that is passed from project Collect Services.

The %ServiceName% variable is the result from the form. The Start service, Stop service and Restart service properties are configure according to the desired service action.

The Execute service command action are followed by a Go to label 'Ready' action to continue script execution at the right location.

Finally, the value of variable %ServiceName% is cleared to reset the input for the next form execution cycle.

Note that when the script is executed, the next action of the form submit button action sequence is executed: Return the form of the current project.

See Also

Step 3: Form project - Manage Services

Manage Services - Form

Manage Services - Adding form fields

Manage Services - Form table

Manage Services - Form buttons

Manage Services - Link to project Collect Services


Home | Products | Support | Pricing | Download | Press | About Us | Contact | Sitemap
QUICK LINKS: Mass / Bulk Import Software | Network Monitoring Software | Disk Quota Management
QUICK LINKS: User and Active Directory Management | Active Directory Migration | SSRPM Documentation