Map network drive - nas

Din

Silver Level Poster
Trying to make a map network drive which it too a nas however it keeps failing since my computer isn't connecting to my wifi quick enough and then it wont retry,

any suggestions?
 

SpyderTracks

We love you Ukraine
You can create a little batch file (.bat) and put it in the startup folder so it runs when the pc starts

Just put the following into a .txt file

net use s: \\tower\movies /P:Yes (where "s:" is the drive letter, then \\tower\movies is the path to the nas and \P:Yes is meaning a persistent connection which will keep active)

Then save the .txt and rename it .bat and put it in the startup folder.
 

Din

Silver Level Poster
You can create a little batch file (.bat) and put it in the startup folder so it runs when the pc starts

Just put the following into a .txt file

net use s: \\tower\movies /P:Yes (where "s:" is the drive letter, then \\tower\movies is the path to the nas and \P:Yes is meaning a persistent connection which will keep active)

Then save the .txt and rename it .bat and put it in the startup folder.

AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

That Folder?
 

SpyderTracks

We love you Ukraine
In fact, easier to put it as a scheduled task

goto Control panel, Administrative tools, scheduled tasks, and create one to run on startup and point to the batch file
 

Din

Silver Level Poster
In fact, easier to put it as a scheduled task

goto Control panel, Administrative tools, scheduled tasks, and create one to run on startup and point to the batch file

so then just have the batch file anywhere really?
 
Last edited:

Din

Silver Level Poster
In fact, easier to put it as a scheduled task

goto Control panel, Administrative tools, scheduled tasks, and create one to run on startup and point to the batch file

THis doesn't work...

I think the issue may be its not remembering my different login details rather then not connecting? any ideas?
 

SpyderTracks

We love you Ukraine
THis doesn't work...

I think the issue may be its not remembering my different login details rather then not connecting? any ideas?

Yep, sure, exactly the same format just with the added username:password bit:

net use x: \\server1\share1 /user:bob1 password /persistent:yes
 

Din

Silver Level Poster
Yep, sure, exactly the same format just with the added username:password bit:

net use x: \\server1\share1 /user:bob1 password /persistent:yes

OK so this doesn't work however if I run the bat file it connects so im guessing its something todo with on startup?
 

SpyderTracks

We love you Ukraine
OK so this doesn't work however if I run the bat file it connects so im guessing its something todo with on startup?

well, the persistent:yes command means that it should automatically reconnect at startup, adding it as a scheduled task or in the startup folder is just a failsafe in case it doesn't reconnect. Try restarting now and see if the mapped drive remains on startup.
 
Last edited:

Din

Silver Level Poster
well, the persistent:yes command means that it should automatically reconnect at startup, adding it as a scheduled task or in the startup folder is just a failsafe in case it doesn't reconnect. Try restarting now and see if the mapped drive remains on startup.

It remains just disconnected. Running the bat file then connects it or I can double click it and enter my pw and connect that way. Neither are what im after?
 

SpyderTracks

We love you Ukraine
It remains just disconnected. Running the bat file then connects it or I can double click it and enter my pw and connect that way. Neither are what im after?

Then just need to sort out the scheduled task... it may be worth right clicking on the .bat file, go to properties, security and select run as administrator (I'm guessing using the auto logon bit may require elevated privileges). Does that help?

Edit: it's the compatibility tab, not security
 
Last edited:

Din

Silver Level Poster
Then just need to sort out the scheduled task... it may be worth right clicking on the .bat file, go to properties, security and select run as administrator (I'm guessing using the auto logon bit may require elevated privileges). Does that help?

Edit: it's the compatibility tab, not security

Its greyed out.

went into the task and checked "Run with highest privileges" and makes no diff. I have the feeling its just failing and not retrying.
 

mishra

Rising Star
Hmm, it almost feels like you are overt hinking this (or something else is at play).
Once your computer is running and NAS is online you should be able to map a network share either using above script or manually do it from Windows Explorer. Now once your mapped drive is there it should remain there mapped always (untill you manually disconnect it).

When you restart your PC map drive should be there automatically... there is no need to map it again (using task scheduler script or manually). It may have a red cross on itself but one you click your drive it should just connect.

Is it that in your case that once you restart your PC, there is no mapped drive any more in Windows Explorer?

edit: Also are you mapping share from your NAS by it's name or IP address?
 
Last edited:

SlimCini

KC and the Sunshine BANNED
I have a mapped networked drive and it does the same thing (ie. it has a red cross on it after booting up). But as soon as you actually click on it, it connects and opens up the drive. Does yours connect as soon as you actually click on it, or is the drive not even showing?
 

Din

Silver Level Poster
So ive tried connecting it using botht he name and IP.

SO my issue was that it would still be there just discounted and id have to click it and login for it to work. It wouldn't remember my login details however ive managed to fix this by forcing in my details using the windows credential manager so this is fine now.

When I load up now I get a annoying pop up box saying "some network decives couldn't be connected" my device is there just disconnected (red x) however when I press it it connects and loads so that's fine.

Now I just don't want the pop up box because it annoys me.
 
Top