Script /.bat to kill certain process on all users logged in to the computer

Asked

Viewed 19,198 times

1

Well, folks, my problem is this: I have a process called gdc.exe. If a user has this process open and another user logs into the machine and tries to run the program that generates this same process, he cannot open the program. I need a .bat or a script that kills all open processes with that name, not only on the user you are using (preferably not requiring administrative rights), but on everyone who is logged in to the machine. I’ve looked around but couldn’t find anything to help me.

2 answers

1

You can kill all processes with the name gdc.exe you can use the command taskkill:

taskkill /f /im gdc.exe

So that the taskkill end the processes by running under other users you accurate execute the command as administrator.

  • yeah, I know you can use taskkill, but there is some way to create a bat with the administrator credentials so the user can run when they want?

  • @Mathi901 You didn’t ask for this. Edit your question and add this information.

  • @Mathi901 the problem of creating a bat like this is that anyone can open it and see the admin credentials, and if you create a bat file that can only be run by admin tbm will not solve your problem

  • there is no command to at least encrypt the password?

0

create another bat and use this, if your network has a domain can help

runas /env /savecred /nome-do-usuario-administrador@dominio "caminho do bat que mata o processo"
after running just you enter the Administrator’s password once and then not will be necessary to type again.

  • @Mathi901, using Runes does not solve your problem?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.