如何在不与QUOT运行网络共享的批处理文件,UNC路径不支持"信息? [英] How to run batch file from network share without "UNC path are not supported" message?

查看:213
本文介绍了如何在不与QUOT运行网络共享的批处理文件,UNC路径不支持"信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行从网络共享一个批处理文件,但我不断收到以下消息:。UNC路径,不支持默认到Windows目录批处理文件位于 \\\\服务器\\软\\ WPX5 \\ INSTALL.BAT 。虽然以管理员身份登录,从我的Windows 7桌面,我浏览到 \\\\服务器\\软\\ WP15 \\ 和INSTALL.BAT双击,这时候我得到了 UNC路径不支持。信息。我发现了一些建议网上说明映射驱动器将无法正常工作,但使用的符号链接将解决这个问题,但是符号链接没有为我工作。下面是我的批处理文件的内容,我会AP preciate,可以帮助我完成我正在尝试做的任何援助。基本上,我希望能够从运行批处理文件\\\\服务器\\软\\ WP15 \\ INSTALL.BAT

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\WPX5\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 a 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 assistance that can help me accomplish what I am trying to do. Basically, I want to be able to run the batch file from \\Server\Soft\WP15\install.bat.

批处理文件内容

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\WPX5\Custom\Migrate.reg

另外,我怎么删除符号链接完成后,安装?

Also, how do I remove the symbolic link after the install is completed?

推荐答案

PUSHD POPD和应该帮助你的情况。

PUSHD and POPD should help in your case.

@echo off
:: Create a temporary drive letter mapped to your UNC root location
:: and effectively CD to that location
pushd \\server\soft

:: Do your work
WP15\setup.exe
robocopy.exe "WP15\Custom" /copyall "C:\Program Files (x86)\WP\Custom Templates"
Regedit.exe /s WPX5\Custom\Migrate.reg

:: Remove the temporary drive letter and return to your original location
popd

在命令行中键入 PUSHD /?了解更多信息。

这篇关于如何在不与QUOT运行网络共享的批处理文件,UNC路径不支持"信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆