durex Posted January 16, 2005 Posted January 16, 2005 Is it possible to create a shortcut based on relative paths instead of absolute? IE: I have a shorcut placed on the root of a drive, which has a folder in it, which contains the program I want to point the shortcut to.I dont think there is, but thought Id check...Thanks!
Afterdawn Posted January 16, 2005 Posted January 16, 2005 You can use the %SystemDrive% variables. But it isn't possible to create a relative shortcut "the normal way". You could create a cmd file that runs the specified program, which of course can contain relative paths.
robflop Posted May 25, 2010 Posted May 25, 2010 Well, recognizing this thread's age, I'd suggest to do the following to obtain full relative links using standard shortcuts:1. Make a new shortcut to: cmd.exe /c2. Now open properties. You will find cmd.exe autocompleted with an absolute path to cmd.exe Delete the content of the "Start in:" field.3. Append the full path in the "Target:" field with your own relative path and app, e.g. %windir%\system32\cmd.exe /c start your_relpath\app.exe [your_args]That's it. On some other URLs solutions of this kind are presented, too. However, doing so does not change the current working directory for the called program. If that is desired, then the modification should be as follows:3. %windir%\system32\cmd.exe /c "cd your_relpath && start app.exe [your_args]"For an explanation of && simply enter cmd /? in a command window.Note 1: Putting anything like "%cd%\your_relpath\" in the "Start in:" field does nothing at all.Note 2: A short flash of a console window popping up as in batch files will occur. This can be avoided by setting Run: minimized.Note 3: An icon must still be referenced absolutely.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now