![]() |
PsExec & -i To Interact w/Desktop |
Post Reply
|
Page <123 |
| Author | |
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Topic: PsExec & -i To Interact w/DesktopPosted: 13 December 2005 at 4:15pm |
|
Strange. Now I'm confused. I would have expected the exact opposite.
Is \\remote a terminal server? I remember having read in this forum that on terminal servers, if you use psexec to launch a GUI app remotely, the output will always be sent to the physical monitor, not to the appropriate terminal session. This is my last hypothesis for today, I'm afraid. - Just 1 more hour till midnight here, and another working day ahead of me. Karl |
|
![]() |
|
sbras
Newbie
Joined: 13 December 2005 Location: United States Online Status: Offline Posts: 8 |
Post Options
Quote Reply
Posted: 13 December 2005 at 4:08pm |
|
Good idea; I had thought of that and did verify that the user logged on interactively is the same user that runs the task. I've been able to run the process under any account I choose, but when I use the one logged on interactively, the GUI does not appear.
|
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 13 December 2005 at 3:58pm |
|
Fine. That's cleared. No misunderstanding, because we are using the same terms, but with different meaning.
Ok, you were quicker writing your answer, than I was adding another idea to my previous post. The user username on \\remote might not have got a graphical contect, no screen might have been assigned to him. Reason, he is not logged on to the machine \\remote. It looks as if psexec can use an existing graphical context on \\remote, but it cannot create one. After all it is more like telnet, not like Remote Desktop. Could this be the cause? User username has not logged on to \\remote interactively. If this is the case, you might logon to \\remote as username and the invisible GUI may become visible. (Worked for me sometimes, yet sometimes it did not.) Karl |
|
![]() |
|
sbras
Newbie
Joined: 13 December 2005 Location: United States Online Status: Offline Posts: 8 |
Post Options
Quote Reply
Posted: 13 December 2005 at 3:45pm |
|
myapp.exe is a GUI app, which launches on \\remote using psexec. I use -i switch, and the GUI is NOT visible on the remote. However, the gui app appears on the remote machine's task list, under the account I specify using psexec. It's just not visible. I think we are using the same terms. And yes, the -i switch comes before the command argument, although I've tried it in various places. Thanks for your continued assistance. |
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 13 December 2005 at 3:38pm |
|
Looks like we are using the same language, yet we have not yet agreed on how to interpret some technical terms. (No offense meant, just my impression.)
So let me suggest some definitions, i.e. how to use some terms, else we will go on talking without understanding each other.
Now, if myapp.exe is a console app and you launch it on \\remote using psexec, the process will be started on \\remote, but the output will be shown on your local machine, i.e. where you typed the psexec command. If myapp.exe is a GUI app. and you launch it on \\remote using psexec, the process will be started on \\remote, but no GUI will be visible at all, neither on \\remote, nor on your local machine. If myapp.exe is a GUI app. and you launch it on \\remote using psexec with the -i switch, the process will be started on \\remote, and the GUI will be visible on \\remote. Now, kindly tell me:
Karl -- P.S.: The -i switch must be entered on the psexec commandline before myapp.exe, else it will not be interpreted by psexec, but passed to myapp.exe as its command line argument. Ah, one more idea:
The user username from your example, has he got a visible screen on the machine \\remote? I mean is he logged in on the machine? If not, I guess username will not get any graphical output, because no (virtual) screen has been assigned to him. (psexec is not a Remote Desktop replacement, just a small telnet like console application.) Edited by Karlchen |
|
![]() |
|
sbras
Newbie
Joined: 13 December 2005 Location: United States Online Status: Offline Posts: 8 |
Post Options
Quote Reply
Posted: 13 December 2005 at 3:13pm |
|
I believe my situation meets all those requirements and still I see no GUI on the remote machine. It is a Windows application. Further I have tested the same command line with other Windows apps (such as Word and Excel) and always get the same results. The task appears in the list, but not on the desktop. Thanks. |
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 13 December 2005 at 3:09pm |
|
The GUI will only appear on the remote machine if
+ \\remote has been specified (obviously) + -i switch is used + myapp.exe (to use your example) is a graphical application. The output of all console applications launched remotely will always be displayed on the local machine. Might have made this clear from the beginning. Karl |
|
![]() |
|
sbras
Newbie
Joined: 13 December 2005 Location: United States Online Status: Offline Posts: 8 |
Post Options
Quote Reply
Posted: 13 December 2005 at 2:43pm |
|
The following command line: psexec \\remote -u username -p password -i -d c:\folder\myapp.exe Does not result in the GUI appearing on the remote machine. The task appears in the list running with the correct user account. I've tried this with numerous executables and the result is always the same. Thanks for your assistance with this! |
|
![]() |
|
Karlchen
Senior Member
Joined: 18 June 2005 Location: Germany Online Status: Offline Posts: 5121 |
Post Options
Quote Reply
Posted: 13 December 2005 at 2:33pm |
|
psexec -i \\remote some_command
will launch some_command on the computer \\remote and the GUI of some_command will be displayed on \\remote, not on the local machine where you typed in the psexec command. psexec -i -s regedit will launch regedit locally (no \\remote given on the command line.) Therefore the regedit GUI will be displayed on the local machine. The user running it will be "local system" (option -s). Note: only admins can use the -s option successfully. Does this help you? If not, kindly explain in more details what you would like to achiveve, how your psexec command line looks and what happens where. -d only means that psexec will exit once it has launched the (remote) command. Without -d psexec will wait for the (remote) command to finish. Karl |
|
![]() |
|
sbras
Newbie
Joined: 13 December 2005 Location: United States Online Status: Offline Posts: 8 |
Post Options
Quote Reply
Posted: 13 December 2005 at 11:08am |
|
I'm finding that, no matter what combination of switches I use, I cannot get an application to appear in the foreground (as a window on the desktop) of a Windows XP Pro sp2 machine. It appears in the task list using the specified account, but is never visible. I'm using the -I and -d switches. Should this work? If so, how? Thanks in advance! |
|
![]() |
|
Post Reply
|
Page <123 |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |