.net 单击一次 - 所有用户

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/276916/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 10:33:51  来源:igfitidea点击:

Click Once - All Users

.netwindows-installerclickonce

提问by Tony Trembath-Drake

How to I configure click-once to install apps for all users. On another forum I got to 'use MSI' - thanks - but how. Also, the first installing user may not be admin - which may be a problem. And I want all users to trigger an update check. No local storage, it's a WPF client to a WCF service.

如何配置单击一次为所有用户安装应用程序。在另一个论坛上,我必须“使用 MSI”-谢谢-但是如何使用。此外,第一个安装用户可能不是管理员 - 这可能是一个问题。我希望所有用户都触发更新检查。没有本地存储,它是 WCF 服务的 WPF 客户端。

We're XP, internal.

我们是 XP,内部。

回答by Keith Elder

ClickOnce cannot be installed the way you are thinking since to launch it, it is just a URL (http://server/myapp/myapp.application). Thus if you can get a user to click on the URL, you've accomplished the same thing. Here's what we did and it works really well.

ClickOnce 不能按照您想的方式安装,因为启动它,它只是一个 URL ( http://server/myapp/myapp.application)。因此,如果您可以让用户点击 URL,您就完成了同样的事情。这就是我们所做的,而且效果很好。

We manage 5,000 desktops in a large enterprise and what we did to get the app on all of the machines, was create a simple MSI file that put an icon on the desktop (you could put it in the startmenu or whatever I guess). The icon has the standard app icon and is merely a link icon which points to the URL.

我们在一家大型企业中管理着 5,000 个桌面,为了在所有机器上安装该应用程序,我们所做的是创建一个简单的 MSI 文件,在桌面上放置一个图标(您可以将它放在开始菜单或我猜的任何地方)。该图标具有标准的应用程序图标,只是一个指向 URL 的链接图标。

When a user clicks the icon, it launches the application and gets installed, thus all automatic updates come down as well.

当用户单击该图标时,它会启动应用程序并进行安装,因此所有自动更新也会停止。

Now this worked for us because we have really good enterprise management software to be able to deploy MSI's to the enterprise. I don't know your situation so I don't know if this will work or not.

现在这对我们有用,因为我们有非常好的企业管理软件能够将 MSI 部署到企业。我不知道你的情况,所以我不知道这是否有效。

Building an MSI of the complete app defeats the purpose of the auto updates and things ClickOnce provides. Building a MSI to drop an icon on a machine is simple and just has to be installed once.

构建完整应用程序的 MSI 违背了自动更新和 ClickOnce 提供的东西的目的。构建 MSI 以在机器上放置图标很简单,只需安装一次。

If you need any help or have questions on this, just email me, I'm pretty easy to find, just check my blog.

如果您需要任何帮助或对此有疑问,请给我发电子邮件,我很容易找到,只需查看我的博客。

Hope that helps.

希望有帮助。

-Keith

-基思

回答by Jeroen Landheer

If you need to install / upgrade for all users on a PC, Clickonce is not an option. Clickonce is meant for installing an application for a single user without administrative rights.

如果您需要为 PC 上的所有用户安装/升级,则不能选择 Clickonce。Clickonce 用于为没有管理权限的单个用户安装应用程序。

You will need to create a MSI installer to distribute an application to multiple users on the same machine. There are multiple ways to deploy and update applications on clients when the client does not have administrative rights. A few examples:

您将需要创建一个 MSI 安装程序以将应用程序分发给同一台计算机上的多个用户。当客户端没有管理权限时,有多种方法可以在客户端上部署和更新应用程序。几个例子:

  • Advertise your MSI in Active Directory, installation and upgrade does not require administrative privileges.
  • Use System Center Update Publisher (SCUP) to publish your application to Windows Server Update Services (WSUS). With WSUS you can deploy Microsoft updates, and your application. Both WSUS and SCUP are freely available for download.
  • Use Group Policy to elevate installers (not a recommended solution!), to enable non-admins to install MSIs for all users
  • 在 Active Directory 中公布您的 MSI,安装和升级不需要管理权限。
  • 使用 System Center Update Publisher (SCUP) 将您的应用程序发布到 Windows Server Update Services (WSUS)。使用 WSUS,您可以部署 Microsoft 更新和您的应用程序。WSUS 和 SCUP 均可免费下载。
  • 使用组策略提升安装程序(不是推荐的解决方案!),使非管理员能够为所有用户安装 MSI

Hope this helps.

希望这可以帮助。

回答by Greg Dean