Create shortcut in windows programmatically

后端 未结 3 542
失恋的感觉
失恋的感觉 2021-01-19 02:48

Is there a way to create link in windows?
I found samples that use VBScript or one has to do download Shortcut.exe.
I need a simple solutio

3条回答
  •  遥遥无期
    2021-01-19 03:22

    I had the same problem, so i wrote library for parsing and creating .lnk files. It does not use VBScripts or JNI, java code only. See my Github.

    Creating shortcuts: ShellLink.createLink("targetfile", "linkfile.lnk"). You can also set up most parameters of the link. See details and examples in repo.

    Probably this question is not actual already, but i hope it will be helpfull for people who will find this topic in Google.

提交回复
热议问题