Hi all,
Hoping someone can help me. I'm using WSH to automatically map a network drive when someone opens a webpage. Below are the codes
<HTML>
<Body>
<script language="VBScr ipt" type="text/vbscript">
Option Explicit
On Error Resume Next
Dim WshNetwork
Set WshNetwork = CreateObject("W Script.Network" )
WshNetwork.MapN etworkDrive "N:", "\\Sales2\custo mer\" '* Map drive N.
If Err.Number <> 0 Then '* Check to make sure the operation succeeded.
‘Error message
End If
</script>
</BODY>
</HTML>
No issue with mapping the drive using the above code. BUT when I try to view files / folders within N drive, there's no information there. There should be stacks of files/folders/subfolders but it’s blank !!!!. When I check the drive using Net Use in DOS, this is what I’ve got
Status | Local | Remote | Network
OK | M: | \\Sales1\custom er | Microsoft Windows Network
| N: | \\Sales2\custom er | Web Client Network
OK | O: | \\Sales3\custom er | Microsoft Windows Network
I thought perhaps "Web Client network" might be part of the problem. If so, what are the options to fix the problem
I hope someone can explain what went wrong before I go nuts !!!
Thanks in advance
Hoping someone can help me. I'm using WSH to automatically map a network drive when someone opens a webpage. Below are the codes
<HTML>
<Body>
<script language="VBScr ipt" type="text/vbscript">
Option Explicit
On Error Resume Next
Dim WshNetwork
Set WshNetwork = CreateObject("W Script.Network" )
WshNetwork.MapN etworkDrive "N:", "\\Sales2\custo mer\" '* Map drive N.
If Err.Number <> 0 Then '* Check to make sure the operation succeeded.
‘Error message
End If
</script>
</BODY>
</HTML>
No issue with mapping the drive using the above code. BUT when I try to view files / folders within N drive, there's no information there. There should be stacks of files/folders/subfolders but it’s blank !!!!. When I check the drive using Net Use in DOS, this is what I’ve got
Status | Local | Remote | Network
OK | M: | \\Sales1\custom er | Microsoft Windows Network
| N: | \\Sales2\custom er | Web Client Network
OK | O: | \\Sales3\custom er | Microsoft Windows Network
I thought perhaps "Web Client network" might be part of the problem. If so, what are the options to fix the problem
I hope someone can explain what went wrong before I go nuts !!!
Thanks in advance
Comment