Click to See Complete Forum and Search --> : url with environment variable in VBScript


cessua
08-26-2005, 10:06 AM
I have defined the evironment variable:

CAD_SERVER = SVCHP5

In my method I can get to work this variable in vbscript:

Dim command_target_server As String = "http://SVCHP5/cgi-bin/cad_doc/trustexec"

But when i try to use it with the environment variable it doesn't work:

Dim command_target_server As String = "http://%CAD_SERVER%/cgi-bin/cad_doc/trustexec"

SVCHP5 is a Unix server, but the VBScript sits on a Windows server.
Do you have any advice on this?

Thanks,

Memnoch
08-26-2005, 10:31 AM
Try this

Dim Command_Target_Server As String = "http://" & CAD_SERVER & "/cgi-bin/cad_doc/trustexec"

cessua
08-26-2005, 10:53 AM
Memnoch, CAD_SERVER is an environment variable that is sitting on the client and not a VBs variable, i guess i am going to have to pass the value (SVCHP5) to the VBScript, but i know that with javascript i can't read environment variables. Any ideas?