>Hi,
>
>I've a question : for the moment we are using 'net use' to make a connection from a client to a server(drive) when the user is logging on to windows.
>
>But sometimes it happends that the 'mapped drive' is gone for some reason. Now i'm wondering if it's possible to connect to a drive on a server and give it a name like (F) without using the 'run' command so that the user doesn't get a black window.
>
>
>Thnx
The late Ed Rauh provided an example using the WNetAddConnection3() API call that should be available either in the FAQ section or the downloads. You may also be able to use WNetAddConnection()
DECLARE INTEGER WNetAddConnection IN Win32API;
STRING @lpszRemoteName, STRING @lpszPassword, STRING @lpszLocalName
lnresult = WNetAddConnection(@lcserver, 0, @lcdrive)
IF lnresult = 0 THEN
ENDIF
Additionally, if it's available, the Windows Script Host's WScript.Network object has this sort of functionality.
George
Ubi caritas et amor, deus ibi est