Jan 29, 2002 #1 EngJoo Programmer May 14, 2002 90 MY Hi everyone, In BAT file it is net use n: \\isa\Timberline Please Advise
Jan 30, 2002 #2 JGillespie Instructor Jul 3, 2001 174 GB Try this: Set WshShell = WScript.CreateObject("WScript.Shell" Set WshNetwork = WScript.CreateObject("WScript.Network" DriveLetter = "M:" RemotePath = "\\MyServer\MyShare" WShNetwork.MapNetworkDrive DriveLetter, RemotePath set WshNetwork = nothing set WshShell = nothing Obviously you will have to change the drive letter and server and share names to suit you self. HTH Jamie Gillespie j-gillespie@s-cheshire.ac.uk Upvote 0 Downvote
Try this: Set WshShell = WScript.CreateObject("WScript.Shell" Set WshNetwork = WScript.CreateObject("WScript.Network" DriveLetter = "M:" RemotePath = "\\MyServer\MyShare" WShNetwork.MapNetworkDrive DriveLetter, RemotePath set WshNetwork = nothing set WshShell = nothing Obviously you will have to change the drive letter and server and share names to suit you self. HTH Jamie Gillespie j-gillespie@s-cheshire.ac.uk
Jan 30, 2002 #3 jonscott8 Programmer May 12, 2000 1,317 US or if you prefer to continue using the NET USE command: Set oShell = WScript.CreateObject("WScript.Shell" oShell.Run "command.com /K net use n: \\isa\Timberline" Jon Hawkins Upvote 0 Downvote
or if you prefer to continue using the NET USE command: Set oShell = WScript.CreateObject("WScript.Shell" oShell.Run "command.com /K net use n: \\isa\Timberline" Jon Hawkins