delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/03/18/09:52:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:message-id:in-reply-to:references
:subject:mime-version:content-type:content-transfer-encoding; q=
dns; s=default; b=fpmkONXgVF1L8k3YoNgky6SxPDjSxOZ8/0rhzqu3+VT+Q/
4EOdEr9xd9oWhjt7C68KnZT0rO7Cf+gXxavkCuO7xAJKq+92rqAQLz0migHLNU77
hWgxQlzHlqzEAit1BjGdxfNaihKVY1wzR+cThzvn9DZOFnQOkXy1YDHitLq0A=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:message-id:in-reply-to:references
:subject:mime-version:content-type:content-transfer-encoding; s=
default; bh=W1vNrR71FoHBTqKmDeCx5qzhN0E=; b=W0bQqqu0OQGUpX1+9C4E
Z3dRiSxp0Nwn13TCNskmnmitGGJ7MPoyfI0aVerhkNVunMsIzhPNvvhrL5A8KvsM
5x7Hd+uk8irt0hX07JYWM0naoq6FwtW8AfL4VC2WVFD8nKp52WDwFlSXWMcPhTJP
582dvGyzAKwNDI05Q3igMgY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=BAYES_00,SPF_FAIL,SPF_HELO_PASS,URI_HEX autolearn=no version=3.3.2 spammy=username
X-HELO: n5.nabble.com
Date: Sun, 18 Mar 2018 06:52:21 -0700 (MST)
From: mhallnh <mhall AT lgw DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <1521381141669-0.post@n5.nabble.com>
In-Reply-To: <CAAD4mYi_9oRbwpeo=E4UygBixQ755AnAPO4wXNwseP4e6C8b8A@mail.gmail.com>
References: <CAHB2L+ct03oQVgQ27m=oPC41qMvXvwrO0Zm63SDidmujUJd47Q AT mail DOT gmail DOT com> <CAHB2L+dPtZCm_1ga-a8Ud74oNg5-3JDW6zHYMeYUHDyiOtUXZQ AT mail DOT gmail DOT com> <1769495026 DOT 20160211145642 AT yandex DOT ru> <1521222444047-0 DOT post AT n5 DOT nabble DOT com> <386991849 DOT 20180317054151 AT yandex DOT ru> <1521316059812-0 DOT post AT n5 DOT nabble DOT com> <CAAD4mYi_9oRbwpeo=E4UygBixQ755AnAPO4wXNwseP4e6C8b8A AT mail DOT gmail DOT com>
Subject: Re: sshd interaction with desktop not working
MIME-Version: 1.0

I guess I'll go back to my original solution which is to use PsExec from
Sysinternals.

It's a little more complicated because you have to first run a script to
retrieve the Windows Session ID

This script works:
$username = 'mhall'
$results = psexec \\192.168.X.XXX query session
$id = $results | Select-String "$username\s+(\w+)" |
                 Foreach {$_.Matches[0].Groups[1].Value}


Then you can follow up by invoking the windows program (notepad in the
example below).
the 'i' switch is used to indicate that you want to interact with the
windows desktop

psexec \\192.168.X.xxx -u $username -i $id -d notepad.exe

pause



--
Sent from: http://cygwin.1069669.n5.nabble.com/Cygwin-list-f3.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019