Produce Lnk File on Gnu/Linux to Transfer to Windows

Creating a windows shortcut (.lnk) in Linux with spaces in the argument to a network share

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

Reformatting Windows lnk file via an automated script

In the WindowsNT Resource Kit there's a command line utility called Shortcut.exe that I'm reliably informed will run under XP/2000/2003 as well. You can use a variety of command line switches to modify existing LNK files to point to new shortcuts.

I found information about it here:
http://www.ss64.com/nt/shortcut.html

I daresay it can't be too hard to hunt down the WindowsNT Resource Kit on the Microsoft Website and extract it. It's a command line utility, so you should be able to batch it to loop through all the LNK files and modify them so they're correct.

Wine linker error: trying to create .lnk

The solution seems to be to change the includes section to:

#define INITGUID
#include <windows.h>
#include <shobjidl.h>
#include <shlguid.h>
#include <initguid.h>

ie, add #define INITGUID before everything and include #include <initguid.h>

I have no idea why this works.

I also had to add -lole32 to fix an error that came up after the cited one was resolved.

The code compiles... now to see if I can make it do what I need.

Git symbolic links in Windows

You can find the symlinks by looking for files that have a mode of 120000, possibly with this command:

git ls-files -s | awk '/120000/{print $4}'

Once you replace the links, I would recommend marking them as unchanged with git update-index --assume-unchanged, rather than listing them in .git/info/exclude.



Related Topics



Leave a reply



Submit