I'd like to run a windows application in the context of another user. I have an administrator and several user accounts in one machine and I would like to have the administrator start certain applications for each user account (preferably using shell commands).

I tried the runas command but that appears to run in the administrator session as the specified user. I want to run the application as the user session in the user context (hope that makes sense).

For example, using user administrator I would like to start notepad.exe so that user1 (logged in) can see it appear onscreen. Is that possible?

有帮助吗?

解决方案

You can use PsExec for this : http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

use with argument : -i Run the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session.

ex. This will start IE on other computer psexec \client -i "c:\program files\internet explorer\iexplore.exe"

/René

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top