Re: How can I create a global variable?



"Hartmut Callies" <Spam_callies@xxxxxx> wrote in message
news:%23$FV8t07FHA.3044@xxxxxxxxxxxxxxxxxxxxxxx
>
> Hello,
> I have two vbScripts. In a.vbs I will create a global variable glVariable
as
> String, so that
> I can read this variable in a other script (b.vbs) - msgBox glVariable.
> How can I do that?

Considering using the volatile environment. Set the variable in a.vbs like
this:

oWSH.Environment("VOLATILE")("glVariable") = "Information from script a.vbs"

Read it from b.vbs using something like this:

sVar = oWSH.Environment("VOLATILE")("glVariable")


.



Relevant Pages