Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and Windows Scripting Host
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00141465
Message ID:
00141626
Views:
22
Here is a sample that deals with network resources...


*/ Create network object

WSHNetwork = CreateObject("WScript.Network")

*/ Computer name
?WSHNetwork.ComputerName

*/ User Name
?WSHNetwork.UserName

*/ Domain Name
?WSHNetwork.UserDomain

*/ Enumerate through network drives

NetWorkDrives = WSHNetwork.EnumNetworkDrives
?networkdrives.count
For x = 0 to NetWorkDrives.Count - 1 Step 2
?NetWorkDrives.Item(x),NetWorkDrives.Item(x+1)
Next Drive

*/ Map a network Drive

WSHNetwork.MapNetworkDrive("K:", "\\idtmain2\share_f")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform