简体   繁体   English

Windows 来自共享驱动器的应用程序更新 - Visual Studio Publish

[英]Windows application update from a shared drive - Visual Studio Publish

I would like my application to look for update from a shared drive.我希望我的应用程序从共享驱动器中查找更新。 So if a new version is published to a shared drive, all users get an update message when they start the application.因此,如果将新版本发布到共享驱动器,所有用户在启动应用程序时都会收到更新消息。

I am using visual studio publish feature.我正在使用 visual studio 发布功能。 It ask for Installation Folder URL. When I choose a folder, it gives error "The string must be a fully qualified URL or UNC path".它要求安装文件夹 URL。当我选择一个文件夹时,它给出错误“字符串必须是完全限定的 URL 或 UNC 路径”。

What will be the UNC path for following folder?以下文件夹的 UNC 路径是什么?

D:\InstallationFolder\ D:\安装文件夹\

I tried \\\D\InstallationFolder\ ,` and it gives me warning "Warning: Unable to view published application at \\D\InstallationFolder."我尝试了\\\D\InstallationFolder\ ,` 并且它给了我警告“警告:无法在 \\D\InstallationFolder 查看已发布的应用程序。”

Help帮助

First:See Publishing ClickOnce Applications on MSDN.第一:参见MSDN上的Publishing ClickOnce Applications

In the How will users install the application?在用户将如何安装应用程序? page, select the location where users will go to install the application:页面,select 用户将 go 安装应用程序的位置:

If users will install the application directly from the file share, click From a UNC path or file share, and then click Next.如果用户将直接从文件共享安装应用程序,请单击从 UNC 路径或文件共享,然后单击下一步。 (This is for publishing locations of the form c:\deploy\myapp or \server\myapp.) (这是针对 c:\deploy\myapp 或 \server\myapp 形式的发布位置。)

UNC path

UNC stands for universal (or consistent, uniform) naming convention, and is a syntax used to access folders and files on a computer.network. UNC代表通用(或一致、统一)命名约定,是一种用于访问计算机网络上的文件夹和文件的语法。 The syntax is as follows:语法如下:

\\<computer name>\<shared directory>\

Followed by any number of directories, and end with a directory or file name.后跟任意数量的目录,并以目录或文件名结尾。

Last:最后的:

Find UNC path of a.network drive 查找网络驱动器的 UNC 路径

Refer to dlauzon's answer:参考dlauzon的回答:

在此处输入图像描述

Or use net use :或者使用net use

Refer to Lachlan Dowding's answer here:在这里参考 Lachlan Dowding 的回答:

In Windows, if you have mapped.network drives and you don't know the UNC path for them, you can start a command prompt (Start → Run → cmd.exe) and use the net use command to list your mapped drives and their UNC paths:在 Windows 中,如果您有映射的网络驱动器并且您不知道它们的 UNC 路径,您可以启动命令提示符(开始 → 运行 → cmd.exe)并使用net use命令列出您的映射驱动器及其UNC 路径:

C:\>net use
New connections will be remembered.

Status       Local     Remote  HTTPS             Network

-------------------------------------------------------------------------------
OK           Q:        \\server1\foo             Microsoft Windows Network
OK           X:        \\server2\bar             Microsoft Windows Network
The command completed successfully.

Note that this shows the list of mapped and connected.network file shares for the user context the command is run under.请注意,这显示了运行该命令的用户上下文的映射和连接的网络文件共享列表。 If you run cmd.exe under your own user account, the results shown are the.network file shares for yourself.如果您在自己的用户帐户下运行cmd.exe ,则显示的结果是您自己的 .network 文件共享。 If you run cmd.exe under another user account, such as the local Administrator, you will instead see the.network file shares for that user.如果您在另一个用户帐户(例如本地管理员)下运行cmd.exe ,您将看到该用户的 .network 文件共享。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM