Re: script variable to batch file
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Tue, 19 Apr 2005 17:27:36 -0500
"Daniel" <Daniel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:28FB1FC1-616B-456D-9096-E06E491656BD@xxxxxxxxxxxxxxxx
> How can I transfer a dim set in a script to a batch file that is executed
by
> this script.
>
> In my script I set a variable named "strPath", then I execute a bat file
> name "CreateMsg.bat". However, for this batch file to work properly I
need
> it to have access to the strPath value. How can this be achieved?
>
> Thanks,
>
> Daniel
Pass it as a parameter.
Option Explicit
Const cBAT
cBAT = "CreateMsg.bat"
Dim strPath
strPath = "whatever"
Dim strRUN
strRUN = "%comspec% /c " & cBAT & " " & strPath
Dim objWSS
Set objWSS = CreateObject("WScript.Shell")
objWSS.Run strRUN, 0, True
Set objWSS = Nothing
.
- Follow-Ups:
- Re: script variable to batch file
- From: jsobo119@xxxxxxxxx
- Re: script variable to batch file
- References:
- script variable to batch file
- From: Daniel
- script variable to batch file
- Prev by Date: Re: HOW TO or CASES IN vb script
- Next by Date: Re: compile an HTA code at its images into a resource .dll
- Previous by thread: script variable to batch file
- Next by thread: Re: script variable to batch file
- Index(es):
Relevant Pages
|