简体   繁体   English

无法安装Windows 7小工具

[英]Can't install Windows 7 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. 我正在为Windows 7开发一个非常简单的小工具。我创建了一个index.html文件和一个gadget.xml文件,将它们压缩为zip,将扩展名更改为小工具。 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. 当我双击.gadget文件时,会出现一个窗口,告诉我是否确定要安装该小工具,因为它来自不受信任的发布者。 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: 这是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>

You need to create a .zip which has all the files directly in it. 您需要创建一个.zip,其中直接包含所有文件。

What you probably have done is, put index.html and gadget.xml in a folder, zipped the folder. 您可能要做的是将index.html和gadget.xml放在文件夹中,然后将其压缩。

What really needs to be done is, select index.html, gadget.xml and other files and folder and make a .zip out of it. 真正需要做的是,选择index.html,gadget.xml和其他文件和文件夹,并从中制作一个.zip。

This was the issue I had faced, and doing this solved the problem. 这就是我所面临的问题,而这样做解决了这个问题。

Please check if that works. 请检查是否可行。

Regards 问候

  1. download gadget 下载小工具
  2. rename to rar extension from gadget extension 从小工具扩展名重命名为rar扩展名
  3. go to C:\\Program Files\\Windows Sidebar\\Gadgets 转到C:\\ Program Files \\ Windows边栏\\小工具
  4. extract all rename files with the same gadget file name like "new.gadget" 提取具有相同小工具文件名(如“ new.gadget”)的所有重命名文件
  5. move the extracted folders to that directory. 将提取的文件夹移到该目录。 (to C:\\Program Files\\Windows Sidebar\\Gadgets) (到C:\\ Program Files \\ Windows边栏\\小工具)

now you are done, problem solved. 现在您已完成,问题已解决。

I had issues with the version number, I thought it had to be: 我的版本号有问题,我认为必须是:

xx

not xxxx 不是xxxx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM