>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.