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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exchange parameters between VB6 and VBS

Status
Not open for further replies.

boein

Technical User
Jul 17, 2003
84
BE
Hi,

I have a vb6 program that calls a vbs-script. This program is run under a different user with admin rights in a shell executed by psexec. I choose to do this so the code in the vbs can be executed with admin rights while the main program itself is run with normal user-rights. Problem is this vbs should return a value to the main VB6 program. I don't know if it's possible to do so, I tried to exchange a parameter by putting the value in an environment variable but it doesn't work either because of the psexec that's running the scrip as a different user so the environment var is only available in this user environment.
Maybe there's an easier way to achieve all this, anyway all help is very much appreciated.

Boein
 
May be get the script to write its data to a file which you can import from the Vb6 code.
 
I would say that a file is the simplest solution and the one that I would choose. If however you need a different solution you can have the VB6 app listen on a socket and have the vbs send the information there.

[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