我已向 Windows Media Center 添加了自定义条带和磁贴。但是,当我选择磁贴时,我选择的应用程序 ( notepad.exe
) 不会启动,并且出现以下错误:
[name] 程序已停止响应,您将返回到 Windows Media Center。
我需要在我的 XML 中更改什么以便 notepad.exe
启动而不是显示此错误消息?
更多详细信息
使用此博客文章和Windows 开发中心的此页面中提供的示例,我创建了以下 XML 文件(称为dummy.xml
):
<application title="appTitle" id="{81E3517C-A5F3-4afa-9E37-81BF9A6A99FE}">
<entrypoint id="{760A3CF3-6675-444b-AA31-B2A3F94AD9A3}"
addin="Microsoft.MediaCenter.Hosting.WebAddIn,Microsoft.MediaCenter"
title="entrypointTitle"
description="Description"
run="notepad.exe">
<category category="MyCompany\MyApplication1"/>
</entrypoint>
</application>
和以下注册表文件(称为dummy.reg
):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Start Menu\Applications\{81E3517C-A5F3-4afa-9E37-81BF9A6A99FE}]
"Title"="appTitle"
"Category"="MyCompany\\MyApplication1"
"OnStartMenu"="True"
"TimeStamp"=dword:0c7e59de
然后我使用以下命令安装它们:
%windir%\ehome\registermceapp.exe dummy.xml
regedit.exe /s dummy.reg
当我运行 Windows Media Center 时,我可以看到条带和磁贴 - 但是当我选择磁贴时,我收到一条错误消息:
根据此页面,该entrypoint
元素具有以下属性run
:
一个字符串,它指定本地计算机上可执行文件的完整或相对路径。
我需要对 XML 文件和注册表项做哪些不同的操作notepad.exe
才能运行,而不是显示错误消息?