Archive: Path in web application


Path in web application
Hi all,

I am making an installer for web application. I use Tomcat to run it.
I wonder how can I know path 's tomcat to install my application on C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\mywebapplication.
I also use ReadRegStr to know this path but I can only put it on my section or function.When I execute it, $INSTDIR in my installer is empty. I think my section or function is not run before MUI_PAGE_DIRECTORY.
Also, I can not set $INSTDIR "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\mywebapplication"
because user can change this path in spite of $INSTDIR "C:\Tomcat5.5\webapps\mywebapplication"
Somebody use to see this problem, please help me!
Thank a lot,
My word is too bad, if you do not understand,please tell me!!!


Hi sunlight112!

Put your detection code in the function .onInit. This function is executed before everything else.

Use


StrCpy $INSTDIR "c:\my\install\dir\"

to set the path that has to be displayed in MUI_PAGE_DIRECTORY.

http://nsis.sourceforge.net/Docs/Chapter4.html#4.2.2

Cheers

Bruno

Thank bholliger for your quick reply,
:)