Eric Padriquez | 25 Jul 2012 09:25
Picon
Favicon

VB script error in Cygwin

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 <Path>/attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}"
"<Path>/email_msg.3592.mail" "<Attached file>"
cygstart <Path>/attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}"
"<Path>/email_msg.3592.mail" "<Attached file>"

Csaba Raduly | 25 Jul 2012 13:06
Picon

Re: VB script error in Cygwin

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

Andrew DeFaria | 25 Jul 2012 17:06
Favicon

Re: VB script error in Cygwin

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 <Path>/attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}"
"<Path>/email_msg.3592.mail" "<Attached file>"
> cygstart <Path>/attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}"
"<Path>/email_msg.3592.mail" "<Attached file>"
>
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 <http://defaria.com>
Whenever I feel the need to exercise, I lie down till the feeling goes 
away.

Aaron Schneider | 25 Jul 2012 20:55
Picon

Re: VB script error in Cygwin

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 <Path>/attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}"
"<Path>/email_msg.3592.mail" "<Attached file>"
> cygstart <Path>/attach_sendmail.vbs "${EMAIL_SUBJECT}" "${EMAIL_TO}"
"<Path>/email_msg.3592.mail" "<Attached file>"
>

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

Keith Christian | 26 Jul 2012 16:24
Picon

Re: VB script error in Cygwin

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

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

Andrew DeFaria | 26 Jul 2012 16:43
Favicon

Re: VB script error in Cygwin

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
>
>
> 	 <at> 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:
(Continue reading)


Gmane