gpt4 book ai didi

vbscript - 如何在vbscript中终止进程

转载 作者:行者123 更新时间:2023-12-04 02:38:21 25 4
gpt4 key购买 nike

如何使用 vbscript 终止进程。请注意,我需要终止在 windows 64 位环境下作为 native 64 运行的进程(不使用 select * from win_32_Process)

谢谢,

最佳答案

Win32_Process 当脚本从 64 位命令 shell 运行时,类提供对 32 位和 64 位进程的访问。

如果这不适合您,您可以尝试使用 taskkill 命令:

Dim oShell : Set oShell = CreateObject("WScript.Shell")

' Launch notepad '
oShell.Run "notepad"
WScript.Sleep 3000

' Kill notepad '
oShell.Run "taskkill /im notepad.exe", , True

关于vbscript - 如何在vbscript中终止进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1790340/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com