Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Mapping Drives (WinXP-Pro SP-2)

    It talks in a Tech Republic article (Mapping Drive Letters ) about mapping drives. The method discussed si the same as that used in older Windows (and DOS) versions.

    Two questions:

    1) Are there any advantages (or dis - ) to this method as opposed to mapping through Explorer, and,

    2) Can this be set up to automatically run at startup - in autoexec.nt, or some such?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Firstly, the article talks about SUBSTing drive letters, misleadingly using the terminology "mapping drive letters." I wanted to make that distinction, because it's important. When you map a drive in Explorer, you are connecting to a network resource. SUBST can also connect to local drives and folders.

    SUBST creates a new drive letter pointing to a folder (or subfolder). It becomes useful when you want quick access to a folder that is buried somewhere, or when you want to create shares for the network. When SUBST is used against a local shared folder, it will create a RECYCLER for that drive. The RECYCLER is not removed when the drive substitution is removed, but can be deleted manually.

    AUTOEXEC.NT does not execute at startup. It executes only for command prompt windows once the Windows itself is up and running. Thus, anything you put there will NOT execute when you start the computer. Since SUBST is not a command that is implemented in Explorer, you will need to execute it from a command line. To run it at startup, you will need to put it into a batch file or logon script. See <!mskb=129128>Microsoft Knowledge Base Article 129128<!/mskb> for more information.
    -Mark

  3. #3
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Mark:

    That clarifies AND answers my question... thanks...

    Now I've just got to translate the "Net" version. Is this a "net version" of SUBST? Appears so. But

    NET use lpt<x>:<printserver><sharename> /persistent:yes

    is a bit more "cryptic".

    Assuming the folder "c:UpTown" on the other machine, server name is Server_2, then it would be, using "z:" as the "mapped" letter::

    NET use z: Server_2UpTown

    ?

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    OK, I'm not sure what you're after here. Not entirely anyway.

    You can't SUBST a printer share. Your first example <code>NET use lpt<x>:<printserver><sharename> /persistent:yes</code> will only work with the NET USE command.

    For your second example, you still need to NET USE the network resource (unless I'm mistaken). You could then use SUBST to create a drive letter for one of the subfolders in the share, making it readily accessible as a drive letter. Problem is, SUBST is not persistent and any SUBST'd drive will not be present after a reboot. Frankly, it's an outdated command left over from the days of MS-DOS that has little applicable use in a robust, modern version of Windows.
    -Mark

  5. #5
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Mark:

    The
    >>
    NET use lpt<x>:<printserver><sharename> /persistent:yes
    <<

    was what I pulled from the MS page... I've got no real (secure) knowledge here *I'm* groping.

    >>
    You can't SUBST a printer share
    <<

    I wasn't really trying to do that. Only trying to lighten my load a bit. We have a home network, and there are a couple folders and printers (shares?) that are under constant access. In addition to quicker access, I was looking for a shorter path/access to these. Since there are still several programs out there that limit the path length for default settings, I either needed to shorten up paths, or move around everything I had set up more than one or two levels deep.

    Quicken, for example (2000) allows paths to data no longer than 27 characters, Cocuments and SettingsCWBillowMy DocumentsFinanceQuicken doesn't work. Hence the SUBST / NET questions.

    The printer issue comes up if I'm printing to the upstairs / downstairs printers. Setting these up for different software can often present the same issues.

    So "all" I'm trying to resolve is:

    1) Command syntax for NET / SUBST statements that can be given to various "locations (shares?), and
    2) Where I would put these (startup group, HKLM setting, ...?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  6. #6
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Mapping Drives (WinXP-Pro SP-2)

    1. You can found the syntax for each command (NET, SUBST and so on) opening the Command Prompt (Start | All Programs | Accessories | Command Prompt) and typing the command with /? switch.
    For example, if you type
    NET /?
    and hit Enter, it brings you the list of additional commands. Then you can type, for instance,
    NET COMPUTER /?
    and it brings you the list of switches.

    2. When you figure out the proper syntax for your command, for example,

    SUBST Q: "Cocuments and SettingsCWBillowMy DocumentsFinanceQuicken"

    you can put this line in a BAT file (the text file with .bat extention) - say, quicken.bat . You can add as many lines (commands), as you want. For instance, you can add a second line:

    NET use z: Server_2UpTown

    All these commands are not case-sensetive.
    To execute this BAT file on startup, put your BAT file in your Startup folder:

    Cocuments and SettingsCWBillowStart MenuProgramsStartup

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Your reply has made you a SilverLounger (1600 posts)! Congratulations! <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  8. #8
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    The SUBST part I'm fairly familiar with... the NET part I'm gonna have to study up on a bit, 'cause the command window help is a bit vague... off to the books me thinks...

    Congrats to the SilverLounger...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  9. #9
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Chuck, tell us what it is that is not clear about NET USE and we can help. Think of the Lounge as an interactive book. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    My recommendation to you is to forget the SUBST command altogether. It requires too much effort and does not provide consistent results (what if the batch file fails to run for some reason?). NET USE is a more powerful, consistent and better implemented solution. You can NET USE any shared resource on your network AND local computer. Since NET USE can be made to be persistent, you no longer have to worry about BAT files or logon scripts. Simply share the folder(s) that you want available, and then NET USE them.

    Each resource - printer, computer, et cetera - has an IP address and a UNC (Uniform Naming Convention) share name in the format<pre>SERVERShareFilePath (FilePath is optional.)</pre>

    SERVER can be the UNC name or the IP address. SHARE will consist of your named resources. FILEPATH can be a subfolder, just like SUBST. When you share a folder, the child folders are shared as well.

    On each computer on your network, share the printers and folders that you will want access to either locally or remotely. Then connect to those shares with NET USE or by using Windows Explorer - six of one, half dozen of the other. NET USE and Explorer accomplish the same means to an end, one with a command line and the other with a GUI.

    Hope that helps,
    -Mark

  10. #10
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Mark:

    OK...

    I can see the "forget the SUBST command altogether" part. Certainly, if I gain versatility, why not?

    >>
    Each resource - printer, computer, et cetera - has an IP address and a UNC (Uniform Naming Convention) share name in the format
    SERVERShareFilePath (FilePath is optional.)
    <<

    THAT part, I *pretty much* get, until "share"...

    We have set up a share folder (Transfers) on the upstairs pc (Upstairs). The command syntax as shown in Explorer (where I set it up) is

    upstairsTransfers

    no drive letter showing. So, if the SERVER is (upstairs) the 'share' is (Transfers)? Share being (duh) the 'item' being shared? So then the 'share is NOT a file, but rather a 'location'?

    And I see no drive letter in the syntax on my screen, even though that PC has TWO partitions, a 'C' and a 'D'. So you cannot have the same share name on two separate drives? Can I have the same share name on my PC as on the upstairs PC? What if I have a (Transfers) folder on both the 'C' and 'D' drives on the PC upstairs?

    Confusing, maybe, but is it possible?

    A problem by not being able to specify the drive or partition, isn't there? Anyway, the command syntax then, to do this from the command line, would be:

    NET USE T: upstairsTransfers
    ?
    Using the 'upstairs' to identify the PC, and then, I must be 'assuming' drive C, and the 'Transfers' is off the root folder, so that's all?

    Then a printer would be

    NET USE upstairsprinter_1
    ?

    How Do I make these settings 'permanent' on the command-line? In explorer, you're asked if you want to "reconnect at login".

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  11. #11
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Chuck,

    You can only map to a shared folder. You share it on the serving PC, and at that time you give it a share name. You map it from the computer that wants to access the folder, using the share name created on the other PC.

    To make shares permanent from the command line you just use the syntax that you saw when you tried NET USE /?
    <code>NET USE
    [devicename | *] [computernamesharename[volume] [password | *]]
    [/USER:[domainname]username]
    [/USER:[dotted domain name]username]
    [/USER:[username@dotted domain name]
    [/SMARTCARD]
    [/SAVECRED]
    [[/DELETE] | [/PERSISTENT:{YES | NO}]]

    NET USE {devicename | *} [password | *] /HOME

    NET USE [/PERSISTENT:{YES | NO}]</code>
    The final line of output shows the correct syntax for making all future NET USE commands persistent.

    StuartR

  12. #12
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Stuart:

    Love the bug...

    I'm sorry, Im being a bit hazy: I understand the part about making folders, printers, etc. available (sharable) from the 'hosted' side...

    What is the * ?

    What is a 'dotted domain name'?

    The '/DELET' removes the share assignment, yes?

    and is the multiple-line purely for readability, or can you in fact spread this over multiple lines?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  13. #13
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    The syntax [devicename | *] means you can either specify a device name (such as M: or a * or Nothing, if you specify a * then Windows will assign the next available device name for you.

    A dotted domain name is something like Americas.Microsoft.Com, or Home.ChuckBillow.Net, it is used in an active directory domain to specify the fully qualified domain name.

    /DELETE does not remove the share assignment. This command is issued on the PC that has mapped the share to remove the share mapping. It does the oposite of the NET USE that mapped the share in the first place.

    The multiple lines with spaces between show the multiple different possible syntaxes for this command.
    The multiple lines in the first SYNTAX are just spread over many lines for readability.

    StuartR

  14. #14
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    Stuart:

    >>
    /DELETE does not remove the share assignment. This command is issued on the PC that has mapped the share to remove the share mapping. It does the oposite of the NET USE that mapped the share in the first place.
    <<

    By this do you mean that 'DELETE ' does not remove the *ability to be shared", just that particular assignment (like /d in SUBST)?

    >>
    The multiple lines with spaces between show the multiple different possible syntaxes for this command.
    The multiple lines in the first SYNTAX are just spread over many lines for readability.
    <<

    So MUST i place all parts on one line? Is there any limit to how long the line can be?

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  15. #15
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Mapping Drives (WinXP-Pro SP-2)

    > By this do you mean that 'DELETE ' does not remove the *ability to be shared", just that particular assignment (like /d in SUBST)?
    That is exactly what I mean.

    > So MUST i place all parts on one line? Is there any limit to how long the line can be?
    Yes, all parts of a single DOS command must be on one line. I have no idea what the limit is to a DOS command line length, but I can't see it being a problem for a NET USE command.

    StuartR

Page 1 of 3 123 LastLast

Posting Permissions

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