>I am writing a VFP application that will connect a user and map the user to a drive using the RUN NET USE command in a VFP form. I need to be able to obtain an error number or have the screen not release after posting a successful logon or unsuccessful login attempt. I have tried using the ">" to redirect the screen message to a file with no luck. I am not able run a batch file because the username and password values are obtain from form controls. Does anyone have any suggestions has to how to obtain messages from the "net use" command???
There are other ways through the API to make connections, but you can use the ">" to send info to a file. I just tried it and it works OK.
RUN NET USE * \\machine\share > yourfile.txt
yourfile.txt contained:
Drive G: is now connected to \\machine\share.
The command completed successfully.