Results 1 to 18 of 18

Thread: net use vs Map Drive

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Question net use vs Map Drive

    Hello all,
    Just wondering if anyone knew why netuse was the better option for mapping drives. I used to map drives using this "Map Network Drive" button, and noticed it took half a year to open my computer. When I use net use, I notice that it only takes about 5 seconds.

    I'm guessing it's the way windows goes about caching credentials/locations/whatever, but I'm not sure exactly what the difference is. Anyone have an idea?

  2. #2
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: net use vs Map Drive

    One is a command line option & the other is a GUI. Command line will always be faster in most cases.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    That makes sense. I don't think I was clear. I know the processes are different lengths and such, but I was actually referring to access times. When opening my computer after mapping a drive, my computer actually stops responding for a few moments. When opening my computer after using net use to map a drive, it opens right up.

  4. #4
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: net use vs Map Drive

    Do you have ReConnect at Logon Checked when you use the GUI to map the drive?
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    Probably; I think it freezes (or hangs) in either case though...

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    And as a not, it happens every time I open my computer, not just the first time. Wouldn't reconnect at logon, whether on or off, only cause a problem on first accesssing?

  7. #7
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: net use vs Map Drive

    If it is checked whenever you log on it will attempt to connect to the drive. That will take time.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    Pardon my ignorance, but doesn't "...at log on" kind of imply only once, when you log on, not every time you open the My Computer window?

  9. #9
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: net use vs Map Drive

    Ah, I see what you're asking now. I honestly don't know why it would take longer to access your mapped drive from My Computer when you map it using "map drive" and not take long at all when you map it using net use. Other than one being done via command line and the other via gui, they achieve the same result and once it's mapped either way it shouldn't make a difference on access time. I don't know what OS you're using and what OS your accessing. However, where I used to work we used XP and drives were mapped manually via gui and there were no access time issues. It opened right up. Some part of your OS might be corrupted or something?
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    Hmm...it's possible, but it doesn't happen on multiple machines. Maybe it's something to do with the device itself. In particular, I notice things slow down when I access a couple of NAS devices. I know they're running *nix.

    I also wonder if the credentials specified when using net use are stored differently than credentials entered when connecting to a device. If that's the case, it may account for the slowdown when accessing a different disk.

  11. #11
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: net use vs Map Drive

    What OS are you using? I've seen that Windows 7 tends to cache a lot more filesystem information as it wakes up sleeping drives rather than wait for all drives to power up.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    WinXP

  13. #13
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: net use vs Map Drive

    Well you haven't mentioned other pcs that you had. Also, if it doesn't take long for them to open up My Computer when you map the drives on them using the gui then it obviously points back to the pc your having a problem with and not what command you're using.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  14. #14
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: net use vs Map Drive

    Since you mentioned the slowness occurs when connecting to NAS devices, I guess what happens is that the NAS has spun down its HDD's and it takes some time for those HDD's to spin up again. If this is the case, you can change the NAS setting to increase the idle time or disable it all together.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    I suppose. I probably need to do more diagnostics. To be honest, I'm the IT admin, so I have multiple mapped drives - more so than most people. I've tried disconnecting and reconnecting mapped drives multiple ways, but haven't specifically noted each step. I know that when I was mapping drives via the GUI, it was slow; when I did it through net use, it wasn't slow.

    I guess I'm just more wondering if anyone has had any issues similar to mine - more of a general curiosity than a problem to resolve.

  16. #16
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: net use vs Map Drive

    My guess would be that mapping via the GUI encompasses more than mapping a letter to just SMB shares. It may well be trying to map to a Front Page Server Extensions and/or WebDAV share on the remote device first ("Web Folders"). It may be awaiting a long timeout when it probes for a Web service running on the remote machine.

  17. #17
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: net use vs Map Drive

    The OP stated that it isn't slow on other PCs when mapping through gui. I think my previous statement would be the answer. The one pc he is having trouble with has something corrupted. After all, I've mapped a drive via gui from the USA to the Netherlands via VPN and had no lag issues opening up My Computer.
    [vb5 & starting to move to vb2008] I appreciate the help I get from everyone. Thank you.

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2007
    Location
    Middletown, CT
    Posts
    948

    Re: net use vs Map Drive

    fair enough. I'll give it another try. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width