[英]Is it possible for a Perl script running on a Unix/Linux platform to create Windows Shortcuts?
If I want to create a *nix symlink, I'll call symlink();
如果我想创建一个* nix符号链接,我将调用symlink();
, if i'm running a script on windows and I want to create a shortcut, I'd use Win32::Shortcut
. 如果我在Windows上运行脚本并且我想创建一个快捷方式,我会使用Win32::Shortcut
。
But what if I want to create a Windows shortcut if running a script from a *nix machine? 但是,如果我想从* nix机器运行脚本时创建Windows快捷方式该怎么办?
I'm accessing a SMB share on a Windows Server 2003 machine from my *nix machine. 我正从我的* nix机器访问Windows Server 2003计算机上的SMB共享。
Well, I don't know if Samba provides an API for that. 好吧,我不知道Samba是否提供了API。 On the other hand, Windows shortcuts are just .lnk
files in a specific format. 另一方面,Windows快捷方式只是特定格式的.lnk
文件。
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. 我编写了一个应用程序,其目标是允许任何人从任何操作系统创建lnk文件。 I started writting it in bash and then I converted it in C (the sources are available). 我开始用bash写它然后我用C转换它(源代码可用)。
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 http://www.mamachine.org/mslink/index.en.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.