如何使用C#获取任务栏中固定应用程序的列表 [英] How to get the list of pinned applications in taskbar using C#

查看:85
本文介绍了如何使用C#获取任务栏中固定应用程序的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,



我正在用c#创建一个Windows应用程序,自动化窗口。我正在尝试检索任务栏中所有固定应用程序的列表。



我尝试过的方法:



我在互联网上搜索,但我没有得到任何合适的解决方案。



任何人都可以帮助我。





提前致谢。

Dear All,

I'm creating a windows application in c#, where automating windows. And I'm trying retrieve all/list of the pinned applications in the taskbar.

What I have tried:

I searched on internet, but I didn't get any suitable solution.

Can anyone please help me.


Thanks in advance.

推荐答案

试试这个:

Try this:
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), 
                           @"Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar");
string[] files = Directory.GetFiles(path);
foreach (string file in files)
    {
    Console.WriteLine(Path.GetFileNameWithoutExtension(file));
    }


这篇关于如何使用C#获取任务栏中固定应用程序的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆