Jump to content
Sign in to follow this  
Mdarby

killing a process

Recommended Posts

So i have a script that currently updates zoom however, if a client has it open then it will not perform the update. I need to add a step in the script to check if zoom is open and then to kill the process if the client has it open. I tried doing a shell command of taskkill/im Zoom.exe /f because that worked in the command prompt but its not working in automate. has anyone done something like this for a script?

Share this post


Link to post
Share on other sites

Taskkill should work but.....Have you tried 'Process Kill' in the Script?  (After an "IF Process Exists")

 

Share this post


Link to post
Share on other sites
Posted (edited)

 Add the /f switch in your command. taskkill /f /im zoom.exe. I have a step that uses the 'Execute Script' function with that command and run it as the local agent and it works like a champ.

Edited by EliteR

Share this post


Link to post
Share on other sites
2 hours ago, tvarvais said:

Taskkill should work but.....Have you tried 'Process Kill' in the Script?  (After an "IF Process Exists")

 

I have not. I will try that however i just wondering why the shell command wouldn’t work as well?

Share this post


Link to post
Share on other sites
2 hours ago, EliteR said:

 Add the /f switch in your command. taskkill /f /im zoom.exe. I have a step that uses the 'Execute Script' function with that command and run it as the local agent and it works like a champ.

I did just “Shell” but I could try shell as local or whatever they call it in automate. But I do have /f in my command. I put that in my original post 

Share this post


Link to post
Share on other sites
Posted (edited)
Quote

I did just “Shell” but I could try shell as local or whatever they call it in automate. But I do have /f in my command. I put that in my original post 

 

Sorry, meant to clarify about the /f command. Tested this morning and Shell does work but the /f placement did matter. If I use taskkill /im zoom.exe /f then it never closes Zoom. If I use task kill /f /im zoom.exe then it runs as expected. 

Edited by EliteR

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...