Portable

[ThinApp] 종료시 프로세서도 끝내기 (vbs)

홍사훈     0건     254회

본문

다음을 임의의 파일 (ex, ProcessKill.vbs)로 저장하고, pkckage.ini 파일이 있는 경로에 복사해줍니다.

 

Function OnFirstParentExit

 

    Dim objWMIService, objProcess, colProcess

    Dim strComputer, strProcessKill

    strComputer = "."

    strProcessKill = "'TC 2019.exe'"

 

    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = " & strProcessKill )

 

    For Each objProcess in colProcess

        objProcess.Terminate()

    Next

 

End Function

 

 

 

출처 : https://virtuallyjason.blogspot.com/2012/05/thinapp-scripts-and-killing-lingering.html

등록된 댓글이 없습니다.



Copyrightⓡ1996~2024, sahoon.com All Rights Reserved.