Add Tasks and Links to Dashboard Home Page - Windows Server Essentials
Applies To: Windows Server 2012 R2 Essentials
Add tasks to the SETUP, ADD-INS, QUICK STATUS task lists, and add links to the Community Links section in the home page of the Dashboard by placing an XML file named OEMHomePageContent.home file or an embedded resource file named OEMHomePageContent.dll in %ProgramFiles%\Windows Server\Bin\Addins\Home. If the XML file is being installed on the server without a resource file, it must be named OEMHomePageContent.home. If an assembly is being used to install both an XML file and a resource file, it must be named OEMHomePageContent.dll and it must be Authenticode signed. The embedded resource file can be used to localize the text in the tasks and links that you add. The .home file contains the XML definitions of the tasks and links.
Define the tasks and links
Use a text editor, such as Notepad to create the .home file, or if you are also creating an embedded resource file you can use Visual Studio 2010 or higher to define the files. The following procedure shows how to use Visual Studio to create the files.
To define the tasks and links
Open Visual Studio as an administrator by right-clicking the program in the Start menu and selecting Run as administrator.
Click File, click New, and then click Project.
In the Templates pane, click Class Library, type OEMHomePageContent in the Name box, and then click OK.
Delete the Class1.cs file.
Right-click the new project, click Add, and then click New Item.
In the Templates pane, click XML File, type OEMHomePageContent.home in the Name box, and then click Add.
Note
If the XML file is being installed without a resource file, it must be named OEMHomePageContent.home. If it is included in an assembly, it can be given any name as long as it has a .home extension.
Add the following XML code to the OEMHomePageContent.home file:
<Tasks version="2.0" xmlns="https://schemas.microsoft.com/WindowsServerSolutions/2010/01/Dashboard> <SetupMyServerTasks> <Task name="MyTask" description="MyTaskDescription" id="GUID"> <Action name="MyAction1Name" image="IconForAction1" type="TaskType" exelocation="ActionExeLocation" /> <Action name="MyAction2Name" image="IconForAction2" type="TaskType" exelocation="ActionExeLocation" /> … </Task> … </SetupMyServerTasks> <MailServiceTasks> <!-- Same schema as in "SetupMyServerTasks" but the tasks are shown in "Connect to Email Service" category. --> </MailServiceTasks> <LineOfBusinessTasks> <!-- Same schema as in "SetupMyServerTasks" but the tasks are shown in "Add-ins" category. --> <GetQuickStatusTasks> <Task name="MyQuickStatusTask1" description="MyQuickStatusTask1Desc " id="GUID" assembly="AssemblyName of quick status query implementation" class="ClassName of quick status query implementation" replaceid="GUID"/> <!-- Same schema as Actions in "SetupMyServerTasks" --> </Task> </GetQuickStatusTasks> <Links> <Link ID="GUID" Title="Displayed text of the link" Description="A very short description" ShellExecPath="Path to the application or URL"/> </Links> </Tasks>
Where:
Attribute | Description | ||
---|---|---|---|
Name (Task) |
The name that is displayed for the task in the list. If you create an embedded resource file, the value of this attribute is the string resource. |
||
description (Task) |
The description of the task. If you create an embedded resource file, the value of this attribute is the string resource. |
||
id (Task) |
The identifier of the task. This identifier must be a GUID. You create a new GUID for an exe task, but for a global task, you use the GUID that you created when you defined the task for the task pane of the sub-tab. For more information about creating a GUID, see Create Guid (guidgen.exe). |
||
image |
This field will be ignored. |
||
Name (Action) |
Displays the name of the task. |
||
Type (Action) |
Describes the type of task. The task can one of the following:- global task, exe, or a url task. A global task is the same global task that you created when defining the tasks for the task pane in the sub-tab. For more information about creating a global task that can be used in both the tasks pane of the sub-tab and the Getting Started Tasks or Common Tasks lists of the home page, see "Creating the support classes" in "How to: Create a Sub-Tab" of the Windows Server Solutions SDK. An exe task can be used to run applications from the Getting Started Tasks or Common Tasks lists. |
||
exelocation |
The path to the application that is associated with the task. This attribute is only used for exe tasks. |
||
replaceid |
The identifier of the task that is replaced with this task. |
||
assembly |
The AssemblyName of the assembly which provides the class to implement quick status query. The assembly needs to be located in Program files\ windows server\bin\. |
||
class |
The name of the class implements quick status query. The class needs to implement ITaskStatusQuery interface. |
||
Title (link) |
The text that is displayed for the link. If you create an embedded resource file, the value of this attribute is the string resource. |
||
Description (link) |
The description of the link destination. If you create an embedded resource file, the value of this attribute is the string resource. |
||
ShellExecPath |
The path to the application or the URL.
|
Change the attribute values to represent your task or link.
In Solution Explorer, right-click OEMHomePageContent.home, and then click Properties. In the Properties pane, under Build Action, select Embedded Resource.
Save the OEMHomePageContent.home file.
For more information about how to implement a quick status query, see the documents and samples in the Windows Server Solutions SDK.
Change the status of a SETUP/ADD-INS task
The tasks that are listed in SETUP and ADD-INS can be toggled from states of completed (configured for Add-ins) and not completed (not configured for Add-ins).
When you define the application that is associated with your new task, use the SetTaskStatus method of the Microsoft.WindowsServerSolutions.Administration.ObjectModel.TaskStatusHelper namespace (included, but not documented in the Windows Server Solutions SDK) to change the status of the task. For example, you could change the check mark from grey to green by calling the SetTaskStatus method with the TaskStatus.Complete enumeration value (SetTaskStatus(id, TaskStatus.Complete), where id is the identifier of the task). The enumeration values that can be used are TaskStatus.Complete, TaskStatus.Incomplete, or TaskStatus.Hidden.
Replace tasks
You can replace the tasks that are pre-defined in the Getting Started Tasks or the Common Tasks lists by adding the GUID for the task to the replaceid attribute of the task definition. The following table lists the tasks and the corresponding identifiers that can be replaced in the Dashboard:
Task name | Identifier |
---|---|
Get updates for other Microsoft products |
8412D35A-13EE-4112-AE0B-F7DBC83EA83D |
Set up Server Backup |
F68B3F3F-19DE-499D-9ACB-4BB41B8FF420 |
Set up Anywhere Access |
8991302D-676A-4A7C-B244-D1E08AE0EFEA |
Setup email alert notification |
DE6F2B36-F19C-4FAF-998B-9772300E3530 |
Add a user accounts |
6D5B5D5F-2EC7-4B1F-9580-4DB084B278B1 |
Add server folders |
03F1F438-D94E-439B-A9F7-0C817C37D625 |
Anywhere Access - Quick Status |
6093B462-1F04-4212-8804-9BC823070FAD |
Server Backup - Quick Status |
156947D8-21DC-45FE-A9A8-2F80AE304191 |
Server Folders - Quick Status |
C657E8AB-AC1F-4AA1-8E80-5AF6BB27C314 |
Active user accounts - Quick Status |
68BCB125-CE8F-467F-B65B-56AD45A614B5 |
Email alert notification - Quick Status |
75AB06E7-A679-4D62-A5EC-65362FE4F9DB |
Computers - Quick Status |
7966A974-D52D-4F5D-B37F-05C1B73CEEF3 |
(Optional) Create the resource file
To localize the text in the tasks that you add to Getting Started Tasks, Common Tasks, and Community Links you must create an assembly that contains the .home file and a .home.resx file that defines the text strings.
To create the resource file
Right-click the project that you created for your tasks, click Add, and then click New Item.
In the Templates pane, click Resources File, type OEMHomePageContent.home.resx in the Name box, and then click Add.
Note
The resource file can be given any name as long as it has a .home.resx extension.
For each task or link that you add, you must add strings and values to the OEMHomePageContent.home.resx file that match the Task and Link elements that are defined in the OEMHomePageContent.home file. The following code example shows an example of a Tasks.xml file that is structured for the resource file:
<Tasks version="2.0" xmlns="https://schemas.microsoft.com/WindowsServerSolutions/2010/01/Dashboard> <SetupMyServerTasks> <Task name="MyTask" description="MyDescription" id="GUID"> <Action name="MyActionname" image="IconForAction" type="TaskType" exelocation="ActionExeLocation" /> </Task> </SetupMyServerTasks> </Tasks>
Note
Identifiers in attributes that are used for localization cannot contain spaces.
Add the MyTask, MyTaskDescription, MyActionName, and IconForAction resource names to the .resx file with the appropriate values.
Save the OEMHomePageContent.home.resx file, and then build the solution.
Sign the assembly with an Authenticode signature
to be used in the operating system, the assembly must be signed with Authenticode. For more information about signing the assembly, see Signing and Checking Code with Authenticode.
Install the task files
After you create the .home and .home.resx files, you must install them on the server.
To install the task files
Ensure that your solution builds without errors.
If you did not create an embedded resource file, copy the OEMHomePageContent.home file to %ProgramFiles%\Windows Server\Bin\Addins\Home on the server. If you created an embedded resource file, copy the OEMHomePageContent.dll file to %ProgramFiles%\Windows Server\Bin\Addins\Home on the server.
See Also
Concepts
Preparing the Image for Deployment - Windows Server Essentials
Testing the Customer Experience - Windows Server Essentials