I have a task in which whenever an application is running, and when I run upgrade of that application then the application should be removed from processes else it will throw licenses error as some of the licenses are attached to that application process. Now I have created VB Script code to kill that particular application process and it is working fine in my local environment in windows 7. But when I try to run same code on QA environment in windows 7 then process is not killing anyhow. I tried many things like killing using administrator rights,created logs but not getting any hint where I am missing out.
Currently I am not having code if someone wants to check the VB Script code then I am updating the question after sometime.
If anyone have any information regarding this please suggest me...
Thanks in advance.
Refer below code:
Option Explicit
DIM FileObject
On Error Resume Next
set FileObject = CreateObject( "WScript.Shell" )
FileObject.Run "TaskKill /F /IM Program1.exe", , True
FileObject.Run "TaskKill /F /IM Program2.exe", , True
FileObject.Run "TaskKill /F /IM Program3.exe", , True
FileObject.Run "TaskKill /F /IM Program4.exe", , True
FileObject.Run "TaskKill /F /IM Program5.exe", , True
FileObject.Run "TaskKill /F /IM Program6.exe", ,True
In above code, Program1 and Program6 are closed successfully from task manager but not other programs.
Note:- Above code is working fine when I explicitly running vb script file but when I include that script code in my upgrader exe then it is killing only program1 and program6.