如何安装/部署/构建我的Visual C#应用程序,以便所有用户可用? [英] How do I install/deploy/build my Visual C# application so it's available to all users?

查看:190
本文介绍了如何安装/部署/构建我的Visual C#应用程序,以便所有用户可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Microsoft Visual C#2008 Express Edition中编写了一个应用程序。

I've written an application in Microsoft Visual C# 2008 Express Edition.

要安装的Windows XP计算机有两个用户帐户。一个是管理员帐户,另一个是主要用户帐户,没有管理员帐号。

The Windows XP computer I want to install it on has two user accounts. One is the admin account, the other is the main user account and does not have admin privledges.

我尝试将应用程序安装为主用户,并发出错误说我不能因为我不管理。精细。我尝试安装应用程序作为管理员帐户。它在管理员帐户下安装得很好,工作正常,但在我的主要用户帐户中似乎不可用。从主用户帐户,我使用Windows资源管理器导航到我作为管理员运行应用程序的位置,并且无法安装错误。

I tried installing the application as the main user, and got an error saying i can't because I'm not admin. Fine. I tried installing the application as the admin account. It installs fine and works fine under the admin account, but doesn't seem to be available in my main user account. From the main user account, I navigated using windows explorer to where I run the application from as admin and the same "can't install" error.

我需要什么要做到这一点可以让我的主要用户帐户?

What do I need to do to make this available to my main user account?

谢谢!

-Adeena

更新:
有人要求这些详细信息:
我正在使用ClickOnce发布计划(我认为这是Express中唯一可用的,我使用向导,我将其发布到我的机器上的本地文件夹,然后我说用户将从CD-ROM安装(而不是从网站或文件共享),并选择应用程序不会检查更新

Update: someone asked for these details: I'm using the "ClickOnce" publishing scheme (I think that's the only thing available in Express. I use the wizard and I publish it to a local folder on my machine, then I say "user's will install from a CD-ROM" (as opposed to from a website or file share), and select "The application will not check for updates"

update2:
当我尝试在主用户帐户下安装时,我收到一个对话框:应用程序无法启动,请联系应用程序供应商。然后有一个详细信息...按钮,我点击它,并得到以下错误摘要:
错误摘要
以下是th的摘要e错误,这些错误的详细信息将在日志中列出。
*激活C:\ADIA\ADIA.application导致异常。检测到以下失败消息:
+访问被拒绝。 (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))

update2: when I try installing under the main user account, I get a dialog that says: "Application cannot be started. contact the application vendor." and then there is a button for "Details..." I click on that and get the following error summary: ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of C:\ADIA\ADIA.application resulted in exception. Following failure messages were detected: + Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

另一个注释...这是一个非常简单的应用程序。如果我将在MS Visual Express中工作的可执行文件复制到另一台机器,并将其作为主用户运行,则运行正常。

Another note... It's a very simple application. If I copy the executable that gets built when I'm working in MS Visual Express to the other machine and just run it as my main user, it runs fine.

推荐答案

您无法更改ClickOnce安装程序以安装所有用户。它们的设计仅针对个人用户安装。您需要创建一个MSI安装程序。向您的解决方案添加一个新项目,转到其他项目类型|安装和部署|安装向导。这应该让你在路上,然后看我的另一个答案。

You cannot change a ClickOnce setup project to install All Users. They are designed to be installed for individual users only. You need to create an MSI installer. Add a new project to your solution, go to Other Project Types | Setup and Deployment | Setup Wizard. That should get you on your way, then see my other answer.

不知道这是否在Express中起作用。如果没有,您可能需要使用第三方安装程序,如 Wix Nullsoft安装程序

Not sure if this works in Express though. If it doesn't, you may need to use a third-party installer like Wix or the Nullsoft installer.

这篇关于如何安装/部署/构建我的Visual C#应用程序,以便所有用户可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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