Skip to content
Snippets Groups Projects
Commit b0c4f90b authored by Dmitry Shamrikov's avatar Dmitry Shamrikov
Browse files

update readme

parent 84d19104
No related branches found
No related tags found
No related merge requests found
...@@ -9,8 +9,7 @@ You can edit most properties of the link such as working directory, tooltip text ...@@ -9,8 +9,7 @@ You can edit most properties of the link such as working directory, tooltip text
* extra data blocks: Darwin, IconEnvironment, KnownFolder, PropertyStore, Shim, SpecialFolder * extra data blocks: Darwin, IconEnvironment, KnownFolder, PropertyStore, Shim, SpecialFolder
* most options in LinkTargetIDList because it not documented, only key parts for resolving links implemented, others are zero stub * most options in LinkTargetIDList because it not documented, only key parts for resolving links implemented, others are zero stub
* relative path property not working, dont know why =( * you can use environment variables but they are resolved at creation time and not stores in the lnk file
* you can use environment variables and relative paths, but it resolves at creation time and not stores in the lnk file
Easiest way to create link with default parameters: `ShellLink.createLink("targetfile", "linkfile.lnk")` Easiest way to create link with default parameters: `ShellLink.createLink("targetfile", "linkfile.lnk")`
...@@ -36,3 +35,18 @@ public class Main { ...@@ -36,3 +35,18 @@ public class Main {
} }
``` ```
Final example creates recursive link that blocks explorer on Windows 7 while trying to get into the containing directory :D
```
package mslinks;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
ShellLink sl = ShellLink.createLink("test.lnk");
sl.getHeader().getLinkFlags().setAllowLinkToLink();
sl.saveTo("test.lnk");
}
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment