Taskkill退出代码:255 [英] Taskkill Exit code : 255
本文介绍了Taskkill退出代码:255的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图通过SCCM 2012分发软件;在vbs中运行一个简单的命令,以结果代码255结束。
I'm trying to distribute software through SCCM 2012; running a simple command in a vbs, ends with the result code 255.
示例:
WshShell.run ("TASKKILL /F /IM """ & processname & """ /T", 0, True)
返回255后,脚本停止并且不安装软件。
After returning 255, the script stops and doesn't install the software.
有人遇到这个问题?代码255是什么意思?
Someone had this problem? What does the code 255 mean?
谢谢。
推荐答案
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_Process")
For Each objItem in colItems
'msgbox objItem.ProcessID & " " & objItem.CommandLine
If objItem.name = "Calculator.exe" then objItem.terminate
Next
是如何终止vbscript中的程序。
Is how to terminate programs in vbscript.
这篇关于Taskkill退出代码:255的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文