For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > April 2006 > Executing a VB-script from VB6









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Executing a VB-script from VB6
Kjell

2006-04-28, 7:56 am

Hi

I need to execute a VB-script from my Vb6 application (ActiveX exe
application) and cannot figure out how to receive the output generated by the
script back to my application.

It's a regular VB.script (.vbs) and I have no problem executing it, the
output is coming as a message box.

but, what shall i do to get the output back to my ActiveX exe application?

Any ideas or links are highly appreciated. :-)

Kjell
S. I. Becker

2006-04-28, 7:56 am

Kjell wrote:
> Hi
>
> I need to execute a VB-script from my Vb6 application (ActiveX exe
> application) and cannot figure out how to receive the output generated by the
> script back to my application.
>
> It's a regular VB.script (.vbs) and I have no problem executing it, the
> output is coming as a message box.
>
> but, what shall i do to get the output back to my ActiveX exe application?
>
> Any ideas or links are highly appreciated. :-)
>
> Kjell


Two fairly simple options:

1) Have the script write it's output to a file and then open the file in
the application.

2) Copy the script and put it into your application's code.

Stewart
Lance Wynn

2006-04-28, 6:56 pm

Are you using the MSScript.ocx control to execute the script, or are you
using a shell command?


"Kjell" <Kjell@discussions.microsoft.com> wrote in message
news:7243AF91-3B6A-4E37-BFEE-6C9BA618B455@microsoft.com...
Hi

I need to execute a VB-script from my Vb6 application (ActiveX exe
application) and cannot figure out how to receive the output generated by
the
script back to my application.

It's a regular VB.script (.vbs) and I have no problem executing it, the
output is coming as a message box.

but, what shall i do to get the output back to my ActiveX exe application?

Any ideas or links are highly appreciated. :-)

Kjell


Kjell

2006-04-28, 6:56 pm

So far I had Shell command in my mind. but MSScript.ocx sounds like an
interesting possibillity.

I assume it's part of the standard ocx's of my VS6 pro ?

Kjell


"Lance Wynn" wrote:

> Are you using the MSScript.ocx control to execute the script, or are you
> using a shell command?
>
>
> "Kjell" <Kjell@discussions.microsoft.com> wrote in message
> news:7243AF91-3B6A-4E37-BFEE-6C9BA618B455@microsoft.com...
> Hi
>
> I need to execute a VB-script from my Vb6 application (ActiveX exe
> application) and cannot figure out how to receive the output generated by
> the
> script back to my application.
>
> It's a regular VB.script (.vbs) and I have no problem executing it, the
> output is coming as a message box.
>
> but, what shall i do to get the output back to my ActiveX exe application?
>
> Any ideas or links are highly appreciated. :-)
>
> Kjell
>
>
>

Lance Wynn

2006-04-29, 6:56 pm

I don't know exactly where it comes from, suffice to say *I think* it's been
on every development machine I have had for the past 7 or 8 years, or
longer.

It gives you a lot more control over script execution then shell does. If
you have Interdev installed, you can even break your scripts, and debug them
through Interdev.

Lance


"Kjell" <Kjell@discussions.microsoft.com> wrote in message
news:776830BB-E977-469D-A0A5-DF4226BEED86@microsoft.com...
So far I had Shell command in my mind. but MSScript.ocx sounds like an
interesting possibillity.

I assume it's part of the standard ocx's of my VS6 pro ?

Kjell


"Lance Wynn" wrote:

> Are you using the MSScript.ocx control to execute the script, or are you
> using a shell command?
>
>
> "Kjell" <Kjell@discussions.microsoft.com> wrote in message
> news:7243AF91-3B6A-4E37-BFEE-6C9BA618B455@microsoft.com...
> Hi
>
> I need to execute a VB-script from my Vb6 application (ActiveX exe
> application) and cannot figure out how to receive the output generated by
> the
> script back to my application.
>
> It's a regular VB.script (.vbs) and I have no problem executing it, the
> output is coming as a message box.
>
> but, what shall i do to get the output back to my ActiveX exe application?
>
> Any ideas or links are highly appreciated. :-)
>
> Kjell
>
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com