Skip to content
⌘ NSIS Forum Archive

Opening program with parameters

3 posts

ascTim#

Opening program with parameters

Hello!

The situation is: I have a program, which has 3 text fields (username, password and database). What I want to do right now is:
Starting my program.exe via NSIS while giving the three parameters (name, password, database) from variables.
My code currently looks like this:

${ConfigRead} "$INSTDIR\path\to\file.ini" "Db1=" $R1
So I save the database name in the variable "$R1". The username and password will always be the same, so I can manually set them.

My question: How can I start the programm.exe with 3 manually set parameters? Is it even possible? Hope you do understand what I mean...

I'm new to this forum so if I forget to tell you about some information, feel free to ask me.


Best regards,

Tim
Anders#
You should read the entire NSIS help file to get a feeling of which commands exist and when to use them.

ExecWait '"$InstDir\MyApp.exe" "user name" -pwd😛assword /database "$R1"'
ascTim#
Hi Anders,

Thank you for your reply, the code worked fine!
I'm kinda new to NSIS and got some time pressure, so I thought this would be the fastest solution. I'll read through the NSIS help to get the feeling.

Best regards,

Tim