Re: VB script error in Cygwin

2012-07-26 Thread Andrew DeFaria

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 
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



Re: VB script error in Cygwin

2012-07-26 Thread Keith Christian
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

--
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



Re: VB script error in Cygwin

2012-07-25 Thread Aaron Schneider

On 25/07/2012 9:25, Eric Padriquez wrote:

Hi, we have a VB script that is working fine when run in command prompt.
However we encounter when we run the VB script in Cygwin by using shell
script to invoke VB.  We've tried to use cscript and cygstart but also
encounter error.  Thanks!
Error: attach_sendmail.vbs(52, 1) CDO.Configuration.1: The specified
module could not be found.
Code: 8007007E
Commands tried:
cscript.exe /attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}" 
"/email_msg.3592.mail" ""
cygstart /attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}" 
"/email_msg.3592.mail" ""



Could you attach a copy of the files replacing sensitive data?


--
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



Re: VB script error in Cygwin

2012-07-25 Thread Andrew DeFaria

On 07/25/2012 12:25 AM, Eric Padriquez wrote:

Hi, we have a VB script that is working fine when run in command prompt.
However we encounter when we run the VB script in Cygwin by using shell
script to invoke VB.  We've tried to use cscript and cygstart but also
encounter error.  Thanks!
Error: attach_sendmail.vbs(52, 1) CDO.Configuration.1: The specified
module could not be found.
Code: 8007007E
Commands tried:
cscript.exe /attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}" 
"/email_msg.3592.mail" ""
cygstart /attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}" 
"/email_msg.3592.mail" ""

Try executing a VB script that's in your CWD that does something very, 
very simple like echos "Hello World". Does that work? If so start adding 
complexity until it breaks.


cscript should work for you. I believe I have an alias vbs="cscript 
/nologo".

--
Andrew DeFaria 
Whenever I feel the need to exercise, I lie down till the feeling goes 
away.



--
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



Re: VB script error in Cygwin

2012-07-25 Thread Csaba Raduly
Hi Eric,

On Wed, Jul 25, 2012 at 9:25 AM, Eric Padriquez  wrote:
> Hi, we have a VB script that is working fine when run in command prompt.
> However we encounter when we run the VB script in Cygwin by using shell
> script to invoke VB.  We've tried to use cscript and cygstart but also
> encounter error.  Thanks!
> Error: attach_sendmail.vbs(52, 1) CDO.Configuration.1: The specified
> module could not be found.
> Code: 8007007E

As a first idea, check the differences in the path between the command
prompt and the Cygwin shell.
( %PATH% vs $PATH )

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

--
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