Well check out new things and let me know
shortest way -
Windows has a built-in command “TASKKILL” to kill a process.
if you want to kill the excel process for user corp\aksh then
TASKKILL /F /FI "USERNAME eq corp\aksh" /IM EXCEL.EXE
String Current_user = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Replace(“Servername",”")
"TASKKILL /F /FI 'USERNAME eq "+Current_user+"' /IM EXCEL.EXE
Excel_kill_for_user_cmd.xaml (5.2 KB)
second way is the same but with now user sid way
processkillforusersample.xaml (10.4 KB)
There is still more way like WMI and so and so.
Regards…!!
Aksh