Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running a SAMBA file store for our Windows users, and I'd like to automatically generate windows LNK files linking to other network shares that the user needs access to.

I've done quite a bit of googling and I can't find a way of creating windows links on Linux, or through Perl. I did find a perl module that looked promising in CPAN, but it will only run on Windows unfortunately.

If it's not possible to create .LNK files, perhaps there is an alternative solution people can suggest to allow the users to click on a file in one SAMBA store to be linked to a different SAMBA share?

Thanks,

Bart.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The binary file format is documented here: http://www.stdlib.com/art6-Shortcut-File-Format-lnk.html It looks like you should be able to generate files like that using whatever language you want to output. I don't have a windows system handy to try out if its correct or not.

share|improve this answer
    
Unfortunately I don't have the skills to write something like this myself - but I think this probably is the only solution :( –  Bart B Sep 13 '11 at 13:36

It's been a long time since the initial question, but I've had the same issue and found a solution.

I wrote an application whose goal is to allow anyone to create lnk files from any OS. I started writting it in bash and then I converted it in C (the sources are available).

It's still fresh, so except me nobody tested yet, but you can have a look here :
  http://www.mamachine.org/mslink/index.en.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.