Board logo

标题: [系统相关] 如何让批处理调用当前的explorer.exe去执行某个程序? [打印本页]

作者: hijackle    时间: 2017-5-18 17:51     标题: 如何让批处理调用当前的explorer.exe去执行某个程序?

  1. @echo off
  2. explorer.exe c:\windows\system32\cmd.exe
  3. pause>nul
复制代码
win7下面运行这个批处理启动cmd.exe,如果让他只调用当前的explorer.exe进程去启动cmd.exe而不是一个新的explorer进程去启动cmd.exe
就是要让启动的cmd.exe的父进程是当前的explorer达到和我们去c:\windows\system32双击cmd.exe一样的效果

求高手指教,谢谢。
作者: hijackle    时间: 2017-5-18 18:03

就是比如我想模拟双击启动某个aaa.exe,就是让这个aaa.exe的父进程是当前系统的explorer进程,批处理可以实现吗?
作者: xxbdh    时间: 2017-5-18 18:38

可以试试 start  c:\windows\system32\cmd.exe
作者: hijackle    时间: 2017-5-18 18:58

可以试试 start  c:\windows\system32\cmd.exe
xxbdh 发表于 2017-5-18 18:38



    用start的话,父进程肯定是cmd.exe而不是explorer.exe




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2