Trouble Mapping Network Drives

Dan

Supreme [H]ardness
Joined
May 23, 2012
Messages
8,020
I have a brand new Windows 7 Pro PC and I'm trying to map drives from a different Windows 7 Pro PC as well as a NAS. When I simply just map the drives and than reboot the PC the drives are either missing or have a red X through them and need to be clicked on to "activate" them.

To resolve this I tried to run a mapping script every time the computer boots... however I'm getting an error when the script runs and nothing is mapping. When I manually map it or try to connect with \\pc-name\folder it connects fine.
The error usually is "System Error 53 Has Occurred The network path was not found"

An example of the script I'm running is as follows (the timeout is to give the PC time to establish a network connection... it has an SSD and boots quickly):

timeout /t 5
net use a: /delete
net use b: /delete
net use c: /delete

net use a: \\nasbox\Folder
net use b: \\nasbox\Folder 2
net use c: \\win7pro-pc\Folder​
 
Do you specify a user to use/connect to the network path? How do you authenticate?
 
Whats the letter of your OS drive...not C?

why use A, B, C?
Just an example. Really using other letters like H, X, Z
Hoping these are variables for something like m:, n:, o:.
Exactly
To answer your other question, the folders I'm trying to connect to are shared with "everyone" and the computer does not have a password on it. If I simply open an explorer window and type //computername it comes right up.
What happens when you run the script manually?
can you map the drives using ip address?
If I run the script manually the exact thing happens. If I map it manually in windows without the script using the exact same address (//nasbox/folder) it works fine. I can try replacing the name with the IP address and see if it likes that better and report back. Might be tough to do today because of the holiday weekend but I'll give it a go.
 
try pinging the other machines by name? Maybe a name resolution problem, that is why i suggested using the ip address. I cannot remember if the GUI resolves name differently than the command line. It has been a while.

Try the steps below for network discovery
  1. go to Control Panel
  2. Select Network and sharing center
  3. Select Advanced sharing settings
  4. Turn off network discovery and file sharing
  5. Save changes and close
  6. reboot the machine
  7. go back into sharing center
  8. Turn on network discovery and file sharing
 
Do you specify a user to use/connect to the network path? How do you authenticate?

Yep, that's my first thought.

Even though Windows lets you use an account with a blank password, it will not let you use an account with a blank password to authenticate
from another system to access resources. It won't let you RDP with a blank password either.

Also..... it's easy to specify an account/password with the net use command. That will connect to the resource without manually entering a password.

.
 
Where is the script PC getting its IP address from? Wondering if the on boot script is running before the IP stack has settled down. Might account for the manual script running correctly while the on boot script fails.

Try including a ping command to ping a network device you know is up and running when the PC boots.
 
try pinging the other machines by name? Maybe a name resolution problem, that is why i suggested using the ip address. I cannot remember if the GUI resolves name differently than the command line. It has been a while.

Try the steps below for network discovery
  1. go to Control Panel
  2. Select Network and sharing center
  3. Select Advanced sharing settings
  4. Turn off network discovery and file sharing
  5. Save changes and close
  6. reboot the machine
  7. go back into sharing center
  8. Turn on network discovery and file sharing
I can ping both by name and IP address. I tried the reboot trick you recommended and same issue is happening
Yep, that's my first thought.

Even though Windows lets you use an account with a blank password, it will not let you use an account with a blank password to authenticate
from another system to access resources. It won't let you RDP with a blank password either.

Also..... it's easy to specify an account/password with the net use command. That will connect to the resource without manually entering a password.

.
The PC that we are connecting to does not have a password, I'll see if I can add one and give it a shot. The only issue is a bunch of people connect to it and they are all working fine so I'm weary to play with that computer and possibly;y cause issues with everyone else.
Where is the script PC getting its IP address from? Wondering if the on boot script is running before the IP stack has settled down. Might account for the manual script running correctly while the on boot script fails.

Try including a ping command to ping a network device you know is up and running when the PC boots.
The PC running the script is DHCP getting the IP from the router. I set a 7 second delay before the script starts mapping drives to give the PC time to establish a network connection. I can try a little longer delay if you think that will help. Or I can try a static IP on the PC possibly.
.
 
. . .

The PC running the script is DHCP getting the IP from the router. I set a 7 second delay before the script starts mapping drives to give the PC time to establish a network connection. I can try a little longer delay if you think that will help. Or I can try a static IP on the PC possibly.
.

I know from watching my PC boot that the little icon for Network status sometimes takes a while to show good. Not sure when that happens compared to when boot scripts try to run.
Might include something like this in your script: (not real script language, been too long since last needed one.)

while(ping [nasbox address] == FAIL)
{ print '.'; pause 1 second}

rest of your scrip.
set the script window to remain after completion during your testing. Number of . printed will give some idea of network ready lag.
 
>>The PC that we are connecting to does not have a password, I'll see if I can add one and give it a shot. The only issue is a bunch of people connect to it and they are all working fine so I'm weary to play with that computer and possibly;y cause issues with everyone else.

It doesn't have to be the main account you are using to authenticate. You could makeup a new account "drives" with password "drives" and test with that.
Then just always use the drives account in your scripts.

Also..... try the PERSISTENT switch on the mappings. "net use /?" for help.

.
 
OK... I did some major Googling and found a workaround that did the job perfectly it seems.

Here is the magical youtube video: youtu.be/q8KVJdgewNk

They wrote a script that is set to run minimized on boot up. The script essentially checks to see if the network is active, than checks to see if any network drives are down, and if there are it reconnects them and it skips over the ones that are OK. It's not a really a mapping script so those map drive errors I was having aren't a thing.

Thank you all for your input. This work around fixes my solution
 
Back
Top