3
Answers

Process has no username

John Doherty

John Doherty

13y
1.6k
1
I have created a Windows app and when I run it it appears under the Processes tab in Task Manager. That's fine but there is no user name for it. This means I am unable to kill it in a command prompt (it gives me "access denied"). I cannot understand this as I am able to install it so I should be able to kill the process?
If I hardcode in the username and password to the ProcessStartInfo properties then I can kill the process (the username appears under the Processes tab in Task Manager) . This is not feasable as for security reasons I cannot hardcode in Windows usernames and passwords.

Under the Processes tab in Task Manager I see other apps such as Word, Excel etc, with the logged on username so why not my app?
Answers (3)
0
Sam Hobbs
NA 28.7k 1.3m 13y
This is not a good design. You should not design your software such that it must be killed. You should design your software to prevent the need for it to be killed. If you don't believe me then just read the documentation.
0
John Doherty
NA 3 1.6k 13y
Yes that fixes it but I cant rely on users selecting that without knowing. I have found a way around it;if I  get the user to log off and log on again they can kill the process then.
0
Vulpes
NA 98.3k 1.5m 13y
If you tick the box, 'Show Processes from all users' at the bottom of the Processes tab, does a user name for your process show up then?
Next Recommended Forum