Archive: How to create shortcut Junction links at runtime


How to create shortcut Junction links at runtime
Target Platform: Win/32 [XP SP2 (and above)]

Hi,

I am trying to figure out how to get my NSIS setup script to create a directory which will be a junction point to another folder/directory

I have my application which I am building an installer for which already contains junction-points in its file-system, I am now trying to package up into my NSIS installer by creating each directory and file as represented in my application folder (junctions included).

I would like to find out if there is a proper way to achieve this purely from within NSIS setup script itself and without having to call a separate batch script on exec().

For simplicity sake here is a brief example of what I wish to achieve:


...
section

CreateDirectory "$INSTDIR\App\Logs" # <-- This is the actual dir.
CreateDirectory "$INSTDIR\Logs" # <-- This should be junction of ..\App\Logs

sectionend
...



I'm an NSIS installer newbie and as yet have not fully understand what NSIS is fully capable of achieving with regards to file/folder manipulation.

NSIS does look to be very flexible and powerful enough for my needs thus far.

-- I would just like to see the basic principle on how to create a Junction-Link from within NSIS. Any old example will do I should be able to figure it out from there ;)

Anders kindly pointed out in another one of my posts: junction and a symlink is not the same thing! Junctions are Win2000+ and symlinks are Vista+
Thanks

http://forums.winamp.com/showthread.php?t=325143