Currently i've an exe, for which i need to create the symbolic link through C++ or through bat file. This should not be a version specific, it should work for all the windows file system. Any windows API is there to create the same?
In Linux we could do the following in a shell: ln /dir/sourcefile.file /otherdir/targetfile.file
For windows it is a little tougher, but try looking up fsutil: fsutil hardlink create /otherdir/targetfile.file /dir/sourcefile.file This could be done from a batch file, or perhaps even system("");
Windows has had CreateHardLink() since Windows XP, which is only works for files and for NTFS partitions, but CreateSymbolicLink() only turned up in Vista.
Would a shortcut be bearable? It would work even with old versions of Windows (well, since Windows 95) and even FAT.
This article includes code showing how to create a link