获得"友好和QUOT;名称窗口STARTMENU项目/快捷方式文件 [英] getting the "friendly" name for window startmenu items/shortcut files

查看:316
本文介绍了获得"友好和QUOT;名称窗口STARTMENU项目/快捷方式文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是奇怪的,有的STARTMENU项目似乎下定决心,这是不包含在实际的.lnk文件友好的名称。例如:

This is curious, some startmenu items seems to resolve to a "friendly" name that's not contained in the actual .lnk file. For example:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\dfrgui.lnk显示在资源管理器中的磁盘碎片整理,实际的快捷方式文件不包含真实姓名的,但链接到EXEC:\Windows\system32\dfrgui.exe

"c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\System Tools\dfrgui.lnk" is displayed in explorer as "Disk Defragmenter", the actual shortcut file doesn't contain the real name either but links to the exe "C:\Windows\system32\dfrgui.exe""

这是一个Win32 API的东西还是有一个更简单的方法来得到一个文件的友好名称/启动菜单项?

Is this a Win32 API thing or is there a simpler way to get the "friendly" name of a file/start menu item?

推荐答案

有一个名为该文件夹中的隐藏文件的的desktop.ini 的这是我的机器上的内容:

There's a hidden file in that folder named desktop.ini. This is the content on my machine:

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21788
[LocalizedFileNames]
System Information.lnk=@%systemroot%\system32\msinfo32.exe,-100
Resource Monitor.lnk=@%SystemRoot%\system32\wdc.dll,-10030
dfrgui.lnk=@%systemroot%\system32\dfrgui.exe,-103
Task Scheduler.lnk=@%SystemRoot%\system32\miguiresource.dll,-201
System Restore.lnk=@%systemroot%\system32\rstrui.exe,-100
Disk Cleanup.lnk=@%SystemRoot%\system32\shell32.dll,-22026
Character Map.lnk=@%SystemRoot%\system32\shell32.dll,-22021
Windows Easy Transfer.lnk=@%windir%\system32\migwiz\wet.dll,-588
Windows Easy Transfer Reports.lnk=@%windir%\system32\migwiz\wet.dll,-591

这是有关行:

dfrgui.lnk = @%SYSTEMROOT%\system32\dfrgui.exe,-103

dfrgui.lnk=@%systemroot%\system32\dfrgui.exe,-103

-103值表示字符串是从字符串资源#103 dfrgui.exe阅读。在Visual Studio中,我使用文件+打开+文件,选择C:\windows\system32\dfrgui.exe。打开字符串表,并双击它:

The -103 value indicates the string is read from string resource #103 in dfrgui.exe. In Visual Studio, I used File + Open + File, selecting c:\windows\system32\dfrgui.exe. Opened "String table" and double-clicked it:

这很可能是你的机器上的不同,这取决于你住的地方。我表现出是英文版本的Win7。

This may well be different on your machine, depending on where you live. What I showed is for the English version of Win7.

这篇关于获得"友好和QUOT;名称窗口STARTMENU项目/快捷方式文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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