From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75948 invoked by alias); 2 Feb 2018 16:11:18 -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 75877 invoked by uid 89); 2 Feb 2018 16:11:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=dash, dialogue, H*F:D*ab.ca, services X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Feb 2018 16:11:13 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with ESMTP id hdvheRaE5ppe1hdvieuxHV; Fri, 02 Feb 2018 09:11:11 -0700 X-Authority-Analysis: v=2.3 cv=Bo6zP7f5 c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=N659UExz7-8A:10 a=YrhqwCJ2izxSdhlMpA8A:9 a=pILNOxqGKmIA:10 From: Brian Inglis Subject: Re: How to start Cygwin from outside Cygwin and pass a command to execute? Reply-To: Brian.Inglis@SystematicSw.ab.ca To: cygwin@cygwin.com References: <4df6f54b-5898-76f9-ebf6-1a2e40c65aa5@yahoo.co.uk> Message-ID: Date: Fri, 02 Feb 2018 16:11:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <4df6f54b-5898-76f9-ebf6-1a2e40c65aa5@yahoo.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfC4nbJKB/OH3OHsN3++IBVHOkVECzwpwBut8fqeKeR0rL6X4y7v/sV7Rva9g3FeYLjPa4MNgjFrUfHJws+DQ7mxTYUpW49TNjMSFKT0mLHwr/LgF5bTc 3shLNwfPo4XxsDqI/6TAbdRi+VG1OzwgNWmXh4sYzlXax47vYcWnDDmiWAdko1cGGcfrWBC3g11/pg== X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00014.txt.bz2 On 2018-02-02 01:31, Ben via cygwin wrote: > Assume my CgyWin (on a windows 7) is currently NOT started. > Assume I want to call from Windows my CgyWin and pass a command to execute. > Afterwards CygWin should automatically be closed again. > How can I achieve this? Cygwin is a DLL providing Unix/POSIX facilities over the underlying Windows OS, a collection of DLLs providing services using those facilities, and programs using those services and facilities, following the Unix model of the OS supporting libraries, services, and drivers, and managing hardware resources. Cygwin is started when you run any program using those libraries, services, or facilities. Add the Cygwin bin directory to PATH in your User environment and you can run Cygwin programs from the Win-R Run dialogue, any Windows shortcut, Scheduled Task, Windows console shell: using Windows style exe paths with Unix command parameters and Unix style file paths; or Cygwin terminal and shell using Unix style commands. Some users use Cygwin from the cmd shell, some from Powershell, others from mintty or other terminals with bash, dash, or another Cygwin shell. So just run the command from wherever you want; depending on what you want to happen with the output, you may need a shell to redirect output, or a console terminal to display output. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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