Ajinkya
Ajinkya

Reputation: 1711

Running console app with parameters from NSIS installer

I am creating one installer for my project. Deployment of project needs some changes that are too complex with NSIS.

So for making it easy I have written one console app in C#. This app will do all the complex changes required with use of some parameters.

I just want to ask what is the way to call this console app with some parameters from my installer?

Is it possible by creating some batch file or what?

Upvotes: 2

Views: 2063

Answers (2)

Anders
Anders

Reputation: 101764

ExecWait '"$instdir\myapp.exe" /foo "hello world" /bar' is the basic method.

Use nsExec if you want to hide the console window and ExecDos or ExecCmd if you need more control...

Upvotes: 2

SirDarius
SirDarius

Reputation: 42969

You have several options to execute programs from NSIS, as documented here: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.2

Exec : Execute the specified program and continue immediately

ExecShell: Execute the specified program using ShellExecute

ExecWait: Execute the specified program and wait for the executed process to quit

the last solution is probably what you need.

Upvotes: 0

Related Questions