无法安装 Windows 7 小工具
我正在为 Windows 7 开发一个非常简单的小工具。我创建了一个 index.html 文件和一个 gadget.xml 文件,将它们压缩为 zip,将扩展名更改为 gadget。 当我双击 .gadget 文件时,我会看到一个窗口,告诉我是否确定要安装该小工具,因为它来自不受信任的发布者。我点击“安装”,一切似乎都很好。 但是,该小工具尚未安装。 我查看了事件查看器,但什么也没发现,它只是默默地失败了。 有人知道我可能做错了什么吗? 这是 gadget.xml 文件:
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>Elecciones 2011</name>
<namespace>gnuine.com</namespace>
<version>1.0.0.0</version>
<author name="whatever">
<info url="hiddenforpublicpublish" />
</author>
<copyright>2011</copyright>
<description>Description</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="index.html" />
<platform minPlatformVersion="1.0" />
<permissions>Full</permissions>
</host>
</hosts>
</gadget>
I'm developing a very simple gadget for Windows 7. I have created an index.html file and a gadget.xml file, compressed them as a zip, changed the extension to gadget.
When I double click on the .gadget file I get a window telling me if I'm sure I want to install the gadget as it comes from an untrusted publisher. I click 'Install', and everything seems to be fine.
However, the gadget is not installed.
I've looked at the Event Viewer and found nothing, it just silently fails.
Anyone knows what I might be doing wrong?
Here's the gadget.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>Elecciones 2011</name>
<namespace>gnuine.com</namespace>
<version>1.0.0.0</version>
<author name="whatever">
<info url="hiddenforpublicpublish" />
</author>
<copyright>2011</copyright>
<description>Description</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="index.html" />
<platform minPlatformVersion="1.0" />
<permissions>Full</permissions>
</host>
</hosts>
</gadget>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要创建一个 .zip 文件,其中直接包含所有文件。
您可能所做的是将index.html 和gadget.xml 放在一个文件夹中,然后压缩该文件夹。
真正需要做的是,选择index.html、gadget.xml 和其他文件和文件夹,然后将其制作为.zip。
这是我遇到的问题,这样做解决了问题。
请检查是否有效。
问候
You need to create a .zip which has all the files directly in it.
What you probably have done is, put index.html and gadget.xml in a folder, zipped the folder.
What really needs to be done is, select index.html, gadget.xml and other files and folder and make a .zip out of it.
This was the issue I had faced, and doing this solved the problem.
Please check if that works.
Regards
现在您已完成,问题已解决。
now you are done, problem solved.
我对版本号有疑问,我认为它必须是:
xx
不是
xxxx
I had issues with the version number, I thought it had to be:
x.x
not
x.x.x.x