当前位置: 首页 > 工具软件 > Setup Factory > 使用案例 >

setup factory 结束进程

袁山
2023-12-01

直接在你要执行操作的地方写代码:

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

if(bProcessFound and nProcessHandle)then
Window.Close(nProcessHandle,CLOSEWND_TERMINATE);
end

 类似资料: