General discussion

  • Creator
    Topic
  • #2081795

    How to create mapping drives in Windows

    Locked

    by quangtranil ·

    I tried to create mapping drives in Windows NT Server 4.0, but it would not recognize the commands. Please help. Below is a sample of my login script.

    ECHO OFF
    net use z: /delete
    net use z: \\server\directory
    net use y: /delete
    net use y: \\server\directory
    net use m: /delete
    net use m: \\server\directory

    if “%username%” = “tran_quang”
    then net use o: \\server\Folder
    end

    if %member% = “it”
    then net use o: \\server\Folder\Subfolder
    end

All Comments

  • Author
    Replies
    • #3897161

      How to create mapping drives in Windows

      by mtnsqs ·

      In reply to How to create mapping drives in Windows

      Check the permissions on the directories you are trying to map to.

      Also try map to a know share name instead

    • #3897159

      How to create mapping drives in Windows

      by robert w. ·

      In reply to How to create mapping drives in Windows

      stick a “pause” command into your batch file..that might help you in pin point where the pb is. Also, check your policy. Uncheck Remove the “Map Network Drive” and “Disconnect Network Drive options”, uncheck Hide Network Neighborhood, and uncheck Hide Drives in My Computer. Those things gave me major headacks in the past.

    • #3897157

      How to create mapping drives in Windows

      by ravi ·

      In reply to How to create mapping drives in Windows

      If you have set “No Access” permission on NET.EXE, you won’t be abe to use the NET command. So, if the suggestions above are not working, you may want to check this.

      Good luck.

    • #3897156

      How to create mapping drives in Windows

      by mrshawng ·

      In reply to How to create mapping drives in Windows

      In your example, you are mapping to “\\server\directory” where “directory” should be a share on the server, if it isn’t a share, that is one problem (same goes for the last net use, “Folder” has to be a share.).

      The “if” statement requires two equal signs (if “%username%”==”tran_quang”. Also, put the net use command on the same line with the if, and get rid of the “then” and “end” they aren’t valid commands.

      %member% is not a default variable. If you’re checking the users group membership, try “ifmember.exe” it is a NT 4.0 resource kit utility.

      REM out the ECHO OFF line so you can see what the script is trying to do, and then what it actually does. Put a pause at the end of the file, and if necessary at various points within.You can type the command and then /? to get information on how to use most of the NT command line programs.

      Hope this helps.

    • #3897152

      How to create mapping drives in Windows

      by kellyst ·

      In reply to How to create mapping drives in Windows

      time to buy an NT book, don’t you think? You can map to shares not directories. Spend the 30 bucks and get a book.

    • #3897131

      How to create mapping drives in Windows

      by stephen_ski ·

      In reply to How to create mapping drives in Windows

      As Kelly Quite rightly stated you cannot create drive mapping only share mappings…
      take your folders apply permissions and then share them (for extra security apply NTFS permissions aswell) then apply your script

      Also you may want to seriously consider a good book MaRK NAMINSKI`s book on NT4 is good

    • #3897104

      How to create mapping drives in Windows

      by tazz ·

      In reply to How to create mapping drives in Windows

      Do not map to drive Z. I’ve read a technet article saying the netlogon pipe maps drive Z during logon (invisibly) and disconnects after logon. This is why you can use drive Z after logon (e.g. to connect Iomega ZIP-drive)
      We had problems within a Kix script using drive Z. when we altered the drive mapping to Z it worked.

      Good luck

    • #3896980

      How to create mapping drives in Windows

      by dbowlin ·

      In reply to How to create mapping drives in Windows

      You must first share the folders you are mapping as drives. Also best not to use Z drive. Rather than deleting the mappings individually, you may want to try the following to delete all existing network resource mappings: net use * /delete /yes

    • #3742378

      How to create mapping drives in Windows

      by quangtranil ·

      In reply to How to create mapping drives in Windows

      This question was auto closed due to inactivity

Viewing 8 reply threads