Announcement

Collapse
No announcement yet.

interesting issue with drive mapping.

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

  • interesting issue with drive mapping.

    Hello,

    I have a custom made vbs script which works fine in a test
    environment. Once moved into production it does not work, it give
    error 67.

    The server is win 2003 std dc. The os is win xp.

    If I make a batch file it also give the same issue for mapping drives
    to a share. I also mapped the drives via my computer and all works
    with out any problems.

    I have also pinged the sever by IP address and via the name and all
    works fine. I alos did a net view of the server and that works fine.

    What am I over looking and why can I not map a drive via a batch file
    or vb script.

    Thanks, F

  • #2
    Re: interesting issue with drive mapping.

    Since you're able to reach the machine via IP and Hostname there may be a problem with the script. Post it so we can take a look at it.
    Andrew

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

    Comment


    • #3
      Re: interesting issue with drive mapping.

      Originally posted by ahinson
      Since you're able to reach the machine via IP and Hostname there may be a problem with the script. Post it so we can take a look at it.
      Here goes the script.

      Code:
      Option Explicit
      Dim objNetwork, strRemotePath1, strRemotePath2
      Dim strDriveLetter1, strDriveLetter2
      
      strDriveLetter1 = "I:"
      strDriveLetter2 = "P:"
      strRemotePath1 = "\\grnssvr1\Data$"
      strRemotePath2 = "\\grnssvr1\Users$"
      
      Set objNetwork = CreateObject("WScript.Network")
      
      ' Section which maps two drives, I: and P:
      objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
      objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
      
      ' Extra code just to add a message box
      WScript.Echo "Map drives " & strDriveLetter1 & " & " & strDriveLetter2
      
      Wscript.Quit
      __________________________________________________ ___

      The batch looks like this netlogon.bat

      @echo off

      net use i: \\grnssvr1\Data$
      net use P: \\grnssvr1\Users$



      Thanks for getting back to me and hope to find light at the end of the tunnel

      Cheers, F
      Last edited by ahinson; 29th November 2005, 15:42.

      Comment


      • #4
        Re: interesting issue with drive mapping.

        It could be to do with administrator rights - when you map the drive at your pc level, its okay - but at domain level its not.
        I suspect that the user account doesn't have the correct priveleges somewhere. What does event log on pc show - what does event log on server show?

        Comment


        • #5
          Re: interesting issue with drive mapping.

          Originally posted by mikemcsharry
          It could be to do with administrator rights - when you map the drive at your pc level, its okay - but at domain level its not.
          I suspect that the user account doesn't have the correct priveleges somewhere. What does event log on pc show - what does event log on server show?
          Hello Mike,

          I might be misunderstanding you comment back!

          If the issue is a permission issue at the domain level then the drives will not map at all.

          If one is able to map a drive via the XP Pro gui then there is not permissions issue.

          I am not sure I follow your logic.

          Thanks for the pointer anyhow.

          F

          Comment


          • #6
            Re: interesting issue with drive mapping.

            If you're at the PC and map a drive to the PC, you're saying ' the pc wants to try to make a link to this drive and map it to a drive letter on the PC'. If you're mapping from the server asa part of the log in then you're telling the PC - from the server - what is going to happen. I think this is where your problem may be

            Comment


            • #7
              Re: interesting issue with drive mapping.

              Hi,

              you can do it like net use command

              net use i: \\pcname\drive /user:username "password"



              Regards

              Comment


              • #8
                Re: interesting issue with drive mapping.

                Originally posted by ghemant
                Hi,

                you can do it like net use command

                net use i: \\pcname\drive /user:username "password"



                Regards
                This did work fine!! I am not keep on supplying ujsername and passwords f other to see.

                I needs to be mapped via script!

                This also tells me that the users does have acces to the drive no problem.

                Any other suggestions?

                Thanks Fly

                Comment


                • #9
                  Re: interesting issue with drive mapping.

                  Hello, I was just checking to see if any birght heads were able to find the light on this issue!

                  Gues it is one that is to difficult and wil need to resolve on my own now.

                  Bit diappointed with the replies but hey....Guess this happens.

                  F

                  Comment

                  Working...
                  X