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:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=JiHyQXRUJvA9fH2j
	hdZWx26oL3/DksTGytK8WmxTbT2nYq1ZbVWkU+zxE4v5x6yz6LSIrF9D5oO+YC+k
	bPn1NOvuKoGqcOBS30ZoDyf5C94Nqo09RiAk+8zsNhzaKrfkh1LNmZfs1WAoc8oz
	SNyJv3pKs98OEy+Cxbb05EW52PQ=
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:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; s=default; bh=gs2DVZdyBEPZzRt9Kxj/fs
	eV3ys=; b=X8NSQKA1tCB7neTXkB+xvA6YXt/A/fdFTTKKFaDMoM4tmKOi5EnedN
	DBct8fHOS5jVjaCzWHnh89ezi2az9+SudVbcf5TlG5yICWawj5H+RbUUymsIGydj
	k3Ymx2+VKJz8JXWpAHAoabfNLPMcFCO3j0EKChF40HnuTHMU7EEPU=
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.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*F:D*yandex.ru, yandexru, UD:yandex.ru, yandex.ru
X-HELO: forward9o.cmail.yandex.net
Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Mon, 7 Aug 2017 19:52:35 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <1685771259.20170807195235@yandex.ru>
To: Oleksandr Gavenko <gavenkoa@gmail.com>, cygwin@cygwin.com
Subject: Re: Hiding console when running Cygwin utility from Task Scheduler.
In-Reply-To: <86o9ryymx5.fsf@gavenkoa.example.com>
References: <86o9ryymx5.fsf@gavenkoa.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Greetings, Oleksandr Gavenko!

> I prepared backup task in Bash script and added task to run it in Windows Task
> Scheduler:

>   Executable: c:\opt\cygwin\bin\bash.exe
>   Params: c:\home\backup\backup-job.bash

> Each time job run I see console screen. 'procmon' shown that it is::

>   \??\C:\Windows\system32\conhost.exe 0xffffffff -ForceV1

> Seems each Cygwin utility brings console into foreground. I also tested with:

>   c:\opt\cygwin\bin\yes.exe

> How can I prevent console to be shown when bash started from Task Scheduler?

Do not start tasks as current user. Or use wrapper that prevent console
window creation in first place.


-- 
With best regards,
Andrey Repin
Monday, August 7, 2017 19:51:43

Sorry for my terrible english...


--
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

