Discussion on:

7
Comments

Join the conversation!

Follow via:
RSS
Email Alert
0 Votes
+ -
Editor
Do you still use the command line often or have you become more dependent on the GUI for your maintenance work?
1 Vote
+ -
Cool
timrush-aero 16th May 2012
Have never used those commands before. After all these years and I did not realize they existed. I've always mapped drives on the fly using 'net use x: \\server\path' then deleting it when done. But you have to know what drive letters are available to do that. Since my users all use the same drives, I'm pretty safe in selecting one.
0 Votes
+ -
In Unix / Linux yes ... but I never knew it existed in Windows
1 Vote
+ -
push pop net
KHByrne 16th May 2012
for permanent and persistent drive mappings i still prefer " Net use z: \\ /persist:yes "
but i could see myself using these pushd/popd commands for scripting and for assigning a drive for temporary file swapping......
but actually it takes the first available drive letter..so maybe not without some extra lines of code to determine which drive letter it took each time.....
0 Votes
+ -
Agreed
CharlieSpencer_Palmetto Updated - 21st May
I also prefer 'net use',in batch files for the reason you noted: control over the drive letter assigned.

Greg is right though; I'd forgotten them. 'Net use' had become a habit in previous versions, and I've never gotten around to applying the newer methods.
0 Votes
+ -
Two tips
Cmd_Line_Dino 16th May 2012
1) On almost every machine B: is available to be mapped as a network drive.
net use B: \\server\share works just fine
And A: too on many/most machines

2) When doing a net use an asterisk can be used which says use the next available drive
letter. net use * \\server\share
So for a transitory mapping in a script to a network resource to which you have access this is OK.

Most of the time I need the authentication provided with NET USE to reach a resource.

Hint, NEVER use persistent drive mappings. If you know how to use NET USE then put it in a script (i.e. MyMapping.cmd) and run it when needed (also unmap the drive when no longer needed). This will save you many headaches.

It is a bit more advanced but you can have the script check if you are on the network where you mapping will work before mapping the drive.

-----------------------------------------------------------------------------

For those who want to know why persistent mappings are bad in a corporate environment and not recommended at home...

Persistent mappings are a major cause of slow response to opening Windows Explorer, My Documents, finding or saving files (save-as dialog) among other items. Microsoft has these actions check that network resources are available each time one of these is used. And these lurk in unlikely places in what people do on computers.

What happens is these actions all try to connect to each network reasource including the non-present items. This can mean say 60 - 90 seconds (or longer) per item not available. Not to mention the time for each item that is available to respond. So, instead of the "File -Save As" dialog opening up in 5 to 10 seconds, it can take 3 or 4 minutes (and I have seen 30+ minutes for extreme cases).

This is especially true in larger WAN based network topologies where response time is much slower and timeouts may be set to a longer interval.

Many times persistant mappings are used to connect to someone elses computer, not a server. Now you have computers that are not always on or laptops that go on trips. Every mapping to a system that is not available makes anything that touches a network resource have to wait for the system to time out attempting to connect to EACH ITEM that is no longer available.

Example: Why is Word or PowerPoint so slow to open a file? Unfortunately in the WYSIWYG new world, Office checks the printer before showing the document. Well you have a network based printer and there are 2 persistent drive mappings to things that no longer exists. Luckily it usually checks just the default printer and not each printer defined on the system.

And sometimes people wonder why I made all clients I support default to NOT REMEMBER network connections.
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.