Since there´s no Tips & Tricks forum, I assume the better place to post may be here.
I´ve seen a lot of people asking how to create shortcuts with relative paths in windows, some say it´s just no supported etc etc At the end of the day there are several ways, like creating a windows shortcut files (.ink) or using a bat file wich can be converted to an exe with an icon file. Anyway non of both are ideal / have several disadvantages, so I´m going to share a method that works great for me and hopefully it may be useful for you as well.
- First we will need an Application called Portabilizer
You can get it from here http://www.mystercrowley.com/portabilizer.php - Now install it
- As you can see from this screenshot,
http://www.mystercrowley.com/img/screenshots/portabilizer.png
It´s a pretty straightforward app. OK, so we should now fill in the fields and here are some important details. After giving the name you want be sure to set a relative path in the launch target field i.e if your App exe is in E:\PortableApps\App.exe you may get something like \PortableApps\App.exe.
What about if you want your shortuct to have a specific paramter, well then add the parameter in the "parameters" field but add an space before it, otherwise it may not work.
For the last select the icon (it must be in .ico format) and the output folder. Note that the shortuct will only work if it´s being run from the same drive you have your App.exe - Click in Start and you just did it! ^^ You have a nice exe shortcut with a custom icon and relative path
Note: You may notice that the newly created shortcuts have the name of the Portabilizer author on the organization field. Well in the unlikely case you may want to customize that as well, grab Resource Hacker Portable from here
http://www.angusj.com/resourcehacker/
Open the exe shortcut with it and go to the version info tab like in this picture
http://www.raymond.cc/images/hacking-windows-live-messenger.png (courtesy of Raymond.cc), make the changes you want, select compile script and you are set.
Cheers
Phil D.
Portablizer doesn't actually portablize anything.
You can already do this in the PortableApps.com Menu by dropping an EXE in the right place on your drive. You can even do this with command line parameters and a custom icon just with a couple files in AppInfo, no 3rd party software required.
Sometimes, the impossible can become possible, if you're awesome!
No it doesn´t, I´m just using it here for creating the shortcut.
Hum just realized that I didn´t expressed myself clearly in the title, I´m going to update it. The idea is for creating shortucts with relative paths, not for adding your app with realtive path to your PAM Menu. i.e I want different shortcuts that runs the same app with different parameters, wich in turn can be added to PAM´s Menu, but that´s another story.
Use Cylog Toolbox. The latest beta is stable, supports relative paths, is natively portable, supports a custom "Open With...", supports command-line parameters, supports drag-and-drop, supports different image types for icons, yadayada, it's da bomb.
http://www.cylog.org/utilities/toolbox_beta.jsp
If you don't like betas, I'm pretty sure the stable version supports all of the above, too.
And it's free.
And it's portable.
I made this half-pony, half-monkey monster to please you.
Hey,it's nice,that's what i was looking for.

Good for running as administrator with relative path shortcuts.
Tested OK
It's actually very easy to make a shortcut on the PAM to a batch file directly, without using bat2exe or any other conversion utility.
Create the PA Format folder structure, and create a simple
...App\Appinfo\Appinfo.ini file, and an appicon.ico
You can configure the relative path to the batch file (or any other file) in the [Control] section.
The icon will appear in the menu and activate whatever is on that relative path.
There's a little more detail than that, but not much.
I made this half-pony, half-monkey monster to please you.
It's much easier to just use the portable freeware Relative. Alas, it's a command line utility so it's not meant for newbies.
since this need to be placed in position within the windows env variable PATH, so need to be copied to the host system to proper place first.
Otto Sykora
Basel, Switzerland
It's true for any portable command line program. You can also just call it from its own folder every time.
If you know the location of the app you can specify it's path when running it without modifying the PATH variable. Or create a short cmd script to reduce the typing.
Ed
If you know the location of the app you can specify it's path when running it without modifying the PATH variable. Or create a short cmd script to reduce the typing.
Ed
The same relative shortcuts that work in Windows XP fail in Windows 7 (and probably in Windows Vista as well).
This means this topic needs a different solution.
These are examples of what I was talking about.
The first is a way to make shortcuts to folders. ALL IT IS is a simplified PA Format folder structure. The only files are the appinfo.ini and appicon.ico files - although I added a help file too. Since appinfo.ini supports relative paths, you just need to put in the correct path in the [Control] section of appinfo.ini.
You can also put relative paths to programs - they will function with the typical file associations of Windows.
All I did was package it as a .paf.exe file.**
http://paskins.sourceforge.net/miniapps.html#Folderz
This second is basically the same, but includes a batch file, which starts two apps simultaneously. It's a pretty good example of how you can directly start a batch file, and how batch files support relative paths.
http://paskins.sourceforge.net/miniapps.html#Quickstart
So simply, if you are using the PortableApps Platform, you can make shortcuts to almost anything WITHOUT any additional apps.
You don't need an exe to start a batch AT ALL!
You don't need to do anything with the PATH!
Just the appinfo.ini.
** If you want to do it manually, it is simplicity itself.
Look here: https://portableapps.com/node/20498
I made this half-pony, half-monkey monster to please you.
the easiest way to make real windows shortcuts (lnk, not exe cmd files) in automated way
small program to be launched from command line, that makes shortcut of a specified file
http://www.xxcopy.com/xxcopy38.htm
the syntax is very simple:
xxmklink [the path and name of shortcut to be created] [the path to the program/file] [arguments for program to run, in double quotes, if no arguments put ""] [path to working directory (start in)]
...and it's done
use switch /q for no output messages, use double quotes for paths and names with spaces between, use system variable path or relative path if need
This is a topic about shortcuts with relative folders. The program you linked to ("XXMKLINK") has nothing to do with this. It's a regular shortcut maker, unlike the aforementioned "Relative" program.
As a side note, XXMKLINK does support "%path%"s which is better than Windows' shortcut maker. But it's neither relative nor actually works (such links are broken at least in Windows XP).