I need to kill a process from the command line:

taskkill /f /IM WINWORD.EXE

The command works just fine when using an administrator account, but fails for standard user accounts with "Access is denied."

Is it possible to grant a standard user rights to kill a specific process? What privilleges might be required?

The OS is Windows 8.1.

Recommended Answers

All 2 Replies

taskkill will attempt to kill all WINWORD.EXE processes whether they are owned by the current user or not, so you have to add a qualifier such as /fi "username eq %USERNAME%" so that the line reads as follows

taskkill /f /IM WINWORD.EXE /fi "username eq %USERNAME%"

so that it only kills the processes owned by the user. Administrators can indiscriminately kill all processes by name for all users.

Thanks for the response. I attempted to kill the process as suggested, by specifying a username filter, but still get the 'Access is denied' message. Same result when filtering by PID.

I can imagine how terminating processes owned by other users might lead to access denied warnings, but I don't believe this is the case here. All instances of WINWORD.EXE are owned by the current user, the account from which I wish to call taskkill.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.