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
  • 0 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

Ask A Question

Stats

  • Questions 142k
  • Answers 142k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I did only have a short glance at it, but… May 12, 2026 at 8:14 am
  • Editorial Team
    Editorial Team added an answer How are you defining your dependencies? and what types specifically… May 12, 2026 at 8:14 am
  • Editorial Team
    Editorial Team added an answer You have to set the frame to do nothing on… May 12, 2026 at 8:14 am

Related Questions

There are a number of hosting services for git, Mercurial, etc. I need to
Part of the development team I work with has been given the challenge of
I currently work on contract/consulting on site for various local subcontracting firms. I've been
I'm working on setting up log4net in a multi-tiered application. I have most of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.