This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: invoke vbscript from cygwin?

Dave Burns wrote:
On Wed, Mar 19, 2008 at 1:49 PM, Brian Dessent <> wrote:
Dave Burns wrote:

> Yes, that worked splendidly. Should I have known about these
> executables? Are they the regular interpreters for vbscripts? I know
> little about cygwin and nothing about vbscript, and I did not see
> these mentioned in the documentation.

The Cygwin documentation? Why would they be there?
That's my point. Previous poster seemed to think it should be obvious, but I was just skimming the cygwin docs, which have no reason to mention them.
It's not really a far stretch to assume that since you were asking about how to run a vbscript from cygwin that you were at least knowledgeable about vbscript, how it's just a scripting language and how underlying it is either wscript or cscript which is the engine/interpreter program which consumes the vbscript code and executes its desired function. I mean how are we to know that you are naive about vbscript too? Of course, we also assume you do at least a little bit of your own homework first and have made a good faith attempt at figuring out your own problem before bothering others to solve your problem. Or, at least that's what I try to do.
The Windows Script Host is
documented by MS on MSDN though:
What's that? If we'd never had this conversation, I'd never have followed that link as a clue to solve this problem.
That link's probably a clue to understanding that vbscript isn't magic and that it relies on good old executables like wscript.exe and cscript.exe to run.
> Maybe I was too hasty, but I
> didn't even see "Here's how you invoke a regular windows .exe from
> within cygwin". I'm sorry for mystifying you - someone handed me an

There's no fundamental difference between running a Cygwin command and a non-Cygwin command from a shell prompt, in the end it's just an .exe
either way: you type its name and the shell runs it if it can find it in
the PATH.
This is useful to know. It seems non-obvious to me, as a newbie-ish user of cygwin. Maybe I was just having brain-hiccup. Not clear where to put it in the docs, if someone wanted to make it more obvious. Maybe it is obvious enough already.
Yes it is. As was said, Cygwin executables are no different than Windows executables - IOW executables are executables. That said, why would you expect Cygwin to explain how you run non-Cygwin stuff? You're expected to know that stuff on your own or at least seek out the owners/writers of that other stuff to understand how it runs.
Short review - to run a script from cygwin, find the exe that is the interpreter of the script (in the case of vb script, cscript.exe or wscript.exe) and invoke the interpreter with the script as an argument.
Provided that the script requires an .exe interpreter to run and that the interpreter expectx to see the script as a parameter. Now, most do. But some might not. For example, PowerBuilder may totally ignore your PowerBuilder script (is PowerBuilder a scripting type language? I don't know) on the command line and instead bring up the PowerBuilder IDE insisting or assuming that you then run it from within the PowerBuilder GUI. IOW it depends on the app. Ask them how you execute them from a command line. They will probably tell you how to do it from a cmd command line. Translate that to Cygwin. You're good to go.

Another, real life example, but from the Unix world, is what I'm working on right now. Testers write test "scripts" in a GUI with drawing flowcharts and the like. I'm expected to run their tests "from the command line". The command that ultimately "runs the 'script'" is a java command with an appropriate class file and with a -name to specify where the script is to run. So even though the "script" is interpreted it's not interpreted by java as it's not java code. IOW other options need to be specified, etc. However I didn't go to the Unix admin and ask him about how to do this - I wouldn't suspect he'd know. I had to go to the makers of the test software and ask them how this is supposed to work.
Andrew DeFaria <>
Bureaucracy: a method of turning energy into solid waste.

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]