简体   繁体   English

使用C#检测Windows 7上正在运行的桌面小工具

[英]Detecting which desktop gadgets are running on Windows 7 using C#

I need to detect which Windows 7 Gadgets are currently loaded. 我需要检测当前正在加载哪些Windows 7小工具。 I know for a fact that the process they run within is "explorer.exe" and that the each gadget has a window class is called SideBar_HTMLHostWindow with in instance of Internet Explorer_Server (snapshot attached). 我知道一个事实,它们在其中运行的进程是“ explorer.exe”,每个小工具都有一个窗口类称为SideBar_HTMLHostWindow并带有Internet Explorer_Server实例(附带快照)。

However, I am not able to enumerate any further child windows or get window text etc. Any help would be appreciated. 但是,我无法枚举任何其他子窗口或获取窗口文本等。将不胜感激。

快照

UPDATE: This may be easier than it seems. 更新:这可能比看起来容易。 Since it is tied to windows and remembers which gadgets are supposed to run at startup, there may be some data stored in the registry or disk perhaps? 由于它与Windows绑定,并且记住启动时应该运行哪些小工具,因此注册表或磁盘中可能存储了一些数据?

Found the answer: C:\\Users\\Raheel Khan\\AppData\\Local\\Microsoft\\Windows Sidebar\\Settings.ini. 找到了答案:C:\\ Users \\ Raheel Khan \\ AppData \\ Local \\ Microsoft \\ Windows Sidebar \\ Settings.ini。 This file gets updated every time a gadget is added or removed. 每次添加或删除小工具时,此文件都会更新。

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

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