如何代表 Perl 中的进程完成 Win32 中的进程?
例如,拥有 rschit 进程 Excell.exe 意味着 Perl。
For example, to have rschit process excell.exe means Perl.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
例如,拥有 rschit 进程 Excell.exe 意味着 Perl。
For example, to have rschit process excell.exe means Perl.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
如果这是关于自动化后仍处于“服务器模式”的进程,您只需调用应用程序对象上的
quit
方法即可。我通过 如何在使用 Perl 打开的 Excel 文件中运行宏? 以包含该宏。 (您知道,我想如果我告诉您这是一个Application
对象,您可以阅读 该对象的 MS 文档 以确定您想要执行的操作。)但是,您可以使用
taskkill 终止 Windows 中的进程。 exe
.您可以通过在命令行中输入taskkill /?
来阅读。它将处理taskkill /IM excel.exe
。但如果您想要特定的PID,则需要使用
tasklist.exe
。 (在命令提示符处键入tasklist
以查看输出。或者键入tasklist /?
以获取更多信息。)下面的代码同时使用了两者:
If this is about the process remaining around in "server mode" after automation, you can just call the
quit
method on the application object. I edited by answer at How can I run a macro in an Excel file I open with Perl? to include that. (You know, I thought if I told you that it was anApplication
object, you could read the MS documentation on that object to figure out what you wanted to do. )However, you can kill a process in windows with
taskkill.exe
. You can read up by typingtaskkill /?
on the command line. It will handletaskkill /IM excel.exe
.But if you want a specific PID, you need to use
tasklist.exe
. (Typetasklist
at the command prompt to see the output. Ortasklist /?
for more information.)The code below uses both:
您是否尝试过向“taskkill /IM excel.exe”发出系统调用?
have you tried to fire a system call to "taskkill /IM excel.exe" ?