Announcement

Collapse
No announcement yet.

Login script to map to DFS

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Login script to map to DFS

    I have one DFS foot. I would like my users to be able to connect to the DFS using a logon script.

    I have tried a logon.bat file with
    net use z: \\test.net\corporate data

    It tells me something about UNC paths are not supported.

    How do I get around this?

    Its a simple script one would assume, but its driving me nuts.

    thanks

  • #2
    Have you tried mapping it manually? does that work? And does your share really have a space in its name?
    Server 2000 MCP
    Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      When mapping to DFS you use the FQDN in the UNC, if you are using 2000 or XP clients you need to add this FQDN to your IE Local Intranets (don't ask), or in the same optiosn menu you can disable checking for Network UNC's.

      Hope this helps

      Topper
      * Shamelessly mentioning "Don't forget to add reputation!"

      Comment


      • #4
        I can map to it manually. Thats not he issue. I want my users to map to it without needing any intervention.

        Comment


        • #5
          Well for me:

          Code:
          net use j: \\domain.local\sysvol
          Works with no problems. Try checking your permissions (share and NTFS).
          Server 2000 MCP
          Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

          ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

          Comment


          • #6
            This is what I am trying to do.

            @Echo Off


            echo Determining Site...
            IF %logonserver%==\\PRO-DC1 goto HEROIX1
            IF %logonserver%==\\PRO-DC2 goto HEROIX2
            echo Logon Server not known...
            goto END

            :HEROIX1

            net use z: \\hero.net\corporate data

            :HEROIX2

            net use z: \\hero.net\corporate data



            goto END

            Comment


            • #7
              Put a pause on the end then you can see what's going wrong before the shell closes.

              Just 1 question, if Z maps to the same UNC whatever then why the goto statements ?

              By map it manually do you mean through windows or by running

              net use z: \\hero.net\corporate data from a CLI ?

              Try

              net use z: "\\hero.net\corporate data"

              Topper
              * Shamelessly mentioning "Don't forget to add reputation!"

              Comment


              • #8
                I asked before if your share has a space in it. If it does then you might have problems with the mapping from command line and as Topper says try quotes around the unc.
                Server 2000 MCP
                Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

                ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                Comment


                • #9
                  Sorry about the space thing. Yes it does have a space. I did try the quotes.

                  I actually got it to work by using the host name that has the DFS root.

                  Thanks for your help.

                  Comment


                  • #10
                    If you use a host name then that defies the point of DFS, well at least you lose the redundancy of it.
                    * Shamelessly mentioning "Don't forget to add reputation!"

                    Comment


                    • #11
                      Sorry...I got pulled away and it doesnt work....
                      back to the drawing board

                      i will review these posts and get back to you.

                      Comment


                      • #12
                        Im good. Specifying logon servers and using quotes..it works great.

                        thanks everyone

                        Comment


                        • #13
                          mapped Dfs

                          Im good. Specifying logon servers and using quotes..it works great.

                          thanks everyone
                          Can you type here what you used? I am looking to do the same thing. Create a Dfs of project folders on all the branch office servers and combine into 1 mapped drive for all the users to access and work from.

                          Is this Dfs working smoothly?

                          Thanks

                          Comment


                          • #14
                            I have 2 DC's. replicating the DFS

                            I cant be specific on what logon server my users grab, so I did this.
                            I have a space in my DFS root name, so I needed to use quotes. The DFS is sweet. Wish MS came out with this in the NT days...

                            echo Determining Site...
                            IF %logonserver%==\\PRO-DC1 goto HEROIX1
                            IF %logonserver%==\\PRO-DC2 goto HEROIX2
                            echo Logon Server not known...
                            goto END

                            :HEROIX1

                            net use z: \\"hero.net\corporate data"

                            :HEROIX2

                            net use z: \\"hero.net\corporate data"

                            Comment


                            • #15
                              Originally posted by topper
                              Just 1 question, if Z maps to the same UNC whatever then why the goto statements ?
                              2nd question, why map z: and override net use z: in one batch ?
                              ** You forgot to point some END's

                              echo Determining Site...
                              IF %logonserver%==\\PRO-DC1 goto HEROIX1
                              IF %logonserver%==\\PRO-DC2 goto HEROIX2
                              echo Logon Server not known...
                              *goto END
                              :HEROIX1
                              net use z: \\"hero.net\corporate data"
                              *goto END
                              :HEROIX2
                              net use z: \\"hero.net\corporate data"
                              *:END

                              This posting is provided "AS IS" with no warranties, and confers no rights.

                              __________________

                              ** Remember to give credit where credit's due **
                              and leave Reputation Points for meaningful posts

                              Comment

                              Working...
                              X