none
UNC path are not supported RRS feed

  • Question

  • Hello All,

    I am hoping someone can help with this.  I am trying to run a batch file from a network share, but I keep getting the following message: "UNC path are not supported. Defaulting to Windows directory." The batch file is located on \\Server\Soft\WP15\install.bat. While logged in as administrator, from my Windows 7 Desktop, I navigate to \\Server\Soft\WP15\ and double click on install.bat, that's when I get the "UNC path are not supported." message. I found some suggestions online stating that mapping drive will not work, but using symbolic link will solve this issue, but the symbolic link didn't work for me. Below is my batch file content, I would appreciate any assistant that can help me accomplished what I am trying to do. Basically, I want to be able to run the batch file from \\Server\Soft\WP15\install.bat.

    Batch file content

    mklink /d %userprofile%\Desktop\WP15 \\server\soft\WP15

    \\server\soft\WP15\setup.exe

    robocopy.exe "\\server\soft\WP15\Custom" /copyall "C:\Program Files (x86)\WP\Custom Templates"

    Regedit.exe /s \\server\soft\WP15\Custom\Migrate.reg

    Thanks

    Thursday, January 26, 2012 4:45 AM

Answers

  • This wizad shows you how to create a package: http://technet.microsoft.com/en-us/library/bb693627.aspx. On the Data Source page of the New Package Wizard, you should be specifying the source files for the package so that ConfigMgr can aquire the source files and make them available to clients via DPs.
    Jason | http://myitforum.com/myitforumwp/community/members/jasonsandys/ | Twitter @JasonSandys
    Saturday, January 28, 2012 8:25 PM
    Moderator

All replies

  • You can use ~dp0 rather than UNC path.

    See, some examples with details from Nelson and Jason

    http://blogs.catapultsystems.com/jsandys/archive/2009/08/30/current-directory-in-configmgr-programs.aspx

    http://myitforum.com/cs2/blogs/jnelson/archive/2008/08/15/121348.aspx

     


    Anoop C Nair - @anoopmannur

    MY BLOG:  http://anoopmannur.wordpress.com

    User Group:  ConfigMgr Professionals

    This posting is provided AS-IS with no warranties/guarantees and confers no rights.

    Thursday, January 26, 2012 5:26 AM
  • Another think to point out here is that you will have to configure permissions correctly to allow access to that UNC path; specifically, you will need to allow domain computers read access (NTFS and share).

    Why not put the files into a package though? That's how ConfigMgr works best.


    Jason | http://myitforum.com/myitforumwp/community/members/jasonsandys/ | Twitter @JasonSandys
    Thursday, January 26, 2012 1:51 PM
    Moderator
  • "Why not put the files into a package though? That's how ConfigMgr works best" and  it is more secure since content is validated on the client as not having been tampered with over the wire.
    Thursday, January 26, 2012 2:49 PM
    Moderator
  • Thanks.  Actually, I found this link that suggest that it doesn't work. http://ss64.org/viewtopic.php?id=943.  I will check out the links you provided to see what I can determine.
    • Edited by Fox245 Saturday, January 28, 2012 5:55 AM
    Saturday, January 28, 2012 5:47 AM
  • I haven't  package files. I will have to research how to do that, but when you say "Why not put the files into a package...", are you referring to the bat file or the installations files that  are store on the network share? If you are referring to the installation files on the network share, then that's a lot of file to package.

    Saturday, January 28, 2012 5:59 AM
  • That's how were designed to work.
    Saturday, January 28, 2012 6:51 PM
    Moderator
  • This wizad shows you how to create a package: http://technet.microsoft.com/en-us/library/bb693627.aspx. On the Data Source page of the New Package Wizard, you should be specifying the source files for the package so that ConfigMgr can aquire the source files and make them available to clients via DPs.
    Jason | http://myitforum.com/myitforumwp/community/members/jasonsandys/ | Twitter @JasonSandys
    Saturday, January 28, 2012 8:25 PM
    Moderator
  • That is the whole point of CM07, to distribute the source install files close to the end client as possible. Using a batch to install from a network share defeats the purpose of CM07, plus it can be a bit of a pain using a network share.

    What is you end goal? Why use a network share over a DP? What does you batch look like?


    http://www.enhansoft.com/
    Saturday, January 28, 2012 8:31 PM
    Moderator
  • Create a package and use \\server\soft\WP15 as a data source

    Create a program for that package with the command line of install.bat

    In the environment tab for the program, ensure it has 'requires drive letter' set

     

     


    My Microsoft Core Infrastructure & Systems Management blog - blog.danovich.com.au
    Sunday, January 29, 2012 10:48 PM
  • @ Garth Jones

    The end goal is for other admins to be able to just navigate to the network share and double click no the batch file or exe file (one single file) to install the WP15 program on the user's Windows7 Desktop.  Some of the files on the admin install point are customized. I hope that helps.

     

    • Edited by Fox245 Wednesday, February 1, 2012 2:57 AM
    Wednesday, February 1, 2012 2:56 AM
  • But why not just advertise the programs to admins? Yes it does mean more adverts (maybe) but then your admin never have to remember where to look for content and you use BITS to download the content too.


    http://www.enhansoft.com/
    Wednesday, February 1, 2012 3:50 AM
    Moderator
  • I (strenuously) concur with Garth. A package is a just a copy of the source files you are pointing to so they will still be doing the same thing. Maintaing a spearate process for them to install software that is not audited or controlled leads to lots of problems. Use ConfigMgr for what it was desgined for, Software Distribution -- it works well in all scenarios.
    Jason | http://myitforum.com/myitforumwp/community/members/jasonsandys/ | Twitter @JasonSandys
    Wednesday, February 1, 2012 4:06 PM
    Moderator
  • I am moving to windows 10 and was remaking my shortcuts when I ran into this error.  The work around I found was to map the network machine to my computer.  I was able to open a folder with the map path to the .bat file and run it without getting a "UNC path" error.

    Ex:

    When I open a folder through network connection the path looks as shown.

    \\Server\Soft\WP15\install.bat

    If you map the path to S drive, (\\Server\Soft) (S:), the folder path should show up as shown below.  Clicking on the .bat or running it in CMD.exe should run without the UNC path error now.

    S:\WP15\install.bat

    A simple test to see if this should work is to move the .bat file, and related files, to a folder on your C:\ drive. If it runs without error then this fix should work.

    • Edited by B_Rad017 Wednesday, October 2, 2019 5:01 PM
    Wednesday, October 2, 2019 5:01 PM