X-Recipient: archive-cygwin@delorie.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@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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@lgw.com>
To: cygwin@cygwin.com
Message-ID: <1521381141669-0.post@n5.nabble.com>
In-Reply-To: <CAAD4mYi_9oRbwpeo=E4UygBixQ755AnAPO4wXNwseP4e6C8b8A@mail.gmail.com>
References: <CAHB2L+ct03oQVgQ27m=oPC41qMvXvwrO0Zm63SDidmujUJd47Q@mail.gmail.com> <CAHB2L+dPtZCm_1ga-a8Ud74oNg5-3JDW6zHYMeYUHDyiOtUXZQ@mail.gmail.com> <1769495026.20160211145642@yandex.ru> <1521222444047-0.post@n5.nabble.com> <386991849.20180317054151@yandex.ru> <1521316059812-0.post@n5.nabble.com> <CAAD4mYi_9oRbwpeo=E4UygBixQ755AnAPO4wXNwseP4e6C8b8A@mail.gmail.com>
Subject: Re: sshd interaction with desktop not working
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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

