...
The option /D is mandatory and points to the installation directory. It is important to note that the /D option must be the last parameter on the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported. Use an equal sign to separate the option and the path.
Example: groovy-1.5.6-installer-2.exe /S /A /N /D=d:\program files\groovy
Working with the installer source
...