Exec vs ExecWait vs ExecShell vs nsExec::Exec vs nsExec::ExecToLog vs nsExec::ExecToStack vs ExecDos

编程入门 行业动态 更新时间:2024-10-27 04:28:04
本文介绍了Exec vs ExecWait vs ExecShell vs nsExec::Exec vs nsExec::ExecToLog vs nsExec::ExecToStack vs ExecDos vs ExeCmd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我能知道每个Exec、ExecWait、ExecShell、nsExec::Exec之间有什么区别吗?, nsExec::ExecToLog, nsExec::ExecToStack, ExecDos 和 ExecCmd,分别在什么时候使用?

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

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

  • 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:就像 Exec 或 ExecWait 一样,但仅用于命令提示符,也无需打开控制台窗口.我不确定它是否等待进程退出.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)

    Exec 和 ExecWait 使用 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::Ex

    本文发布于:2023-11-07 06:53:46,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1565817.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:ExecShell   nsExec   Exec   ExecWait   ExecDos

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!