3
1
Is there any way to create portable links in NTFS using mklink? Or it there a better solution?
I want to be able to distribute an application in a zip file or folder copy where there is one "real" exe and one pointer to the exe using a different name, for example:
C:\Temp\link test\source>dir
Volume in drive C is OS
Directory of C:\Temp\link test\source
19/05/2014 11:35 <DIR> .
19/05/2014 11:35 <DIR> ..
19/05/2014 11:35 <SYMLINK> OldService.exe [NewService.exe]
19/05/2014 11:32 9 NewService.exe
That doesn't work though, if you copy it.
You just get two copies of the original file. The config file has to be linked as well (.exe.config) so that the config doesn't get out of sync.
Any way to make portable links?
Zip is not strictly necessary, just some method of transporting a-folder-of-stuff. Build, Release, Deploy, etc. As it's a windows service and we trigger it's installer classes with a batchfile which is part of the deployment, I'll try that. I may have to mark the other one as the answer, because it's a more general answer which more closely suits the question (got to test it first though) – RoboJ1M – 2014-05-20T09:42:01.927
@RoboJ1M sure. I can understand that. My answer was aimed at using all knowledge you provided, but I agree that the other answer works very well. – LPChip – 2014-05-20T10:15:42.097