Chrome 如果扩展被删除,则不会通过注册表再次安装它

Chrome extension is not installed again through registry if it was deleted

我在 chrome 商店有分机。 起初我通过注册表以编程方式添加 chrome 扩展。 接下来我在 Chrome 中手动删除了这个扩展。并再次以编程方式在注册表中添加文件夹。但它没有安装在浏览器中。 另外,当我删除扩展时,注册表中带有 extension_id 的文件夹没有删除,所以当我再次安装它时它甚至没有改变...... 我该如何解决? (没有通过 chrome 存储 "Add plugin" 的解决方案)

这是故意的。如果用户决定删除自动安装的扩展程序,它会在该配置文件中被 列入黑名单 ,并且不会再次自动安装。您无能为力(自动)。

来自the docs

What if the user uninstalls the extension?

If the user uninstalls the extension through the UI, it will no longer be installed or updated on each startup. In other words, the external extension is blacklisted.

但是,用户可以通过转到网上应用店并从那里安装来清除黑名单:

How do I get off the blacklist?

If the user uninstalls your extension, you should respect that decision. However, if you (the developer) accidentally uninstalled your extension through the UI, you can remove the blacklist tag by installing the extension normally through the UI, and then uninstalling it.