Skip to content
⌘ NSIS Forum Archive

Why is silent mode ignoring option /D???

5 posts

byteloser#

Why is silent mode ignoring option /D???

My setup works like a charm except of the parameter /D in silent mode. I am executing my setup like:

setup.exe /S /D=C:\TestDir
I also tried

setup.exe /S /D="C:\TestDir"
without any success. The setup will always install to the directory I defined in the script file, which I did as followed:


...
InstallDir "$PROGRAMFILES\MyApp"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
...
What am I doing wrong here???

Thanks for your help.

Cheers!
Byteloser
Anders#
from the docs: "It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. Only absolute paths are supported.
"
byteloser#
I tried both versions (with and without quotes) and I always use /D= as last parameter. However, it just doesn't work 🙁

Cheers!
Byteloser
kichik#
Command line takes precedence over InstallDirRegKey. But if you edit $INSTDIR in .onInit, that's your responsibility.