Solved

Microsoft TS - Start Program on another session

Posted on 2014-03-25
9
691 Views
Last Modified: 2014-04-01
Hi!

Is it possible for me as an administrator to start for example "notepad.exe" inside another users terminal server session so that it shows on the users screen?

Cheers!

Marcus
0
Comment
Question by:MarcusSjogren
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 9

Expert Comment

by:BlueYonder
ID: 39952967
0
 
LVL 4

Author Comment

by:MarcusSjogren
ID: 39952977
Thanks BlueYonder, but I think I was a bit unclear.

I want to start it from my own command prompt without having to log on or remote controlling the users session.

My bad!

Marcus
0
 
LVL 54

Assisted Solution

by:McKnife
McKnife earned 150 total points
ID: 39955433
Hi.

You can use psexec to start programs interactively in the console session, which users don't see or, having their credentials, in their own session. Without their creds (you don't have those, right?), you can only schedule tasks that are configured to run only if those people are logged on and use their session, not sure if that works. Try it.
What is the use case?
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 4

Author Comment

by:MarcusSjogren
ID: 39955502
Thank you very much for the idea about task schedule!

The task is to say - open TeamViewer automatically when the user needs help, or to run an inventory tool on the users account.

I have no straight idea about it - I am working with developement so this was sort of a first step to see if there was any idea of even trying :-)

I will test the task scheduler and get back to you!
0
 
LVL 11

Assisted Solution

by:Venugopal N
Venugopal N earned 150 total points
ID: 39955503
Try with psexec command.

http://technet.microsoft.com/en-in/sysinternals/bb897553.aspx


To run something on a remote machine (with a user logged on):

psexec \\<ip address> -u <user> -p <password> -i 0 -d "<local path to executable>"

-i 0    runs on main screen

-d      don't wait for command to complete on remote machine
0
 
LVL 4

Author Comment

by:MarcusSjogren
ID: 39955507
cheers, will absolutely test it!

Thanks Venougopal N!
0
 
LVL 54

Expert Comment

by:McKnife
ID: 39955516
Mind what I wrote about psexec. A TS is not used at session 0.
0
 
LVL 4

Accepted Solution

by:
MarcusSjogren earned 0 total points
ID: 39959528
Hi all,

I believe I have resolved the issue now!

Since I don't really care (for now at least) if the program runs as the target user I got it working by the below PsExec-command.

What I noticed was that without -e and with local administrator it started but did not show the notepad GUI. Adding -e and domain administrator resolved that issue.

-i = the users terminals service session ID
-d = don't wait for process to execute
-e = don't load executing users profile
-u = Username
-p = Password


C:\PSTools>PsExec.exe -i 12 -d -e -u "DOMAIN\administrator" -p "PASSWORD" "
C:\windows\notepad.exe"

PsExec v2.1 - Execute processes remotely
Copyright (C) 2001-2013 Mark Russinovich
Sysinternals - www.sysinternals.com


C:\windows\notepad.exe started on TS1 with process ID 35608.
0
 
LVL 4

Author Closing Comment

by:MarcusSjogren
ID: 39968806
I found that it is indeed possible to start a program on another users session when being the domain administrator and not loading the administrator user profile.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question