X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <12391292 DOT post AT talk DOT nabble DOT com> Subject: RE: How do I make scripts my PC executable Date: Wed, 29 Aug 2007 18:07:48 +0100 Message-ID: <003101c7ea5f$231bb6c0$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <12391292.post@talk.nabble.com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 29 August 2007 17:59, zip184 wrote: > I have some scripts I'd like to run without starting cygwin and typing in > their paths. Is there a way to make windows recognize that a file is a > bash/python script and run them like as if I ran them in cygwin? I'd like > to just be able to doubleclick them in windows explorer. Is this possible? > (I'm using bash and python scripts) Windoze doesn't understand about shebangs (the #! line at the start of the script), and bases all its decisions on the filename extension. So, if you name your scripts according to the pattern '*.sh', and make sure to chmod a+x them, you can double-click in explorer. The first time you do that, windows will complain it doesn't know what to do with a sh file, and offer you the choice of looking up on the web or selecting from a list which program you want to open .sh files with; choose the select-from-a-list option, when the list appears click the browse button, find your way to cygwin\bin\bash.exe and select that. Make sure "Always use this program" is ticked, enter a nice descriptive name such as "Bash script" in the description box, OK it and away you go! cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/