Launch Notepad.exe using PsExec sysinternal tool

北城余情 提交于 2019-12-02 04:39:49

问题


I am trying to launch notepad.exe on remote server A from local server B.

below is the command which works fine and I could see notepad.exe process on Task Manager however when I physically remote login to server I do not see notepad launched (GUI).

C:\Windows\System32>D:\SysInternals\psexec.exe \\serverB 
-u Domain\user1 -p passXX -i -d notepad.exe

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

notepad.exe started on serverB with process ID 3328.

How would I see notepad GUI when logged in ?


回答1:


is serverB a terminal server ? if so you have to specify the user's session number, otherwise notepad will be opened in the console (session 0). you can use for example query session to get the active session on you server : query session /server:serverB user1

then pass the session number to -i parameter :

psexec \\serverB -u domain\user1 -i 2 notepad.exe 

where 2 is the session of user1



来源:https://stackoverflow.com/questions/24203577/launch-notepad-exe-using-psexec-sysinternal-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!