|
|
#1 |
|
Junior Member
Join Date: Mar 2008
Posts: 12
|
Spaces in $INSTDIR path causes problems
When a user selects an install directory that has spaces in the path (i.e., C:\Documents and Settings it is causing me multiple problems.
For example, I have the following piece of code in my script to create a start menu item that kicks off a Java application. When there are no spaces in the install directories path, it works perfect. When there are spaces, it fails. CreateShortCut "$SMPROGRAMS\KAST\MyJ******gram.lnk" \ "$INSTDIR\cots\jre\bin\javaw.exe" \ "-cp INSTDIR\config;$INSTDIR\lib\rjicons.jar;$INSTDIR\lib\kast-flashback.jar;$INSTDIR\lib\kast-core.jar kast.client.CommandLine watchdog" \ \ "$INSTDIR\installer\images\earth.ico" "0" Hopefully the formatting will look ok on that. Two things happen when there is a space: 1) The icon (earth.ico) does not show up on the start menu item. 2) The java application will not execute. Instead an error message is shown which says "Can't find main class". Thanks, Kennedy |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Instead of using full paths to your Java archives, just use paths relative to $INSTDIR and use SetOutPath $INSTDIR before you create your shortcut so that the working directory is set.
Edit: What happens when you try to find the icon from the shortcut properties. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2008
Posts: 12
|
Isn't that exactly what I'm doing? I'm using the $INSTDIR variable in the line that creates the shortcut, so I assumed that everything was relative to that.
I think maybe I am misunderstanding the use of the term "relative". Is that the case? |
|
|
|
|
|
#4 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Maybe you need to put quotes around the individual filenames. Check the documentation of javaw.exe.
|
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Yes you misunderstood.
code: Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Mar 2008
Posts: 12
|
Thanks for your help Stu. I really appreciate it.
-Kennedy |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|