Hi, I try to kill all processes of a specified user.
i use
Try
Shell("C:\WINDOWS\system32\taskkill.exe /S localhost /U userx /P passwort /f /FI " & Chr(34) & "USERNAME eq userx" & Chr(34))
Catch ex As Exception
MessageBox.Show("LogoutException occurred. " + ex.Message)
End Try
But Nothing happened. If i try to use this taskkill..... command by console it works fine. one of the apps that should be closed is the explorer.exe. All apps`s From the user must be closed.
I inserted /u /p because the application it self runs under a different user.
has anyone an idea how i could kill truely all proccesses from that 1 user?
EDIT: i forget a little information, The application is started by a user with user-rights. thats the reason i use taskkill - there i can enter a different user with administrativ privilegs. So the second Problem is that i can`t use process.kill directly.
thx a lot for help.