![]() |
CreateShortcut prepends system32
Hi ho,
I am trying to create a shortcut to launch java and point it at my jar. CreateShortCut "$SMPROGRAMS\BuckoFIBS\BuckoFIBS.lnk" 'java' "$INSTDIR\[JARFILE]" "" 0 This ends up pointing at c:\windows\system32\java.exe where i have no java installed. In the FAQ, http://nsis.sourceforge.net/I_am_hav...CreateShortcut i end up with c:\windows\system32\notepad.exe. How do i keep nsis from prepending or altering the target file? thanks dik |
Add the correct path yourself. You have just 'java', but you can't do that. Shortcuts require a complete path, you can't even do relative paths when you create a shortcut with the Windows UI.
|
Maybe like this:
code: This way the commandline interpreter (cmd.exe) will execute the command. As long as "java.exe" can be found in %PATH%, this should work... |
Quote:
I would prefer doing a .jar like this because then i don't care what version of java the user has; and when he upgrades his java and suddenly c:\program files\sun\java-6u1.5 is gone and replaced with c:\sun\appserver\jre, i don't care; all i care about is which java is in the path. dik |
there are several java launchers projects on sf.net, why not use one of those, then you don't have to hope that java[c].exe is in the path
|
I ended up doing the "detect where java is" thing, modeled after http://nsis.sourceforge.net/Get_full_Java_version .
The sf java launchers i saw were all 'conceptual' for 5 years now; or one that was complete, gave no samples or instructions. |
| All times are GMT. The time now is 04:27. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.