07-14-2011 10:18 AM
I have a need to Kill a process with user credentials. I have a VI - using .net that performs this when the user has admin credentials. However I need to be able to kill a process from lower user credentials. There should be a way to change the security settings (programmatically) for that process. I already create a process with a local admin account but that still does not work.
Any help will be greatly appreciated.
Solved! Go to Solution.
07-14-2011 12:35 PM - edited 07-14-2011 12:38 PM
Hi Spectre Dave,
It sounds like you want to impersonate a user account. It's possible to do this in .NET. Here's a Stack Overflow Q&A about it: Impersonation in .NET
Since impersonation only applies to the current thread, doing this correctly from G code will require ensuring that your entire VI runs in a single OS thread.
Another approach might be to launch a child process as a different user via the "runas" command. This might be easier to get right, and might be closer to what you've already tried.
Brad
07-14-2011 01:47 PM
Thank you
I am NOT a .net programmer but I can figure it out if I know where to look - now I know where to look.