Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 100353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:33:47+00:00 2026-05-11T00:33:47+00:00

I work off of a multi-user Windows Server, and the rdpclip bug bites us

  • 0

I work off of a multi-user Windows Server, and the rdpclip bug bites us all daily. We usually just open task manager and kill then restart rdpclip, but that’s a pain in the butt. I wrote a powershell script for killing then restarting rdpclip, but no one’s using it because it’s a script (not to mention the execution policy is restricted for the box). I’m trying to write a quick and dirty windows app where you click a button to kill rdpclip and restart it. But I want to restrict it to the current user, and can’t find a method for the Process class that does this. So far, here’s what I have:

Process[] processlist = Process.GetProcesses(); foreach(Process theprocess in processlist) {     if (theprocess.ProcessName == 'rdpclip')     {       theprocess.Kill();       Process.Start('rdpclip');     } } 

I’m not certain, but I think that’s going to kill all the rdpclip processes. I’d like to select by user, like my powershell script does:

taskkill /fi 'username eq $env:username' /im rdpclip.exe & rdpclip.ex 

I suppose I could just invoke the powershell script from my executable, but that seems fairly kludgy.

Apologies in advance for any formatting issues, this is my first time here.

UPDATE: I also need to know how to get the current user and select only those processes. The WMI solution proposed below doesn’t help me get that.

UPDATE2: Ok, I’ve figured out how to get the current user, but it doesn’t match the process user over Remote Desktop. Anyone know how to get username instead of the SID?

Cheers, fr0man

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:33:48+00:00Added an answer on May 11, 2026 at 12:33 am

    Ok, here’s what I ended up doing:

               Process[] processlist = Process.GetProcesses();             bool rdpclipFound = false;              foreach (Process theprocess in processlist)             {                 String ProcessUserSID = GetProcessInfoByPID(theprocess.Id);                 String CurrentUser = WindowsIdentity.GetCurrent().Name.Replace('SERVERNAME\\','');                   if (theprocess.ProcessName == 'rdpclip' && ProcessUserSID == CurrentUser)                 {                     theprocess.Kill();                     rdpclipFound = true;                 }              }             Process.Start('rdpclip');             if (rdpclipFound)             {                MessageBox.Show('rdpclip.exe successfully restarted'); }             else             {                MessageBox.Show('rdpclip was not running under your username.  It has been started, please try copying and pasting again.');             }              } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the question: Can TortoiseSvn work on Windows 2008 without turning off User
At work we use a branching strategy where all changes start off in a
I have projects that multiple developers are working on. We all work off the
I am finishing off testing a multi-threaded application that seems to work fine until
First off, this example will only work in a browser that supports :nth-child ,
I work on a desktop sales app that is run off a tablet and
I work 100% with a branch that I made off of the master branch.
First off, I am not a DBA, but I do work in an environment
work on sql-server-2005 SELECT A.specific_customization_id , A.customization_id , A.customization_value , A.customization_price , A.customization_cost ,
work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.