Exec vs ExecWait vs ExecShell vs nsExec::Exec vs nsExec::ExecToLog vs nsExec::ExecToStack vs ExecDos vs ExeCmd [英] Exec vs ExecWait vs ExecShell vs nsExec::Exec vs nsExec::ExecToLog vs nsExec::ExecToStack vs ExecDos vs ExeCmd

查看:124
本文介绍了Exec vs ExecWait vs ExecShell vs nsExec::Exec vs nsExec::ExecToLog vs nsExec::ExecToStack vs ExecDos vs ExeCmd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能知道每个ExecExecWaitExecShellnsExec::Exec之间有什么区别吗?, nsExec::ExecToLog, nsExec::ExecToStack, ExecDosExecCmd,分别在什么时候使用?

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..

  1. Exec:简单地执行被调用的字符串,无论是应用程序、控制台还是文件.

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

ExecWait:像 Exec 一样执行,但一直等到进程退出.

ExecWait: Executes like Exec but waits till the process exits.

ExecShell:它有什么用?

nsExec::Exec:就像 ExecExecWait 一样,但仅用于命令提示符,也无需打开控制台窗口.我不确定它是否等待进程退出.nsExec::Exec 是否等待子进程退出?

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?

nsExec::ExecToLog:文档说 ExecToLog 类似于普通的 nsExec,但它输出到日志窗口.这是什么意思,什么是日志窗口?

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?

nsExec::ExecToStack:文档说ExecToStack 类似于普通的nsExec,但它将输出推入堆栈.我明白了.

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

ExecDos:与 nsExec::ExecToStack 相同,但它另外(不是?)

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

一个.采用字符串参数作为标准输入来运行应用程序.

a. takes string parameter that serves as stdin for running application.

B.可在同步/异步模式下工作.

b. works in both sync/async mode.

c.它适用于部分 - 用于 .onInit 签出.

c. it works out of section - for .onInit check outs.

ExecCmd:与 ExecDos 相同,但不需要这些

ExecCmd: Same as ExecDos but it doesn't require these

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

零件.我说得对吗?

推荐答案

1) 2) 3)

ExecExecWait 使用 CreateProcess 内部,只能启动程序和批处理文件.

Exec and ExecWait use CreateProcess internally and can only start programs and batch files.

ExecShell 使用 ShellExecute 这意味着它还可以启动任何已注册的文件类型(.txt .chm 等)和 URL.如果您开始的程序需要使用 UAC 提升,也应该使用它.

ExecShell uses ShellExecute which means that it can also launch any registered filetype (.txt .chm etc) and URLs. It should also be used if the program you are starting needs to elevate with UAC.

4)

nsExec 重定向标准输出,因此在子进程执行时控制台窗口不可见.是的,它在等待.

nsExec redirects stdout so a console window is not visible when the child process executes. And yes, it waits.

5)

instfiles 页面上的日志窗口.

The log window on the instfiles page.

7)

是的,ExecDos 和 ExecCmd 都是 nsExec 的更高级版本.

Yes, both ExecDos and ExecCmd are more advanced versions of nsExec.

8)

正确

这篇关于Exec vs ExecWait vs ExecShell vs nsExec::Exec vs nsExec::ExecToLog vs nsExec::ExecToStack vs ExecDos vs ExeCmd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆