From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100700 invoked by alias); 7 Aug 2017 17:05:11 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 100691 invoked by uid 89); 7 Aug 2017 17:05:10 -0000 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 Received: from forward9o.cmail.yandex.net (HELO forward9o.cmail.yandex.net) (37.9.109.56) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Aug 2017 17:05:04 +0000 Received: from mxback11g.mail.yandex.net (mxback11g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:90]) by forward9o.cmail.yandex.net (Yandex) with ESMTP id 6751122CCE; Mon, 7 Aug 2017 20:05:01 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback11g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id TG20QwFBEX-51omoGrO; Mon, 07 Aug 2017 20:05:01 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id vTIoi8zoBa-50vK2JDR; Mon, 07 Aug 2017 20:05:01 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Mon, 07 Aug 2017 16:52:35 -0000 Date: Mon, 07 Aug 2017 17:05:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <1685771259.20170807195235@yandex.ru> To: Oleksandr Gavenko , 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 X-SW-Source: 2017-08/txt/msg00074.txt.bz2 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