Add Entries to SETUP, ADD-INS, QUICK STATUS, and HELP Links
Updated: October 4, 2012
Applies To: Windows Server 2012 Essentials, Windows Server 2012 R2 Essentials
You can add tasks to the SETUP, ADD-INS, QUICK STATUS task lists, and you can add links to the Community Links section in the home page of the Dashboard. Tasks and links are added to these lists and section by placing an XML file named OEMHomePageContent.home file or an embedded resource file named OEMHomePageContent.dll in %ProgramFiles%\Windows Server\Bin\Addins\Home. 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.
You can add tasks to the SETUP, ADD-INS, QUICK STATUS task lists, and links to the HELP task by defining the tasks and links using XML, optionally creating the embedded resource file, and installing the file on the server. 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.
You can 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 2010 or higher to create the files.
To define the tasks and links
Open Visual Studio 2010 or higher 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.
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=”http://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>
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.
The description of the task. If you create an embedded resource file, the value of this attribute is the string resource.
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).
This field will be ignored.
Displays the name of the task.
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.
The path to the application that is associated with the task. This attribute is only used for exe tasks.
The identifier of the task that is replaced with this task.
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\.
The name of the class implements quick status query. The class needs to implement ITaskStatusQuery interface.
The text that is displayed for the link. If you create an embedded resource file, the value of this attribute is the string resource.
The description of the link destination. If you create an embedded resource file, the value of this attribute is the string resource.
The path to the application or the URL.
Environment variables are supported in the ShellExecPath attribute.
The following code example shows how to define a link to an application:
<Links> <Link Title="Calc" Description="Launches Calc" ShellExecPath="%windir%\system32\calc.exe" /> </Links>
The following code example shows how to define a link to a Web page:
<Links> <Link Title="Browser" Description="Open browser" ShellExecPath="http://www.adventureworks.com/" /> </Links>
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 how to implement a quick status query, please refer to documents and samples in the Windows Server Solutions SDK.
The tasks that are listed in SETUP and ADD-INS can be toggled in 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, you can 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.
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:
Get updates for other Microsoft products
Set up Server Backup
Set up Anywhere Access
Setup email alert notification
Add a user accounts
Add server folders
Anywhere Access - Quick Status
Server Backup - Quick Status
Server Folders - Quick Status
Active user accounts - Quick Status
Email alert notification - Quick Status
Computers - Quick Status
If you want 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.
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=”http://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>
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.
You must Authenticode sign the assembly for it to be used in the operating system. For more information about signing the assembly, see Signing and Checking Code with Authenticode.
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.