Mapped drives are not accessible to "Execute Windows Batch Command"

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: core
    • Environment:

      This issue is specific to "Execute Windows batch command" build step in Jenkins Core.

      The slave machine has a given drive [Z:] mapped.

      On my windows 7 slaves, I can use the mapped drive in this without issue.
      On windows 10, I am told:
      The system cannot find the drive specified
      In an attempt to work around this, I have attempted to use "net use" to list the mapped drives available through this Jenkins job, and have also attempted to use "net use" to map the drive.

      To do this, I have set my Windows Batch Command to the following:

      net use
      net use z: [Drive mapping] /P:Yes
      

      Executing the job at this point gives me the following incredibly confusing console output:

      c:\workspace\Pull Jobs test\label\SSW106416>net use 
      New connections will be remembered.
      
      There are no entries in the list.
      
      
      c:\workspace\Pull Jobs test\label\SSW106416>net use z: \\[Drive mapping] /P:Yes 
      z: has a remembered connection to \\[Drive mapping]. Do you
      want to overwrite the remembered connection? (Y/N) [Y]: 
      No valid response was provided.
      

      I have also had the job execute "whoami" to confirm that I am using a properly authorized user to execute the batch commands.  Am I missing something here?  These all work locally on the slave, but however jenkins runs these batch commands seems to break it.

            Assignee:
            Unassigned
            Reporter:
            Benjamin Wagner
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: