Skip to content
⌘ NSIS Forum Archive

How to apply parameters to ExecWait?

10 posts

vbgunz#

How to apply parameters to ExecWait?

I tried applying the following parameter to ExecWait and though the script builds without errors, it doesnt' work as intended... I really need an idea on whats wrong...
ExecWait '"$INSTDIR\start.bat" "SW_SHOWMINIMIZED"'
I checked the documentation but I feel theirs something I just don't understand in regards to parameters... Is the above code correct and or maybe I have it in the wrong place (the file launches, just not minimized)?

Can someone please help me with thi question?

Thanks in advance 🙂
o_owd#
i don't think is possible to start an application minimized with ExecWait. try instead to start a shortcut to your start.bat and set the shortcut propreties to start minimized.

you can always use nsExec plugin.
the doc sais "nsExec will execute command-line based programs and capture the output without opening a dos box."
read the docs in your nsis\contrib\nsExec. hope it will help.
Afrow UK#
It is possible!
See here: http://nsis.sourceforge.net/archive/...ances=0,11,211

You should have seen that!

-Stu 😛
vbgunz#
Thank you o_owd,

I realized the quickest and dirtiest way I can possibly achieve the launching of the program would be to do so through a shortcut which already carried the parameters. In theory it should work but ExecWait will never even call the shortcut.

I haven't tried nsExec before as I never heard of it so thanks for the link. I read up on all the documents in the folder and it might seem like a contender but I am so far unable to get it to work... I might have the whole idea about it wrong in a sense, am not sure.

Thank you Afrow UK,

Thanks for the help on the previous thread in regards to INI field matching. Unfortunately I believe the document in which you linked me too hasn't yet applied the "SW_SHOWNORMAL, SW_SHOWMAXIMIZED and SW_SHOWMINIMIZED" parameters into the script. It says those are planned for the future.

I haven't tried it to prove anything but in a sense wanted to avoid the pains of frustration in case I would have indeed been chasing my tail if I had attempted to.

So in short this piece of code is non-existent
ExecWait '"$INSTDIR\start.bat" "SW_SHOWMINIMIZED"'
Cool, I didn't want to go crazy thinking I had it wrong all along...

Any more ideas about how to get ExecWait to start up minimized or even possibly hidden all together?

Thank you all for your time
deguix#
I had the same question since I put that function online (that the Afrow UK said)... How to do this?
vbgunz#
Hello Deguix,

Are you the creator of the script in which Afrow UK had linked me too? Correct me if I am wrong but the script hasn't yet been applied the ability to minimize an executable? Correct?

Thank you 🙂
deguix#
Yep, this is the only thing that I can not do now (See below the functions that I made until now, or that is based on ideas from some other functions or ideas, the best one for me is the "Advanced Search in String").

[EDIT] (I don't know if it is possible using "SendMessage" command) [/EDIT]
vbgunz#
Thank you Deguix,

Thank you for the script you've already made 🙂 I am actively trying to call nsExec after install on the finishpage and to call it again with a different command at uninstall.

I so far managed to use nsExec to call a file during install and it works beautifully. Now just get nsExec to work after install and before uninstall is the trick 🙂

Thank you again Deguix and everyone else for your time. It is absolutely and without a doubt appreciated.

Thanks again
kichik#
To execute a shortcut you need to use ExecShell. ExecShell also allows you to start a program minized so you don't need to create a shortcut.
vbgunz#
Thank you Kichik,

That is priceless information. Thank you very much for sharing that with me. Thanks again 🙂