Skip to content
⌘ NSIS Forum Archive

CreateDirectory and CreateShortCut

3 posts

SteveRussell#

CreateDirectory and CreateShortCut

What exactly happens when CreateDirectory and CreateShortCut execute and find that their targets already exist?

I ask this in the context of running an installer more than once, perhaps to replace missing files, etc.

Also, could I get an explanation of what "recursive" means as applied to file functions?
kichik#
CreateDirectory does nothing and CreateShortCut replaces. A simple test can show this.
CreateDirectory $INSTDIR
CreateDirectory $INSTDIR
CreateShortcut $INSTDIR\blah.lnk $INSTDIR\blah.exe
CreateShortcut $INSTDIR\blah.lnk $INSTDIR\blah2.exe
A recursive function is a function calling itself. In file systems, this usually means the function calls itself for every directory it finds so it'll pass on every file and directory beneath a given path.