Archive: Silent install target path?


Silent install target path?
My question is pretty simple, is there a way to define where a silent install should install the program to? I would like to implement Mumble(mumble.sourceforge.net) into my installation package but I want it to install into a different folder than the default


If the installer was made with NSIS, do it like:

ExecWait '"$EXEDIR\Installer.exe" /S /D=$INSTDIR'


Note that /D must be the *last* parameter!
Also the target path must NOT be put into quotes, even if it contains spaces!

Thanks! btw is there any list online with the arguments? I'm also looking to not letting it create shortcuts, then it's perfect :p


It's all in the NSIS docs :mad:

But as far as I know, there is no "official" commandline switch to prevent an installer from creating shortcuts. Of course an installer could implement that with custom code: Simply check for a certain commandline argument, e.g. /NOSHORTCUTS, and skipt creating shortcuts if found. But a "normal" installer won't offer an option like that...


Hi guys!

I was looking for the same solution.
I also want to run a silent install of another setup and define the place where the program should be installed.
The only difference is that I want the program to be installed in the same main directory as a user chooses for my own application.
For example: a user chooses to install my application in "E:\Program files\MyApp" so I want the external program to be also installed in "E:\Program files\ExtApp"

Thank you for your advices.


It seems that you might need to provide more details of what applications you are trying to install. If these are applications you wrote or you wrote the installer than you can simply create a log or create a registry key(probally better) for MyApp containing the install directory which can later be read by the ExtApp installer.


Hi!

Thanks for your reply pbingel.
Well, both installers are written in NSIS although the second one (the one that I want to execute in silent mode) is not mine and I'm not allowed to change its code.


It still really depends on what you are installing. Basically you need some way of retrieving the install directory of MyApp. Are you planning on embedding the installation of ExtApp in the installation of MyApp? If so this might work. At some point in your script $INSTDIR should be set during the installation of MyApp. Use a message box to print it out after the installation of MyApp
MessageBox MB_OK "$INSTDIR". If the directory is correct,in the same script after the installation of MyApp completes you can modify the code that LoRd_MuldeR provided to install ExtApp.

...Sorry if my answer seems rushed or unorganized buts its 5pm here time to go home!!


Thanks pbingel.

Originally posted by pbingel
Are you planning on embedding the installation of ExtApp in the installation of MyApp?
Yes.

Originally posted by pbingel
If the directory is correct,in the same script after the installation of MyApp completes you can modify the code that LoRd_MuldeR provided to install ExtApp.
I tried to use the code provided by LoRd_MuldeR. Using this code ExtApp has been installed into MyApp installation directory. So all files from ExtApp went to MyApp install dir.
The result I want to get is to install both applications in separate directories but in the same main directory (but dependently on what main directory is chosen by a user).
For example:
When installing MyApp a user chooses
C:\Program files\MyApp
as the place where he wants to install MyApp

So I want ExtApp to go to:
C:\Program files\ExtApp

...Sorry if my answer seems rushed or unorganized buts its 5pm here time to go home!! [/B]
And it's almost midnight here :)
I'm really glad you decided to help me nonetheless.

In that case you need to modify your relative path to move up one folder and install to the proper folder

Reference for relative paths
Edit: Url doesn't show up, Google "nsis relative path", should be first result

ExecWait '"$EXEDIR\Installer.exe" /S /D=$INSTDIR\..\ExtApp'


The \..\ goes up one folder. That should work. Good Luck

Excellent help!
Your solution works perfectly.
Thank you so much.
Have a nice day.