On Thu, Jul 24, 2014 at 9:10 AM, David Mertens <dcmertens.p...@gmail.com> wrote:
> Bagdevi, > > If you rename the par-packed executable to "b.exe", then running it as "b" > should invoke the "b.pl" script. That is, the perl script that gets > invoked depends on the name of the executable itself. You can achieve the > same end on Unixen without renaming by using links; I am not sure if this > works on Windows, but I would be curious to know. :-) > I think the key is the value of what the *underlying* ARGV[0] (what Perl puts in$0) passed to the executable by exec. MS Windows Vista and newer support symbolic links like what "ln -s" creates on Linux/Unix/POSIX/etc. I don't know whether MS Windows' exec will put the supplied filename or the name of the file targeted by the symlink into the ARGV[0] it provides to the executable. As far as I know, even in the latest versions, MS Windows NTFS does not have "inodes" like Linux/Unix/etc use. Rather, it keeps that information in the directory for each file. As such, a "hard link" in MS Windows is not possible.