Designing Custom Taskpads for the MMC

When you want to simplify administration or limit the available tasks for junior administrators or Power Users, you might want to consider adding a taskpad to a console tool. By using taskpads, you can create custom views of your console tools that contain shortcuts to menu commands, shell commands, and navigation components.

Getting Started with Taskpads

Basically, taskpads let you create a page of tasks that you can perform quickly by clicking the associated shortcut links rather than using the existing menu or interface provided by snapins. You can create multiple taskpads in a console, each of which is accessed as a taskpad view. If you've worked with Windows XP, you've probably seen the Simple Control Panel, which is a taskpad view of the Control Panel. As with most taskpads, the Simple Control Panel has two purposes: It provides direct access to the commands or tasks so that you don't have to navigate menus, and it limits your options to a set of predefined tasks that you can perform.

You create taskpads when you are working with a console tool in author mode. Taskpads can contain the following items:

  • Menu commands Menu commands are used to run the standard menu options of included snap-ins.

  • Shell commands Shell commands are used to run scripts or programs or to open Web pages.

  • Navigation components Navigation components are used to navigate to a saved view on the Favorites menu.

Taskpad commands are also called tasks. You run tasks simply by clicking their link. In the case of menu commands, clicking the link runs the menu command. For shell commands, clicking the link runs the associated script or program. For navigation components, clicking the link displays the designated navigation view. If you have multiple levels of taskpads, you must include navigation components to allow users to get back to the top-level taskpad. The concept is similar to having to create a home link on Web pages.

Figure 11-10 shows a taskpad created for the Active Directory Users and Computers snap-in that has been added to the custom tool created earlier in the chapter.

A custom console with taskpad that uses a vertical list

Figure 11-10. A custom console with taskpad that uses a vertical list

As you can see, the task page view is labeled AD Management, and it provides the following commands:

  • Find Objects Used to open the Find Users, Contacts, And Groups dialog box

  • Create Computer Used to start the New Object—Computer Wizard

  • Create Group Used to start the New Object—Group Wizard

  • Create User Used to start the New Object—User Wizard

  • Connect To Domain Used to select the domain to work with

  • Connect To Domain Forest Used to select the domain forest to work with

  • Create Advanced Query Used to define an Active Directory query and save it so that it can be reused

Note

We haven't used the taskpad to limit the options; rather, we've simply provided quick access shortcuts to commonly run tasks. In the next section, you'll learn how to limit user options.

Understanding Taskpad View Styles

Taskpads can be organized in several different ways. By default, they will have two views: an extended taskpad view and a standard view. The extended view contains the list of tasks that you've defined and can also contain the console items being managed. The standard view contains only the console items being managed. When you create the taskpad, you have the option of hiding the standard view simply by selecting the Hide Standard View option.

The extended view of the taskpad can be organized using a vertical list, a horizontal list, or no list. In a vertical list as shown previously in Figure 11-10, taskpad commands are listed to the left of the console items they are used to manage. This organization approach works well when you have a long list of tasks and you still want users to be able to work with the related snap-ins.

With a horizontal list, as shown in Figure 11-11, the console items managed by the taskpad are listed above the taskpad commands. This organization style is best when you want to display multiple columns of taskpad commands and still be able to work with the related snap-ins.

A custom console with taskpad that uses a horizontal list

Figure 11-11. A custom console with taskpad that uses a horizontal list

In some cases, you might not want to show the console items being managed by the taskpad on the same view as the tasks. In this case, you can specify that no list should be used. When you choose the No List option, the taskpad commands are shown by themselves in the taskpad tab (AD Management here), and users can click the Standard tab to access the related console items.

When you use the No List style, you can limit the options to the tasks you've defined and not allow users to access the console items being managed. To do this, you specify that the Standard tab should be hidden. From then on, when working with the console items being managed, users can perform only the tasks defined on the taskpad, such as shown in Figure 11-12.

By using the No List style and hiding the Standard tab, you can limit user options

Figure 11-12. By using the No List style and hiding the Standard tab, you can limit user options

Creating and Managing Taskpads

Any console tool that has at least one snap-in can have an associated taskpad. To create a taskpad, you must open the console in author mode, then follow these steps:

  1. Right-click the console item that you want the taskpad to manage, and choose New Taskpad View to start the New Taskpad View Wizard. Keep in mind that a single taskpad can be used to manage multiple console items, and in this case, you are simply designating the object that should have initial focus when working with the taskpad.

  2. In the New Taskpad View Wizard, click Next, and then configure the taskpad display by using the options shown in Figure 11-13. Select the style for the details page as Vertical List, Horizontal List, or No List, and set the task description style as Text or InfoTip. You can also choose to hide the Standard tab (which only limits the tasks that can be performed if you also select the No List style). As you make selections, the wizard provides a depiction of what the results will look like as a finished taskpad.

    Configure the taskpad display in the New Taskpad View Wizard

    Figure 11-13. Configure the taskpad display in the New Taskpad View Wizard

  3. On the Taskpad Target page (shown in Figure 11-14), you must decide whether to apply the taskpad view to the selected tree item only (the item you right-clicked) or to any other tree item of the same type. If you choose the latter option, you also have the option to change the default display for any items used in the taskpad to the taskpad view. Typically, you'll want to do this to standardize the view, especially if you've hidden the Standard tab and don't want users to have other options.

    Specify a taskpad target

    Figure 11-14. Specify a taskpad target

    Note

    Basically, all snap-ins are of the same type. So, if you apply the taskpad to any other tree item of the same type, the taskpad view can include any snap-in that's been added to the console.

  4. Next, you set the name and description for the taskpad. The name appears at the top of the taskpad and on the tab at the bottom of the taskpad. The description appears at the top of the taskpad under the taskpad name.

  5. On the final wizard page, you can click Finish to create the taskpad. The Start New Task Wizard option is selected by default, so if you click Finish without clearing this option, the wizard starts and helps you create tasks for the taskpad.

If you want to create multiple taskpads, you can repeat this procedure. For the example console, you might want to have a taskpad for each folder and so in that case would create three additional taskpads. Any additional taskpads you create can be placed at the same place in the console tree or at a different part of the console tree. You access multiple taskpads placed at the same part of the console tree by using the tabs provided in the details pane.

As long as you are in author mode, any taskpad you created can easily be edited or removed. To edit a taskpad view, right-click the item where you defined the taskpad, and then select Edit Taskpad View from the shortcut menu. This opens a Properties dialog box containing two tabs:

  • General Use the options in the General tab shown in the following screen to control the taskpad style as well as to display or hide the Standard tab. Click Options to specify to which items the taskpad view is applied.

    image with no caption
  • Tasks Use the Tasks tab to list current tasks defined for the taskpad. Use the related options to create new tasks or manage the existing tasks.

Creating and Managing Tasks

You create tasks by using the New Task Wizard. By default, this wizard starts automatically when you finish creating a taskpad view. You can start the wizard using the taskpad Properties dialog box as well. Right-click the item where you defined the taskpad, and then select Edit Taskpad View from the shortcut menu. In the Tasks tab, click New.

Once the New Task Wizard is started, click Next, and then select the command type as follows:

  • Choose Menu Command to run the standard menu options of included snap-ins.

  • Choose Shell Command to run scripts or programs or to open Web pages.

  • Choose Navigation to navigate to a saved view on the Favorites menu.

The subsequent screens you see depend on the type of task you are creating.

Creating Menu Command Tasks

After choosing to create a menu command, select a source for the command, as shown in Figure 11-15. You specify the source of the command as an item from the console tree or from the list in the details pane for the item selected when you started the wizard. If you choose Tree Item Task as the source, select a snap-in in the console tree, and then choose one of the available commands for that snap-in. The commands available change based on the snap-in you've selected.

Select a command source and then choose a command from the list of available commands

Figure 11-15. Select a command source and then choose a command from the list of available commands

Next, you set the name and description for the task, as shown in Figure 11-16. The name is used as the shortcut link designator for the task. The description is displayed as text under the shortcut link or as an InfoTip, depending on the way you configured the taskpad.

Enter a name and description for the command or simply click Next to accept the default values

Figure 11-16. Enter a name and description for the command or simply click Next to accept the default values

In the Task Icon dialog box, shown in Figure 11-17, you can choose an icon for the task. Select Icon Provided By MMC to choose any of the icons provided by the MMC. Click an icon to select it and to display what the icon symbolizes and its alternate meanings. In the example, the Computer icon is selected, and its alternate meanings are Client, CPU, Disconnected, and Monitor.

Choose an icon for the task

Figure 11-17. Choose an icon for the task

If you want to use a different set of icons, select Custom Icon, and then click Browse. This displays the Change Icon dialog box. Click Browse to display the Open dialog box. By default, the Open dialog box should open with the directory set to %SystemRoot%System32. In this case, type shell32.dll as the File Name, and click Open. You should now see the Change Icon dialog box with the Shell32.dll selected, which will allow you to choose one of several hundred icons registered for use with the operating system shell.

When you click Next again, the wizard confirms the task creation and shows a current list of tasks on the taskpad provided you click Finish to finalize the creation of the current task. If you want to create another task, select Run This Wizard Again, and then repeat this process. Otherwise, just click Finish.

Creating Shell Command Tasks

After choosing to create a shell command, specify the command line for the task, as shown in Figure 11-18.

Set the command line for the script or program you want to run

Figure 11-18. Set the command line for the script or program you want to run

The options are as follows:

  • Command The full file or Universal Naming Convention (UNC) path to the command to run, such as C:ScriptsCheckpol.bat or \Corpserver01ScriptsCheckpol.bat. The command can be a shell or batch script or a program. If you don't know the path to use, click Browse, and then use the Open dialog box to find the program that you want to run.

  • Parameters The command-line parameters to pass to the script or program. Click the right arrow beside the parameters field to display variables that you can use (these are related to the snap-in you selected originally when creating the taskpad). Select a variable to add it to the list of command-line parameters.

  • Start In The startup (or base) directory for the script or program you've chosen, such as C:Temp.

  • Run The type of window the script or program should run within, either a normal, minimized, or maximized window.

Next, you set the name and description for the task. The name is used as the shortcut link designator for the task. The description is displayed as text under the shortcut link or as an InfoTip, depending on the way you configured the taskpad.

Next, you can choose an icon for the task. As discussed previously, you can select Icon Provided By MMC or Custom Icon. If you use custom icons, you probably want to use the Shell32.dll in the %SystemRoot%System32 directory to provide the custom icon.

When you click Next again, the wizard confirms the task creation and shows a current list of tasks on the taskpad provided you click Finish to finalize the creation of the current task. If you want to create another task, select Run This Wizard Again, and then repeat this process. Otherwise, just click Finish.

Creating Navigation Tasks

Navigation tasks are used to create links from one taskpad to another or from a taskpad to a saved console view. Before you can create navigation tasks, you must save a console view or a view of a particular taskpad to the Favorites menu. To do this, while in author mode, navigate down the console tree until the taskpad or item to which you want to navigate is selected, and then select Add To Favorites on the Favorites menu. In the Add To Favorites dialog box, shown in Figure 11-19, type a name for the favorite, and then click OK. Then you can create a navigation task on a selected taskpad that uses that favorite.

Save the current view of the console tool to the Favorites menu

Figure 11-19. Save the current view of the console tool to the Favorites menu

You create the navigation task using the New Task Wizard. In the New Task Wizard, choose Navigation as the task type. Next, select the favorite to which you want users to navigate when they click the related link. As shown in Figure 11-20, the only favorites available are the ones you've created as discussed previously.

Select the previously defined favorite that you want to use

Figure 11-20. Select the previously defined favorite that you want to use

Next, you set the name and description for the task. The name is used as the shortcut link designator for the task. The description is displayed as text under the shortcut link or as an InfoTip, depending on the way you configured the taskpad. If you are creating a link to the main console tool page, you might want to call it Home.

Next, you can choose an icon for the task. As discussed previously, you can select Icon Provided By MMC or Custom Icon. If you created a link called Home, there is a Home icon provided by the MMC to use. If you use custom icons, you probably want to use the Shell32.dll in the %SystemRoot%System32 directory to provide the custom icon.

When you click Next again, the wizard confirms the task creation and shows a current list of tasks on the taskpad provided you click Finish to finalize the creation of the current task. If you want to create another task, select Run This Wizard Again, and then repeat this process. Otherwise, just click Finish.

Arranging, Editing, and Removing Tasks

As long as you are in author mode, you can edit tasks and their properties by using the taskpad Properties dialog box. To display this dialog box, right-click the item where you defined the taskpad, and then select Edit Taskpad View from the shortcut menu. In the Tasks tab shown in Figure 11-21, you can do the following:

  • Arrange tasks To arrange tasks in a specific order, select a task, and use Move Up or Move Down to set the task order.

  • Create new tasks To create a new task, click New, and then use the New Task Wizard to define the task.

  • Edit existing tasks To edit a task, select it, and then click Modify.

  • Remove tasks To remove a task, select it, and then click Remove.

Use the Tasks tab in the taskpad Properties dialog box to arrange, create, edit, and remove tasks

Figure 11-21. Use the Tasks tab in the taskpad Properties dialog box to arrange, create, edit, and remove tasks

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset