Incorrect silent installation on Windows 2008 Enterprise:
Command: apache-tomcat-6.0.26.exe /S /D=c:\tomcat
Tomcat files are copied to "c:\Program Files" instead of "c:\tomcat"
The installation works fine on Windows XP and Windows 2003 Server systems.
Following response from apache/tomcat team: ASF Bugzilla – Bug 50140
http://svn.apache.org/repos/asf/tomcat/trunk/res/tomcat.nsi (I assume this is the install script we are talking about) contains
Function .onInit
;Reset install dir for 64-bit
ExpandEnvStrings $0 "%PROGRAMW6432%"
StrCmp $0 "%PROGRAMW6432%" +2 0
StrCpy $INSTDIR "$0\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@"
And your bug report talks about x64 (https://issues.apache.org/bugzilla/show_bug.cgi?id=50140) so I'm guessing this is the issue.
I would suggest that you remove the InstallDir "$PROGRAMFILES\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@" line and replace the .onInit code with something like:
!include x64.nsh
Function .onInit
StrCmp "" $INSTDIR 0 skipinitinstdir
StrCpy $0 $ProgramFiles
${IfThen} ${RunningX64} ${|} StrCpy $0 $PROGRAMFILES64 ${|}
StrCpy $INSTDIR "$0\Apache Software Foundation\Tomcat @VERSION_MAJOR_MINOR@"
skipinitinstdir:
....
Either way, /D= just sets $instdir before any script code is called, anything after that is up to the script