0

I am needing to use Puppet to create windows shortcuts on hosts to be accessed via SAMBA. The Puppet side I'll be fine with, it's the script I've been having issues getting working.

I've tried to use:

mslink_v3.sh on first look covers it all, with the exception of what I need to do. Similar with pylnk3.sh and lnk.sh working together, just a different reason for it not to work.

I am trying to create a windows shortcut to a network location with a argument with a space in it. Example below:

  • Path to exe = \\myhostname\program.exe
  • Argument = \\myhostname\program.ini loadabc

mslink_v3.sh will not let me surround the argument in single or double quotes, but works fine for network locations. pylnk3.sh/lnk.sh will not work for network locations, argument with spaces are ok via quotes. I did find in the end a code reference in pylink3.sh that network locations have not been implemented yet.

I've not found away to contact the developer of mslink_v3.sh to see about a tweak. I was going to comment on his post on this site, but I did not have enough points (hoping this post may give me enough).

Any suggestions at this point would be good.

Thanks

Matt

  • 1
    All too theoretical. We can help you fix code that isn't working. Read about [mcve] and update your Q with what you think is (closest to) the best solution. Please use the `{}` tool from the Edit menu on mouse-selected text to format as `code/data/requiredOutput/ExactErrMsgs`. I also highly recommend the searching for the section 'How to turn a bad script into a good question' in this link : https://stackoverflow.com/tags/bash/info Good luck. – shellter Oct 13 '20 at 16:11

1 Answers1

0

I contacted the developer of pylnk3.py via GitHub. He's added network support and also added all the cli support that lnk.py added.

Link below to the branch with all the development included:

https://github.com/strayge/pylnk/tree/cli_options