Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returning arguments

Status
Not open for further replies.

JahDW

IS-IT--Management
May 22, 2003
31
US
Is it possible to write a vbscript that not only accepts arguments, but also returns arguments upon completion?

For instance, the script I've written accepts an IP address and then uses the IP address to determine dns suffix, location of computer, and a few other server names (all part of a global logon script). The script does everything correctly, but I can't figure out a way to have it pass the variables back out when it completes.
 
How is this script called ?
Can it be called as a function returning a well known formatted buffer ?
You may also consider writing the info in a temp file.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
i want the script to ba able to be called from anywhere... another script, an application, the command line, etc

and I'm trying to avoid writing to a file.
 
You could create an enviornment variable if it is a very small amount of data that you wish to return.
 
yes yes, but I'm trying to avoid any kind of middleman. Ideally they would return in the same way as the exit code... which I tried to use but it won't pass out a string.
 
There is no way to pass anything except an Int out of a script. Thus some other method must be used to pass the data.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top