lnk

General approach to reading lnk files

可紊 提交于 2019-11-27 03:38:32
问题 Several frameworks and languages seem to have lnk file parsers (C#, Java, Python, certainly countless others), to get to their targets, properties, etc. I'd like to know what is the general approach to reading lnk files, if I want to parse the lnk in another language that does not have said feature. Is there a Windows API for this? 回答1: There is not an official document from Microsoft describing lnk file format but there are some documents which have description of the format. Here is one of

Windows shortcut (.lnk) parser in Java?

狂风中的少年 提交于 2019-11-26 13:17:42
I'm currently using Win32ShellFolderManager2 and ShellFolder.getLinkLocation to resolve windows shortcuts in Java. Unfortunately, if the Java program is running as a service under Vista, getLinkLocation , this does not work. Specifically, I get an exception stating "Could not get shell folder ID list". Searching the web does turn up mentions of this error message, but always in connection with JFileChooser . I'm not using JFileChooser , I just need to resolve a .lnk file to its destination. Does anyone know of a 3rd-party parser for .lnk files written in Java I could use? I've since found

Reading the target of a .lnk file in Python?

你离开我真会死。 提交于 2019-11-26 12:23:30
问题 I\'m trying to read the target file/directory of a shortcut ( .lnk ) file from Python. Is there a headache-free way to do it? The .lnk spec [PDF] is way over my head. I don\'t mind using Windows-only APIs. My ultimate goal is to find the \"(My) Videos\" folder on Windows XP and Vista. On XP, by default, it\'s at %HOMEPATH%\\My Documents\\My Videos , and on Vista it\'s %HOMEPATH%\\Videos . However, the user can relocate this folder. In the case, the %HOMEPATH%\\Videos folder ceases to exists

Windows shortcut (.lnk) parser in Java?

此生再无相见时 提交于 2019-11-26 03:39:50
问题 I\'m currently using Win32ShellFolderManager2 and ShellFolder.getLinkLocation to resolve windows shortcuts in Java. Unfortunately, if the Java program is running as a service under Vista, getLinkLocation , this does not work. Specifically, I get an exception stating \"Could not get shell folder ID list\". Searching the web does turn up mentions of this error message, but always in connection with JFileChooser . I\'m not using JFileChooser , I just need to resolve a .lnk file to its