Reputation: 346
I create installer file by NSIS.I want get installation directory by commandline. I used syntax such as /D=E:\ or /D=E: but installation directory any changed.
Upvotes: 1
Views: 3815
Reputation: 346
I create uninstaller file but uninstaller can not clean files.
ExeWait '"$INSTDIR\Farayand\FarayandLibrary\dokanctl.exe" /r a' $0
RMDir /r $INSTDIR\Farayand\FarayandLibrary
RMDir $INSTDIR\Farayand
${if} ${RunningX64}
${DisableX64FSRedirection}
Delete $SYSDIR\drivers\dokan.sys
${EnableX64FSRedirection}
${Else}
Delete $SYSDIR\drivers\dokan.sys
${ElseIF}
dokan.sys cleaned when uninstall run.but farayandLibrary folder and content in folder dont remove.
Upvotes: 1
Reputation: 101636
Use /D
(It must be the last token on the commandline and it must be a unquoted absolute path):
MySetup.exe /S /D=C:\Program Files\Foo Bar\Baz
If you want to allow installs to the root of a volume you need to put AllowRootDirInstall true
in your script.
Upvotes: 1
Reputation: 5472
/D switch is intended for Silent installs.
Use InstallDir from your script to change directory.
Upvotes: 1