I have this software PC2Control which I want to taskkill. (Also I don't want to uninstall that)
taskkill /f /t /im PCControl2Client.exe :: success
But after like 1 second, it automatically starts again. I think it could be some Windows event.
This is one way to go, but its not really good way.
while($true)
{
$find = tasklist | findstr "PCControl";
if($find -eq $null)
{
Start-Sleep -Seconds 1;
}
else
{
taskkill /F /IM PCControl2ClientService.exe /T;
taskkill /F /IM PCControl2ClientUser.exe /T;
taskkill /F /IM PCControl2Client.exe /T;
}
}
Any ideas how to stop it?
EDIT
Found it for those who are wondering.
It was service with recovery options (thanks to Toni), which you can found by typing service
in search bar or powershell get-service
This will disable all recovery options using cmd.
SC failure <ServiceName> actions=""/1000/""/1000/""/1000 reset=86400