簡體   English   中英

識別是否安裝了谷歌瀏覽器擴展

[英]Recognize if google chrome extension is installed

有沒有辦法用 C# 代碼確定 Chrome 中是否安裝了特定的擴展程序?

我只在 Stack Overflow 中找到了 JS 選項。

我試圖在 %AppData% 下尋找相關文件,但沒有。

注意:要求是使用 .Net 3.5 進行開發。

解決了。 問題是擴展程序是從解壓縮的文件夾以開發人員模式加載的。 因此它沒有被復制到 %USERPROFILE%\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Extensions\\ 目錄。

因此,要查找擴展名,您必須首先查看上述 manifest.json 文件的路徑,然后:

Load: %USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\preferences (it's a file)
Deserialize the json content.
iterate objects with "path" property.
Go to each path and open the manifest.json file

希望它會幫助某人。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM