Questions

Batch file; kill task on remote system

+
0 Votes
Locked

Batch file; kill task on remote system

tmalo627
If anyone can help me out here, that would be great. I have a few computers running XP Pro SP2. They are in a workgroup environment. What I am trying to do is run a batch file from one machine to kill a task on another.

My ultimate goal is for backup purposes. We have one machine hosting a database. I want to be able to kill the applications on the other machines that are accessing those files before the scheduled backup runs.

I am trying to run taskkill from a command line to test my syntax before I save it to a file. So far what I've come up with is to run
taskkill /s l01wkst01 /u "IT Dept" /im process.exe /f /t

I have the same IT Dept account on all computers with the same password, but I get an error message that says
ERROR: Logon failure: unknown user nae or bad password.

I've also tried to put a taskkill batch file on the client machines then use the call command from the host, but that just kills that running process on the host rather than on the machine where the taskkill batch file is.

Any help would be appreciated.
  • +
    0 Votes
    ---TK---

    but there might be another way of going about things... try looking into PStools from MS, there are a couple tools in there that will allow you to kill tasks on a remote machine. Lots of neat stuff, and very powerful. http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

    +
    0 Votes
    tmalo627

    that didn't get it done either. I tried using both the IP address for the remote computer and its name. When I tried to connect by IP address is gave me an Access denied error; and when I tried by the name it said it couldn't find the network path. I think that issue has more to do with name resolution though. I'll have to check the hosts file to make sure...

  • +
    0 Votes
    ---TK---

    but there might be another way of going about things... try looking into PStools from MS, there are a couple tools in there that will allow you to kill tasks on a remote machine. Lots of neat stuff, and very powerful. http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

    +
    0 Votes
    tmalo627

    that didn't get it done either. I tried using both the IP address for the remote computer and its name. When I tried to connect by IP address is gave me an Access denied error; and when I tried by the name it said it couldn't find the network path. I think that issue has more to do with name resolution though. I'll have to check the hosts file to make sure...