Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying files to a password protected shared folder
Message
From
24/03/2000 19:26:48
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00348073
Message ID:
00350284
Views:
31
Thanks a lot for your answer, it was very helpful. However, since I see there are at least two approaches do accomplish this, I'd like to ask if both methods are available into the win 9x environment (without having to install any adds, my development machine has lots of things installe). In other words I would appreciate any advise about pros and cons on both methods, API calls and the scripting object.

Thanks in advance.

Oscar Corte


>>I need to copy a set of files to a users shared folder. Such folder is password protected and the Copy File command fails unless you open the target folder and the password has been already provided.
>>
>>
>>Is there any secondary method to accomplish this without the use of a .BAT file?
>>
>
>You can make a connection to a shared folder using the Win32 API (WNetAddConnection(), WNetAddConnection2() or WNetAddConnection3() are capable of connecting to a folder with share-level security; WNetAddConnection() will not provide direct access to user-level shares unless the current userid is a valid user for the folder.) Alternatively, the Windows Script Host's Wscript.Network COM object has a MapNetworkDrive method that could make the needed connection. Once the shared folder is mapped and access has been authenticated, you can freely access the folder via the mapped connection.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform