Setup Factory 9 关闭程序脚本

来源:互联网 发布:淘宝订单体检清洗 编辑:程序博客网 时间:2024/05/17 01:33

//////////////假设程序名称为aaa.exe, Setup Factory 9 关闭它,只需要下面代码就行



strName = "aaa.exe";

tblProcesses = Window.EnumerateProcesses(false);
bProcessFound = false;
nProcessHandle = nil;
if(tblProcesses)then
for nHandle, strProcessName in pairs(tblProcesses) do
  if(String.Find(strProcessName,strName,1,false) ~= -1)then
   nProcessHandle = nHandle;
   bProcessFound = true;
   break;
  end
end
end

if(bProcessFound and nProcessHandle)then
Window.Close(nProcessHandle,CLOSEWND_TERMINATE);
end
0 0
原创粉丝点击