none
HOWTO C#/.NET Remotely run a program on some one elses machine, and in the currently logged on user's desktop? RRS feed

  • Question

  • Please help,

    I need a way to run a program on a remote client machine, to the currently logged on user's desktop.
    I will have given, that when I run the program, I will be on a server, and have a domain admin account, with any/all privileges needed to run anything on the target client.
    The goal is to have a program on the client, become visible to the currently logged on user, without having to do anything, like have the current user logout/login.

    Tuesday, April 18, 2017 7:28 PM

All replies

  • Hi J-S-B,

    According to your description, it seems that you want to use Windows Authentication, Integrated Windows Authentication is the preferred approach to authentication whenever users are part of the same Windows domain as the server. Users are authenticated against an existing  identity store such as Active Directory, and their credentials are not transmitted across the Internet. 

    For more information about Windows Authentication With ASP.NET Web Pages, please refer to:

    https://www.mikesdotnetting.com/article/216/windows-authentication-with-asp-net-web-pages

    For more information about Add Window Authentication Functionality to a C# Desktop Application, please refer to:

    https://code.msdn.microsoft.com/windowsdesktop/Add-Window-Authentication-833ba913

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 19, 2017 2:04 AM
    Moderator
  • Thanks Cole Wu for the reply, but those links were not what I was looking for.

    I put a drawing below, which I hope explains my needs more.

    The KEY is to get an app to run on a remote client, in the currently logged on user's desktop, and as the current user. Put another way, the most significant KEY word is "Desktop". It is not enough to just run an app as another user, but in the user's desktop so it can interact with the user.

    Wednesday, April 19, 2017 5:06 PM
  • Hi J-S-B,

    According to your description, it seems that you want to save the login status on your server. if App "X" logged on with user name "Joe", and App "Y" logged with user name "Joe" automatic. If so, you could save your machine name, user name, login status on your server(such as save it in SQL server) via WCF . when you open App "Y", cosuming WCF first and check if it has logged. if logged, just get the username information.

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 20, 2017 2:41 AM
    Moderator