Perhaps this:
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
?ShellExecute(0,"open","net"," USE R: /D","",0)
?ShellExecute(0,"open","net"," USE R: \\W0028109792\DATAWARE","",0)
clear dlls
>I need to map to a drive on another computer on the network. The network techs gave me the following batch file
>
> NET USE R: /D
> NET USE R: \\W0028109792\DATAWARE
>
>In the app's startup I do a
>
> RUN Yadayada.BAT
>
>Sometimes I see a DOS window and everything is great and other times I do not see a DOS window (and my users have to run the BAT file manually from a shortcut on the desktop). Most of my users are running Win XP. We are still using VFP 6 SP5.
>
>I am sure there is a better way of doing this in VFP (the politics of getting a login script are a problem at the moment).
>
>Thanks.
>
>Tim