Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > PsTools
  New Posts New Posts RSS Feed: PSExec windows title
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

PSExec windows title

 Post Reply Post Reply
Author
Message Reverse Sort Order
laffen View Drop Down
Newbie
Newbie


Joined: 03 November 2009
Online Status: Offline
Posts: 4
Post Options Post Options   Quote laffen Quote  Post ReplyReply Direct Link To This Post Topic: PSExec windows title
    Posted: 06 November 2009 at 1:26pm
A question a bit off topic - is it possible to access and reuse the -u and -p parameters passed to psexec?

Laffen
Back to Top
molotov View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 04 October 2006
Online Status: Offline
Posts: 17492
Post Options Post Options   Quote molotov Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2009 at 10:40am
OK - that helps.  The password is in the command supplied to psexec, rather than the one supplied to psexec itself.  Is it an option, to place the command to be executed by psexec inside of a batch file?
  psexec \\server -s cmd /c theBatchFile.cmd
Of course, theBatchFile.cmd would need to reside on \\server (or it would need to be copied there)...
Daily affirmation:
net helpmsg 4006
Back to Top
laffen View Drop Down
Newbie
Newbie


Joined: 03 November 2009
Online Status: Offline
Posts: 4
Post Options Post Options   Quote laffen Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2009 at 7:17am
I am starting an installation on a remote 2008 server.  This requires "elevated security rights", so it need to be started as a local administrator or system account (don't work with a domain admin - even if its a member of the local administrators group).
The installation package is placed on a network share - so I need to do two things. 
First - map the network resource
Second - start the installation.

The command looks like this:

psecec \\server -s cmd /c "net use \\server\ipc$ xxxxxxxx /user:domain\username & \\server\share\job.cmd"

where xxxxxxxxx is the password.

The job produces output so I can't hide the window.
This works - but the password will be shown in the windows title as long as the job runs - and this could be for several minutes.


Back to Top
molotov View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 04 October 2006
Online Status: Offline
Posts: 17492
Post Options Post Options   Quote molotov Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2009 at 3:18am
What command are you running (camouflage any sensitive information)?  A quick test of launching CMD.EXE on a remote system shows the title included those details for only a second.  Recall that you can omit the password from the command-line and specify it when prompted...
Daily affirmation:
net helpmsg 4006
Back to Top
laffen View Drop Down
Newbie
Newbie


Joined: 03 November 2009
Online Status: Offline
Posts: 4
Post Options Post Options   Quote laffen Quote  Post ReplyReply Direct Link To This Post Posted: 04 November 2009 at 3:30pm
Yes - I think you're right.  To bad - this is a bit awkward when a command contains a password.  It will show up in the windows title.

Thanks anyway!!

Regards Laffen
Back to Top
molotov View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 04 October 2006
Online Status: Offline
Posts: 17492
Post Options Post Options   Quote molotov Quote  Post ReplyReply Direct Link To This Post Posted: 04 November 2009 at 12:15am
Hi Laffen,

I'm reminded of this, which would seem to indicate that PsExec will set the title; AFAIK, this is not configurable. 
Daily affirmation:
net helpmsg 4006
Back to Top
laffen View Drop Down
Newbie
Newbie


Joined: 03 November 2009
Online Status: Offline
Posts: 4
Post Options Post Options   Quote laffen Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2009 at 9:11pm

Is there a way to set the windows title when using psexec.  Now the remote command will show as the windows title, and thats not what I want.

Anyone?
 
Regards Laffen
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down