For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > June 2004 > How to call an "exe" aplication inside a VBScript Subroutine?









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 How to call an "exe" aplication inside a VBScript Subroutine?
SHA

2004-06-25, 6:58 pm

Hi,
Does anybody knows how to call an "exe" program inside of a VBScript subroutine? I have the following idea (I know it does not work, but this is the idea):
----------------------------------------------
Sub ZipCompress(ZipFile,FilesToZip)
'ZipFile = Path and filename for the zipped file
'FilesToZip = List of files to zip

Parameters ="[-min] -a " + ZipFile + " " + FilesToZip
Execute "C:\Program Files\Winzip\WINZIP32.EXE" Parameters

End Sub
------------------------

Does anybody can help me?

Thanks,
Salvador Hernandez
Bob Butler

2004-06-25, 6:58 pm

"SHA" <SHA@discussions.microsoft.com> wrote in message news:022DC947-
9614-4D10-88B2-EA731362BC23@microsoft.com
> Hi,
> Does anybody knows how to call an "exe" program inside of a
> VBScript subroutine? I have the following idea (I know it does not
> work, but this is the idea): -----------------------------------------
> ----- Sub ZipCompress(ZipFile,FilesToZip) 'ZipFile = Path and
> filename for the zipped file 'FilesToZip = List of files to zip
>
> Parameters ="[-min] -a " + ZipFile + " " + FilesToZip
> Execute "C:\Program Files\Winzip\WINZIP32.EXE" Parameters


you should ask VBScript questions in a VBScript newsgroup...

you have 2 easy options:
set oShell=createobject("WScript.Shell")
exitcode=oShell.Run("commandline",windowstyle,runsynchronous)
-or-
Set oProc=oShell.Exec("commandline")

The latter requires later versions of the scripting engine but lets you
access stdin and stdout which can be useful.

--
Reply to the group so all can participate
VB.Net... just say "No"

SHA

2004-06-30, 3:55 pm

Bob,
Thank you, it worked all right, I used your second option.

"Bob Butler" wrote:

> "SHA" <SHA@discussions.microsoft.com> wrote in message news:022DC947-
> 9614-4D10-88B2-EA731362BC23@microsoft.com
>
> you should ask VBScript questions in a VBScript newsgroup...
>
> you have 2 easy options:
> set oShell=createobject("WScript.Shell")
> exitcode=oShell.Run("commandline",windowstyle,runsynchronous)
> -or-
> Set oProc=oShell.Exec("commandline")
>
> The latter requires later versions of the scripting engine but lets you
> access stdin and stdout which can be useful.
>
> --
> Reply to the group so all can participate
> VB.Net... just say "No"
>
>

SHA

2004-06-30, 3:55 pm

I'm sorry, I forgot to tell you I could not find a VBScript forum inside microsoft communities, Do you have any link that could help me?

Thanks again,
Salvador Hernandez

"Bob Butler" wrote:

> "SHA" <SHA@discussions.microsoft.com> wrote in message news:022DC947-
> 9614-4D10-88B2-EA731362BC23@microsoft.com
>
> you should ask VBScript questions in a VBScript newsgroup...
>
> you have 2 easy options:
> set oShell=createobject("WScript.Shell")
> exitcode=oShell.Run("commandline",windowstyle,runsynchronous)
> -or-
> Set oProc=oShell.Exec("commandline")
>
> The latter requires later versions of the scripting engine but lets you
> access stdin and stdout which can be useful.
>
> --
> Reply to the group so all can participate
> VB.Net... just say "No"
>
>

Bob Butler

2004-06-30, 3:55 pm

"SHA" <SHA@discussions.microsoft.com> wrote in message news:CC185B98-
8EA2-4BD4-A3A1-1611E61AE31A@microsoft.com
> I'm sorry, I forgot to tell you I could not find a VBScript forum
> inside microsoft communities, Do you have any link that could help
> me?


Don't know what "microsoft communities" you mean. If you are using a web
browser then drop it and use a real newsreader (or even Outlook Express).
If you connect to the news.microsoft.com server you should find a group
named microsoft.public.scripting.vbscript

--
Reply to the group so all can participate
VB.Net... just say "No"

SHA

2004-06-30, 3:55 pm

Thanks again.

"Bob Butler" wrote:

> "SHA" <SHA@discussions.microsoft.com> wrote in message news:CC185B98-
> 8EA2-4BD4-A3A1-1611E61AE31A@microsoft.com
>
> Don't know what "microsoft communities" you mean. If you are using a web
> browser then drop it and use a real newsreader (or even Outlook Express).
> If you connect to the news.microsoft.com server you should find a group
> named microsoft.public.scripting.vbscript
>
> --
> Reply to the group so all can participate
> VB.Net... just say "No"
>
>

Sponsored Links







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

Copyright 2009 codecomments.com