Archive: space problem in path in .nsi file


space problem in path in .nsi file
Hi,
I have a installer.nsi file. It contains the line
!define TOMCAT_INSTDIR "$PROGRAMFILES\Apache Software Foundation\Tomcat 5.0"

when i click this nsi file it creates Tomcat 5.0 in C:\Program Files\Apache Software Foundation\Tomcat 5.0 folder.

But i want no spaces between path.Because my application only works fine without spaces in path.Iam also tried to change this path.Its not working.(I tried !define TOMCAT_INSTDIR "C:\Tomcat5.0" instead of !define TOMCAT_INSTDIR "$PROGRAMFILES\Apache Software Foundation\Tomcat 5.0").

Here Tomcat is not properly installed.some folders missing.
(bin folder also).

so,Is there any way to correct this?

thanks,


I'm not sure where the missing files come from, but I supect probably some other logic in your script that has nothing to do with how TOMCAT_INSTDIR is defined.

As for your question about spaces, you could use a callback function to check for spaces during the user's directory selection (if that is being used.) Then, if spaces are there, politely tell the user (with a message box) that they can't pick that path.

Another alterntive is to use the Windows short name property of the EXE path and write that to the registry, shortcuts, etc. I'm not sure if there is an external DLL call to do this, but I know in Windows scripting (JScript or VBScript), there is a call you can make to get the short (8.3) file name from Windows. It truncates the name using a tilde (~). (Example: C:\program files becomes C:\progra~1).
See http://windowssdk.msdn.microsoft.com.../htyh9b2z.aspx or http://windowssdk.msdn.microsoft.com.../tes8ehwe.aspx

Some other brainiac in this forum might be able to help you make an API call of some type using the system plugin. Or perhpas there's already a similiar function somewhere in the NSI S dev pages.


RE:Space problem in path
Hi,
thanks for your response.Here i attached my installer nsi file.If you can find this problem,please reply immediately.
thanks,