Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 29th July 2012, 11:02   #1
nawfal
Junior Member
 
Join Date: Jul 2012
Posts: 22
Exec v ExecWait v ExecShell v nsExec v ExecToLog v ExecToStack v ExecDos v ExeCmd

Can I know what are the differences between each Exec, ExecWait, ExecShell, nsExec::Exec, nsExec::ExecToLog, nsExec::ExecToStack, ExecDos and ExecCmd, as in when to use which?

I 've posted the various execute calls I know. I am trying to make a comprehensive list, so that it helps future visitors..
nawfal is offline   Reply With Quote
Old 29th July 2012, 11:05   #2
nawfal
Junior Member
 
Join Date: Jul 2012
Posts: 22
1. Exec:

Plainly execute the called string, be it some application, console or file.

2. ExecWait:

Executes like Exec but waits till the process exits.

3. ExecShell:

What is it for?

4. nsExec::Exec:

Just like Exec or ExecWait but only for command prompt and that too without opening the console window. I am unsure if it waits for process to exit. Does nsExec::Exec wait for child process to exit?

5. nsExec::ExecToLog:

The documentation says ExecToLog is similar to plain nsExec but it outputs to log window. What does that mean, what is a log window?

6. nsExec::ExecToStack:

The documentation says ExecToStack is similar to plain nsExec but it pushes output to stack. I get that.

7. ExecDos:

Same as nsExec::ExecToStack but it additionally (Is it not?)

a) takes string parameter that serves as stdin for running application.
b) works in both sync/async mode.
c) it works out of section - for .onInit check outs.

8. ExecCmd:

Same as ExecDos but it doesn't require these

code:
ExpandEnvStrings $3 %COMSPEC%
ExecDos::exec /C



parts. Am I correct?
nawfal is offline   Reply With Quote
Old 29th July 2012, 11:45   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
3. ExecShell: http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.3
It's to open, say, a .txt file using its associated program (normally notepad).

4. Why don't you just try it and see?

5. It's for console applications without a graphical interface, normally executed from a command shell (cmd.exe).
MSG is offline   Reply With Quote
Old 29th July 2012, 12:04   #4
nawfal
Junior Member
 
Join Date: Jul 2012
Posts: 22
3. thanks I get it.

4. Yes I found it to be waiting!

5. Again, understood.
nawfal is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
commandline execute, exec, execwait, nsexec, shell exec

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump