Windows wireless/mapped share stupidity - need help



  •  This is both a WTF and a request for help if anybody has a solution.

    Windows seems to not understand that it has to wait for the wireless connection to actually come up before it attempts to reconnect any mapped network shares. Every time I restart my computer (daily) I get the notification that it couldn't reconnect to the network drives immediately, and a few seconds later the wireless connects, at which point I have to manually reconnect the mapped drive letters. This appears to be a problem across many versions of windows, I'm using 7. It's a pain in the ass. Additionally, any applications that try to access these unmapped drives just fail instead of windows trying to reconnect to the share, I have to use windows explorer to browse to the network share first before any applications can access it, and that seems to be the only way to initiate the reconnect.

    There's a lot of people on the interwebs having this problem but nobody seems to be able to describe the problem correctly and they all get asinine solutions suggested (like how to turn off that notification in the registry, etc. things that don't fix the root issue). 

     I am not sure if the issue is with the particular drivers I have installed not working properly and windows thinks it _should_ be connected, but isn't, or if windows is and has always been that stupid and some drivers coincidentally are fast enough to connect before windows attempts to map the drives, and everything just happens to work. 

    Any thoughts? 



  • Do you have any other NICs (including virtual)?



  • My wireless is up on my Windows 7 before logon.  Check Network and Sharing Center and check the wireless profiles.  Make sure the profile in question is set to auto connect when it's available and make sure that all users can connect to it.

    Other than that, maybe you can set the mapped drives to not connect automatically and use a batch file to connect to them that you can execute on demand.  Look up the command "net use" to see how to map drives in a batch file.

     

    Paul



  •  You might be able to get this working another way:

     

    * Go to Start -> Run, type 'gpedit.msc' and hit OK

    *  Go to Computer Configuration -> Administrative Templates -> System -> Logon

    * Try changing the "Always wait for the network" option to Enabled (it's not defined by default)

     

    This should wait for the wireless to come up before it'll actually let you into the PC, which (should) let the drives map normally.



  • alegr: I do have other NICs, both virtual and real, and I see why those could potentially be a problem. None of them are physically connected, though I do run some VMs, so I will check to see if that is causing the issue, good idea thanks. Possibly one of the virtual NICs could be "connected" and windows thinks all is well and continues.

     pauly: I'm certain the wireless doesn't come up until after I logon, even if I wait at the logon prompt for a long time. I've specifically checked that. I will check and see if I can change that so it comes up regardless. Also good advice, thanks.

     Corvidae: that sounds like a good avenue to check as well.

    Thanks all for the sound advice. Hopefully this WTF can be fixed :) 



  •  Still no luck. I tried deleting the virtual network connectors and removing the wired LAN, and that didn't work. I tried using gpedit and enabled "always wait for the network" but it seems to ignore that. The wireless icon doesn't even show up in the systray until after the notice "could not reconnect to network shares" appears. It sucks. There's nothing I can see in the wireless config that looks like it shouldn't/wouldn't auto-connect when it's available. 



  • I have this same problem too, with a wired network, and have since Win2k as far as I can recall.

    After re-booting I always have to go to explorer and click on all my shares.

    I just figured one day someone at Microsoft will figure out how to make on OS that works properly.



  •  Yes, it's a bit of a bummer but given the nature of Wireless connections as handled in Windows  (not always guaranteed to be present, designed to be used on the move and not as a fixed connection) I suppose it's to be expected.

    The problem is that it appears that most Wireless Connections that are using 3rd party wireless connection tulities simply won't connect until you have logged in (they may contact the Access Point and pre-load the DHCP information, etc, but the actual connection may not become active until you enter Windows user+password) because they're not running as services, they're just startup software.

    If you're using  a 3rd party utility, they may have an option to do a pre-login connection.e.g Intel have a Pre-Login connect for some of their Wireless chipsets:

     http://www.intel.com/support/wireless/wlan/sb/cs-014563.htm

    If you are using the Windows Wireless Zero Config, then maybe just try waiting 30 seconds after the login screen appears before you login, your connection should be established by then.

    Another thing that may help, if you are using DHCP, is to switch to Static IP addressing. That will at least get the connection established faster than DHCP, and allow a batch file (net use commands) to work (most of the time, but never 100% guaranteed)

     

    hth



  • I agree with katana and Corvidae. There is a possibility that you are using a 3rd-party utility that needs to run as an application, after you log on, instead of the WZC service and letting Windows handle the connection. That also explains why the "Always wait for network" setting has no effect, which should solve your issue really nicely.

    If your drivers/WLAN utility can be configured to use Wireless Zero Configuration, then that could make a big difference.



  • EDIT:Doh, just realised I just posted the same info as katana...



  • Put a batch file in your Startup directory with the appropriate sleep and net use commands. That should do the trick, as long as you don't mind a command prompt window staring at you for a few seconds after logging in.

    (Note: you'll need to install the sleep utility of your choosing. I've got some gnu ports on my system, but the Win 2003 Resource Kit Tools include a sleep command too. Or just misuse ping.)



  • @pauly said:

    Other than that, maybe you can set the mapped drives to not connect automatically and use a batch file to connect to them that you can execute on demand.  Look up the command "net use" to see how to map drives in a batch file.


    @GettinSadda said:

    After re-booting I always have to go to explorer and click on all my shares.


    @db2 said:

    Put a batch file in your Startup directory with the appropriate sleep and net use commands. That should do the trick, as long as you don't mind a command prompt window staring at you for a few seconds after logging in.

    I don't understand why everyone is so worried about whether the drives are connected or not that they go to these lengths.

    Why not just set the mapped drives to not connect automatically and let that be an end of it?  Any time you actually try to access one of them, windows will automatically connect to it if it hasn't already done so, and if you never use a given drive during a session, it won't matter.  Either way, I don't understand the need to go and connect them manually or automatically like this.



  • @DaveK said:

    Why not just set the mapped drives to not connect automatically and let that be an end of it?  Any time you actually try to access one of them, windows will automatically connect to it if it hasn't already done so, and if you never use a given drive during a session, it won't matter.  Either way, I don't understand the need to go and connect them manually or automatically like this.
     

    I'm with DaveK.

    For the record, Windows 7 never gripes at me about my network drives being unavailable if I connect my tablet's wifi to a network other than my home network-- maybe all you need to do is figure out why Windows thinks it needs to connect to the drive right away (shortcut icon? Favorited folder?) and get rid of that? Then you should get the holy grail of Windows 7 not bugging you about network drives + automatic reconnection when you actually *do* need something from it.



  • @DaveK said:

    I don't understand why everyone is so worried about whether the drives are connected or not that they go to these lengths.

    Why not just set the mapped drives to not connect automatically and let that be an end of it?  Any time you actually try to access one of them, windows will automatically connect to it if it hasn't already done so, and if you never use a given drive during a session, it won't matter.  Either way, I don't understand the need to go and connect them manually or automatically like this.

     

    I think this is the main issue:

    @EJ_ said:

    Additionally, any applications that try to access these unmapped drives just fail instead of windows trying to reconnect to the share, I have to use windows explorer to browse to the network share first before any applications can access it, and that seems to be the only way to initiate the reconnect. 




  • @Someone You Know said:

    @DaveK said:

    I don't understand why everyone is so worried about whether the drives are connected or not that they go to these lengths.

    Why not just set the mapped drives to not connect automatically and let that be an end of it?  Any time you actually try to access one of them, windows will automatically connect to it if it hasn't already done so, and if you never use a given drive during a session, it won't matter.  Either way, I don't understand the need to go and connect them manually or automatically like this.

     

    I think this is the main issue:

    @EJ_ said:

    Additionally, any applications that try to access these unmapped drives just fail instead of windows trying to reconnect to the share, I have to use windows explorer to browse to the network share first before any applications can access it, and that seems to be the only way to initiate the reconnect. 


    D'oh, I missed that.  That sounds like a real bug then; the autoconnect ought to be triggered when those apps attempt to use the drives.

    Maybe, after many long years of people complaining about those massive long SMB/NetBIOS timeouts that lock up your whole UI for a minute or two at a time, MS decided to fix it the stupid way, by turning the timeout down to a few seconds, rather than the smart way, by doing the blocking connection attempt in a separate thread....

     



  •  It looks like the only answer is to use batch files that wait "a bit" and then reconnect things, which just seems... kludgy. Oh well, if it works it works. It just seemed in my head that there must be a "real" way to do this, haha.

    I'm not using a 3rd-party wireless management thingy, just the windows default one (before win7 it was referred to as wireless zero I believe, but now has a new name, same great taste). From what I've read it supposedly _should_ connect before logging in, but it isn't, and I've never come across a windows computer that actually does that on wireless. From what I've read over the past few days, wireless networks are handled on a user-credentials basis, whereas wired networks are handled on a computer-credentials basis, and there doesn't seem to be a way to say "force wireless to work under user X even if user X hasn't logged on" or something like that. 

    The issue I'm having is definitely when applications try to access the "disconnected" drives, they just fail and the autoconnect never even tries. It only ever tries when I manually with windows-explorer try to connect, and then it realizes "oh these work now" and everything is fine from then on. 

     Thanks for all your advice everybody.



  • Hang on a sec, I just thought of something worth considering:

    @EJ_ said:

    Additionally, any applications that try to access these unmapped drives just fail instead of windows trying to reconnect to the share, I have to use windows explorer to browse to the network share first before any applications can access it, and that seems to be the only way to initiate the reconnect. 


    What applications in particular?  I mean, obviously not explorer because you told us that's how you get it to reconnect, and I've found (at least on XP) that "dir DRIVELETTER:" from a cmd shell causes the drive to remount, so what apps are you having problems with, and more particularly, do any of them have their own installed services that autostart?  When services are involved, you have a means of adding dependencies to make sure things start up in the right order and don't run until all their dependencies have been started, which solves a certain class of things-don't-work-on-startup network related problem.



  • @DaveK said:

    What applications in particular?  I mean, obviously not explorer because you told us that's how you get it to reconnect, and I've found (at least on XP) that "dir DRIVELETTER:" from a cmd shell causes the drive to remount, so what apps are you having problems with
    In my experience, only Explorer and cygwin programs will cause a disconnected network drive to reconnect - just about everything else will simply fail.



  • @ender said:

    @DaveK said:
    What applications in particular?  I mean, obviously not explorer because you told us that's how you get it to reconnect, and I've found (at least on XP) that "dir DRIVELETTER:" from a cmd shell causes the drive to remount, so what apps are you having problems with
    In my experience, only Explorer and cygwin programs will cause a disconnected network drive to reconnect - just about everything else will simply fail.
     

    I've found that too. This is on my XP computer at work.

    I also use a Mac at work - I have put the network shares into my dock. If I click on them too quickly they will all fail. So you have to click on one, wait for it to load (normally a few seconds), then click the rest.


  • Garbage Person

    The real bitch of the matter is that Microsoft got iSCSI right (I can go smack the powerbutton on my iSCSI server, it'll unmount the drives and remount them within seconds after the server comes back up), but CIFS/SMB is still broken as shit. They need to throw that whole fucking mess (or at least the file sharing portions of it) out the window and start over.



  • @EJ_ said:

    alegr: I do have other NICs, both virtual and real, and I see why those could potentially be a problem. None of them are physically connected, though I do run some VMs, so I will check to see if that is causing the issue, good idea thanks. Possibly one of the virtual NICs could be "connected" and windows thinks all is well and continues.

     pauly: I'm certain the wireless doesn't come up until after I logon, even if I wait at the logon prompt for a long time. I've specifically checked that. I will check and see if I can change that so it comes up regardless. Also good advice, thanks.

     Corvidae: that sounds like a good avenue to check as well.

    Thanks all for the sound advice. Hopefully this WTF can be fixed :) 

    I suppose MS SMB client is trying to reconnect the mapped drives as soon as there are any appropriate interfaces (those with SMB client binding). Since you have virtual NICs, try to unbind SMB from them.


  •  @katana said:

    The problem is that it appears that most Wireless Connections that are using 3rd party wireless connection tulities simply won't connect until you have logged in (they may contact the Access Point and pre-load the DHCP information, etc, but the actual connection may not become active until you enter Windows user+password) because they're not running as services, they're just startup software.
    This leads me to believe that access to the shares is restricted by Windows logon, so it actually wouldn't be able to map them until he logs in.  It doesn't seem necessary for company-wide applications, but it's possible.

    In my opinion, a wired connection would take care of this.



  • @belgariontheking said:

     @katana said:

    The problem is that it appears that most Wireless Connections that are using 3rd party wireless connection tulities simply won't connect until you have logged in (they may contact the Access Point and pre-load the DHCP information, etc, but the actual connection may not become active until you enter Windows user+password) because they're not running as services, they're just startup software.
    This leads me to believe that access to the shares is restricted by Windows logon, so it actually wouldn't be able to map them until he logs in.  It doesn't seem necessary for company-wide applications, but it's possible.

    In my opinion, a wired connection would take care of this.

     

    A wired connection absolutely takes care of this, however I rent an apartment and can't easily drill holes through walls to where my computer is from where the router is. It's just inconvenient to run wires (I have pets that can chew things and a girlfriend that doesn't like wires strewn about, and I don't like seeing loose wires laying about either), which is why I got the wireless setup in the first place. Admittedly, the wireless problem I'm having is an annoying inconvenience at worst, so it could be easily fixed by running a wire yes, but it's the principle of the thing at this point. It should work right (like how it does wired), but it doesn't.

    Alegr: I tried removing ALL other possible network interfaces, completely uninstalled the VM software, disabled the wired device, and it still behaves that way. 

    Katana: the drivers I'm using are generic, the company that makes my wireless rig doesn't have any win7 drivers yet (linksys/cisco and a WMP300N using a broadcom chipset which also doesn't have win7 drivers from broadcom), despite it being a relatively new piece of hardware. There seem to be no options for pre-login connection. Additionally, the wireless-zero (or whatever win7 is calling it now) never initiates the connection until after login, no matter how long I wait at the login screen. Watching the wireless router status from a separate computer, I never see the interface come up until after I've logged on, doesn't get an IP address, etc. I'm positive the wireless waits until after I login to even attempt. 

    DaveK: the applications in question that I happen to be using are winamp, windows built-in backup, and some scripts I wrote to synchronize bookmarks in firefox between my desktop and netbook. None of them will connect the drive automatically, they'll just fail. In order for any of them to work I have to open my-computer, click on the network drive, close that window and then all is fine. Additionally, I can't find any information as to what service runs the wireless and what service runs the SMB connections, and none of them are obvious when looking at every single one, so I can't tell one to wait for the other.

    Yes I realize there are other ways to fix this like using a wired network or moving my computer to where a wired network is convenient, and it's a gripe at best really, because clicking on two things isn't really that hard, but it is annoying and just shouldn't work that way, or at least should give me options for how I want it to work. It's just weird to me that windows treats wired and wireless networks completely differently. 

    Thanks again for the advice though. 



  • @EJ_ said:

    Additionally, the wireless-zero (or whatever win7 is calling it now) never initiates the connection until after login, no matter how long I wait at the login screen.
     

    That might make sense if WPA keys are stored per-user-- Windows can't authenticate with the wifi until it knows what user you are, whether you've told it to store that WPA key. I really have no idea if this is the case or not, as my wifi is unencrypted, but if it is, maybe there's a way to tell Windows that a connection credentials should apply to All Users?

    Just a thought.

    @EJ_ said:

    DaveK: the applications in question that I happen to be using are winamp, windows built-in backup, and some scripts I wrote to synchronize bookmarks in firefox between my desktop and netbook

    XMarks is awesome for that, BTW. Works on pretty much every browser that supports plug-ins. Not that it solves the underlying problem.



  • @blakeyrat said:

    maybe there's a way to tell Windows that a connection credentials should apply to All Users?
     

    There is an  All Users or Local Computer user. It's the one, I think, for which you modify the settings if you want the NumLock light to be on at the login screen.



  • @dhromed said:

    There is an  All Users or Local Computer user. It's the one, I think, for which you modify the settings if you want the NumLock light to be on at the login screen.
    There's no All Users user. The system-wide settings are in the HKEY_LOCAL_MACHINE registry hive, and the common disk files are supposed to go to the common application data folder (which on XP is located in Documents and Settings\All Users\Application Data, however the All Users folder itself has no meaning on the system). The logon screen settings are taken from the .DEFAULT profile (which despite it's name isn't actually default profile for new users).



  • If you just want a simple workaround, point all you .exe links to batch files that run the appropriate net commands and then the .exe.

    If you want a much kludgier, WTF workaround, rename the .exe to .exf (or some such) and create a new file association in Windows with the net command as part of it.



  • @dhromed said:

    There is an  All Users or Local Computer user. It's the one, I think, for which you modify the settings if you want the NumLock light to be on at the login screen.
     

    No there isn't. There's an "All Users desktop profile", which sets the login screen appearance and etc, but there's no actual "All Users user" that you can log into and make changes. (Like... adding WPA keys to.)



  •  I feel accomplished when a stupid, uncorroborated claim of mine elicits a detailed correction for those around us.



  • You're both right, in a way. In XP at least - I don't have a copy of 7 here to check - you can change which account a service runs as. I think that if Windows 7 uses a version of the Windows Zero Configuration Wireless Service (or whatever it's called), you should be able to have a look at the properties of the service from Computer Management in the control panel and set what user it runs as. You can also, presumably, run the service as part of the boot routine.



  • @EJ_ said:

    I rent an apartment and can't easily drill holes through walls to where my computer is from where the router is. It's just inconvenient to run wires (I have pets that can chew things and a girlfriend that doesn't like wires strewn about, and I don't like seeing loose wires laying about either),

    You'll never make it as a roadie with that attitude!  What do you think gaffa was invented for?



  • @ender said:

    @DaveK said:
    What applications in particular?  I mean, obviously not explorer because you told us that's how you get it to reconnect, and I've found (at least on XP) that "dir DRIVELETTER:" from a cmd shell causes the drive to remount, so what apps are you having problems with
    In my experience, only Explorer and cygwin programs will cause a disconnected network drive to reconnect - just about everything else will simply fail.

    I went back and double-checked it; you're right.  Turns out I had managed to snapshot my VM in a state where one out of the two mapped network drives was already reconnected and the other not - and guess which one I chose to try a "dir" command on?

     



  • @EJ_ said:

    I rent an apartment and can't easily drill holes through walls
     

    I suppose that, yes, a tool that easily rends apartments is a hassle when you just want a few small holes.



  • @dhromed said:

    @EJ_ said:

    I rent an apartment and can't easily drill holes through walls
     

    I suppose that, yes, a tool that easily rends apartments is a hassle when you just want a few small holes.

    Pssh, I used to rent an apartment, and could easily drill through walls.  Well, it was more of a rhythmic thrusting.


  • @bstorer said:

    Well, it was more of a rhythmic thrusting.

    Really, a sweaty, arrhythmic twitching more than anything.



  •  be the wall



  • @DaveK said:

    You'll never make it as a roadie with that attitude!  What do you think gaffa was invented for?

     

    Heh, actually I'm already using duct-tape concealer for the speaker/hdmi wires in the living room and that is a point of contention with the Fiancee. Personally I think I did a great job with it, tape is smooth and straight, but a great job with duct tape still isn't "quality" to most people I guess. Additionally, the wire would have to run through two doorways and down a stairwell, so it would be quite a mess of tape. 

    I do possess the tools to drill large wire-carrying holes. I specifically bought a 2' long drillbit with a bore just big enough to fit an already-terminated ethernet cable when I was at my first apartment and had been asked by the landlady to wire up the apartment, and she specifically didn't mind me drilling long holes through the foundation and walls. I actually did drill some pilot holes in concealed areas in the current apartment to see if there was a way to run the wire through the wall up the stairwell, but unfortunately there is a 2x4 going across behind the sheetrock about halfway up that my mega drillbit cannot reach. 

    Blakeyrat: I'm fairly certain that's exactly what is happening, in terms of the network key being stored with user credentials, not machine credentials, but I can't seem to find anywhere that changing this is an option. I can understand that in some cases you'd want it to be per-user (like a business network, etc) but in my home network I don't need that little extra bit of security, so machine creds would be fine. It's super-aggravating that I can explain what I want to do but the options don't seem to exist. 



  • @EJ_ said:

    Heh, actually I'm already using duct-tape concealer for the speaker/hdmi wires in the living room and that is a point of contention with the Fiancee. Personally I think I did a great job with it, tape is smooth and straight, but a great job with duct tape still isn't "quality" to most people I guess.

    I know a bitch in need of a good "I accidentally fell down the stairs".



  • @EJ_ said:

    Heh, actually I'm already using duct-tape concealer for the speaker/hdmi wires in the living room and that is a point of contention with the Fiancee. Personally I think I did a great job with it, tape is smooth and straight, but a great job with duct tape still isn't "quality" to most people I guess.
    Should've used colored duct tape.  That makes it classy.



  • @EJ_ said:

    Blakeyrat: I'm fairly certain that's exactly what is happening, in terms of the network key being stored with user credentials, not machine credentials, but I can't seem to find anywhere that changing this is an option. I can understand that in some cases you'd want it to be per-user (like a business network, etc) but in my home network I don't need that little extra bit of security, so machine creds would be fine. It's super-aggravating that I can explain what I want to do but the options don't seem to exist.

    Like I said, check the properties of the wireless service under the Services Management Console once you're logged in. You should be able to set an account for it to run as.



  • @bstorer said:

    Should've used colored duct tape.  That makes it classy.

    It's white, and the wall is white, it actually blends in pretty well considering, I usually have to point it out to people for them to notice it (It runs near the ceiling). I had initially tried white electrical tape, but I was using the narrow (something like 1/2 inch wide) tape and it was too hard to get a straight line. 

    davedavenotdavemaybedave: Thanks I will do that. Is it literally called "Wireless Service"? I didn't think it was called that, I looked through the service list for anything obvious and didn't see it; though there are lots of words there and that tends to make them all blur together for me, so it's very likely I may have missed it.

    morbiu: She's actually cool about like 99% of the crazy crap I do, so I don't get bothered when she has particulars about things :)

    Thanks again for the suggestions :) 



  • On XP it's called the Wireless Zero Configuration Service IIRC. No idea about W7, but I expect Google knows. If you're in there, might as well give the same treatment to all the vaguely related services you can find.

    Oh, and if you can sort the list by 'startup type', it's almost certainly going to be under 'automatic' if it starts normally when you log in.

    P.S. You can call me 'Dave' if you like ;)



  • @EJ_ said:

    morbiu: She's actually cool about like 99% of the crazy crap I do, so I don't get bothered when she has particulars about things :)

    That leaves 1% of the time she's just asking for it.

     

    I kid, I kid.



  • So I've been playing with the "Wlan AutoConfig" which is what Win7 calls the equivalent of XP's Wireless-Zero. I've tried setting it to use other user credentials, including "Local Service" and "Network Service" it just fails to start on a reboot, and I can't start it manually after with those usernames either, only seems to work when it's set to "Local System", boo.


Log in to reply