Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
netuse and mapnetworkdrive
Name: gravz84 Date: October 1, 2006 at 22:43:45 Pacific OS: windows CPU/Ram: x Product: x
Comment:
Hi, Could anyone please tell me how netuse(in windows) and mapnetworkdrive(using a script object) are different? I wrote a script calling a batch file to map a shared folder to a drive letter and then perform some operation using that drive letter. fso = CreateObject "Scripting.FileSystemObject") fso.Copyfile(c:\xyz, "y:\xyz",true)
this somehow didn't work. Then i tried mapping the drive inside the program: nwobj = CreateObject("WScript.Network") nwobj.MapNetworkDrive ("y:", "\xyz", False, Username, Password)
and then did the operation and it worked. Could someone explain what the difference and the problem is here?
Name: wanderer Date: October 2, 2006 at 09:47:29 Pacific
Reply:
try the "programming" forum to your left
Give a person a fish you feed them for a day. Ask a person to internet search and they learn a skill for a lifetime.
0
Response Number 2
Name: gravz84 (by GRAVZ84) Date: October 2, 2006 at 17:54:58 Pacific
Reply:
no reply there. plus its related to networks also!
0
Response Number 3
Name: dinkaragg Date: October 3, 2006 at 05:22:59 Pacific
Reply:
net use z: /delete net use z: \\computername\shared
This is all u need to create a batch file, where z is the Map Drive name and \\computername\shared is the path to the folder.
The first command is just to delete any existing drive with that name.
0
Response Number 4
Name: gravz84 (by GRAVZ84) Date: October 4, 2006 at 20:46:20 Pacific
Reply:
lol..i know that.. but can u think of a reason why that drive letter can't be used inside a program like this.. fso = CreateObject "Scripting.FileSystemObject") fso.Copyfile(c:\xyz, "z:\xyz",true) (where z: is the mapped drive letter) cos that's what doesn't work
but if i do mapping inside the program using wscript.network it works!
Summary: I ran into something at a small company that I haven't seen before. There are 5 XP Home computers in a workgroup. "Out of the blue" the contents of My Network Places has disappeared on a couple of ma...
Summary: I ran into something at a small company that I haven't seen before. There are 5 XP Home computers in a workgroup. "Out of the blue" the contents of My Network Places has disappeared on a couple of ma...
Summary: I tried to do a home network to share a dial-up internet connection. One computer is a Dell Inspiron 8100 running Windows XP Professional laptop the other is a HP Slimline s7520n PC running Windows X...