问题描述
我正在为Windows 7开发一个非常简单的小工具.我创建了一个index.html文件和一个gadget.xml文件,将它们压缩为zip,并将扩展名更改为小工具.当我双击.gadget文件时,会出现一个窗口,告诉我是否确定要安装该小工具,因为它来自不受信任的发布者.我单击安装",一切似乎都很好.但是,尚未安装该小工具.我查看了事件查看器,但未发现任何结果,它只是默默地失败了.有人知道我可能做错了吗?这是gadget.xml文件:
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>
推荐答案
您需要创建一个直接包含所有文件的.zip文件.
You need to create a .zip which has all the files directly in it.
您可能要做的是将index.html和gadget.xml放在文件夹中,然后将文件夹压缩.
What you probably have done is, put index.html and gadget.xml in a folder, zipped the folder.
真正需要做的是,选择index.html,gadget.xml以及其他文件和文件夹,并从其中制作一个.zip.
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.
请检查是否可行.
致谢
这篇关于无法安装Windows 7小工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!