Hard coded would be fine. I'm coming from a corporate / controlled environment viewpoint.
I was just dealing with an app that is a single executable - and runs well from a network share. Most of it's registry info goes under HKCU, but unfortuneately, it needs to set a few HKLM registry entries for "global" values.
I needed and MSI for group policy deployment because most users only have "user" rights to the workstation.
All the MSI really needed to do was set three HKLM registry entries for the app and install shortcuts in the start menu startup and program folders pointing to the network hosted .exe.
I'm trying to make an MSI file to install a java jar file and create a shortcut for it.
The target of the shortcut needs to be along the lines of:
%systemroot%\system32\java.exe -jar [insert path to jar file].
I've sort of got around this by making a shortcut on my system and then adding this file to the shortcut section of Avanced Installer.
It would also be handy if it was possible to name a file (maybe specifying a checksum or version check too) for the install to search for and incorporate into the shortcuts.
That way it could find Sun Java 1.3 or 1.4 and point the shortcuts at that rather than Microsoft's JVM.
If you're creating a shortcut to a java application, I suggest creating a project of type Java Application. It has built-in support for JRE finding, etc.
Otherwise, the way you are trying is fine, but very error prone (what if the user installs the JRE after your app, etc.)
Shortcut to programs already installed on the target machine are on our todo list.