delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Andrew DeFaria <Andrew AT DeFaria DOT com> |
Subject: | Re: VB script error in Cygwin |
Date: | Thu, 26 Jul 2012 07:43:02 -0700 |
Lines: | 49 |
Message-ID: | <jurl1n$fuc$1@dough.gmane.org> |
References: | <1343201120 DOT 87444 DOT YahooMailNeo AT web162104 DOT mail DOT bf1 DOT yahoo DOT com> <CAFWoy7GA+XatS93YiKcy0wgb-o_MoL=SQpwpfrqdd1PHHd3NUQ AT mail DOT gmail DOT com> |
Mime-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
In-Reply-To: | <CAFWoy7GA+XatS93YiKcy0wgb-o_MoL=SQpwpfrqdd1PHHd3NUQ@mail.gmail.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 07/26/2012 07:24 AM, Keith Christian wrote: > I usually write a CMD.EXE script that in turn, runs cscript and its *.vbs file. > > Example: > > The following lines are a cmd "batch" file called bar.cmd > > > @echo on > echo.This is "bar.cmd," a CMD.EXE script, which will be invoked by Cygwin > echo.Run a vbscript called "foo.vbs" > cscript foo.vbs > echo."foo.vbs" is complete > echo.Done, now exiting "bar.cmd" > exit > > > ** First ** ---- run bar.cmd within a CMD.EXE window to be sure it and > foo.vbs are working properly outside of Cygwin. > > ** Second** ---- from within Cygwin's bash (or other) shell, run bar.cmd: > > $ cmd /c bar.cmd > > Watch for output or results from "foo.vbs" during the run. > > ========== Keith > There's no need to interject a needless additional process of cmd.exe. You can call cscript directly without a problem: Neptune:cat HelloWorld.vbs option explicit sub display (msg) wscript.echo msg end sub display "Hello World from VBS!" Neptune:cscript HelloWorld.vbs Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Hello World from VBS! Neptune: -- Andrew DeFaria <http://defaria.com> I put instant coffee in my microwave oven and almost went back in time. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |