Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying files to a password protected shared folder
Message
De
20/03/2000 16:21:15
 
 
À
20/03/2000 15:26:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00348073
Message ID:
00348111
Vues:
33
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform