Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sys(0)
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Re: Sys(0)
Miscellaneous
Thread ID:
00590158
Message ID:
00590644
Views:
40
This message has been marked as a message which has helped to the initial question of the thread.
>The sollution that we arrived at, is to call a VFP executable from the login script. Among other things, the exe will get the user ID (via WSH) and write it to a file on the local drive. Then the FPD/FPW apps will parse the id from the file when they start.
>I'll try your sollution, one thing that is fuzzy now is how do you "suck down the result from the external execution". Also, marking FOXRUN.PIF 'Close on Exit' checkbox on all workstations could be a hassle.

Write it into a file and read the file created by the child in the parent process when the batch job completes. This lets you "suck down" the result - you read it from a file and then blow it away when you finish.

In the login script, you could create an environment variable using the value rather than writing a file, and then use GETENV() to read the result from Fox rather than look for a file and read it. The problem with using GETENV() to do this by shelling to DOS within an app is that you do not reinherit modifications to the environment made in children spawned by RUN; it takes a significant amount of code to hand off the STDIN of the current process to the STDOUT of the child, have the child write to STDOUT, then read STDIN and modify your environment so that you maintain the correct environment context. A file is lots easier to do; not quite as neat, but infinitely simpler to construct and maintain, at relatively low cost.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform