Troubleshooting Code 80070043 – The network name cannot be found
Watch out for the backslash.
Introduction to Error Code Error 80070043
This error, code 80070043 occurs when you try to map a network drive with a VBScript. A wild guess: you have mistyped the name of your share name.
The script does not map the network drive as you had hoped, instead you get a Windows Script Host error message, see diagram.
Note: This is similar to: 800704CF – No network provider. The difference is that error 80070043 indicates a problem with share, while 800704CF means there is a problem with the server name.
The Cause of Code 80070043
As ever, check the line number referenced by the error message. Perhaps the most common error is a missing backslash ‘/’. For example,
strRemotePath = "\\Bigserver\APPS" instead of
strRemotePath = "\\Bigserver\APPS\" Extra material kindly send in by Jamie T.
Another possibility is that you trying to map a network drive and you have misspelt the share name. The source of the error is WSH.MapNetworkDrive which gives us a big clue where to look for the error.
Mistyping server names gives a slightly different error. (No network provider could accept the given path)
The Solutions to The network name cannot be forund
Double check the share names with the actual name in your script. Open a command prompt and type net view. Alternatively, it could be the server name which is incorrect in which case you could launch the Run dialog box and type \\ server.
Example 1 of Code 80070043 Script
This is a complicated example because the error is reported on line 17. On close inspection you can see that the variable RemotePath2 was set earlier in the script and that homf is likely to by a typo for home.
‘Map Network Drive
‘on error resume next
Set WshShell = WScript.CreateObject("WScript.Shell")
Set Network1 = WScript.CreateObject("WScript.Network")
Set Network2 = WScript.CreateObject("WScript.Network")
DriveLetter1 = "v:"
DriveLetter2 = "u:"
RemotePath2 = "\\alan\homf"
RemotePath1 = "\\alan\ezine7"
Network1.MapNetworkDrive DriveLetter1, RemotePath1
Network2.MapNetworkDrive DriveLetter2, RemotePath2
‘WshShell.PopUp "Drive " & DriveLetter & " connected successfully."
Encouraging computers to sleep when they’re not in use is a great idea – until you are away from your desk and need a file on that remote sleeping machine!
WOL also has business uses for example, rousing machines so that they can have update patches applied. My real reason for recommending you download this free tool is because it’s so much fun sending those ‘Magic Packets’. Give WOL a try – it’s free.
Example 2 of Code 80070043 – Kindly sent in by Jamie T.
‘Map Network Drive
Dim strDriveLetter1, strRemotePath1, strDriveLetter2
Dim strRemotePath2, strDriveLetter3, strRemotePath3
strDriveLetter1 = "X:"
strRemotePath1 = "\\Bigserver\APPS\"
strDriveLetter2 = "Y:"
strRemotePath2 = "\\Bigserver\NAS\Shared\"
strDriveLetter3 = "Z:"
strRemotePath3 = "\\Bigserver\NAS\Erin\"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
objNetwork.MapNetworkDrive strDriveLetter3, strRemotePath3
Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems. Fortunately, SolarWinds have created the WMI Monitor so that you can examine these gems of performance information for free. Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.
Do you need additional help?
- For interpreting the WSH messages check Diagnose 800 errors.
- For general advice try my 7 Troubleshooting techniques.
- See master list of 0800 errors.
- Codes beginning 08004…
- Codes beginning 08005…
- Codes beginning 08007…
- Codes beginning 0800A…
Give something back?
Would you like to help others? If you have a good example of this error, then please email me, I will publish it with a credit to you:
If you like this page then please share it with your friends