[英]Run WinForms application without administrator rights?
I have created a windows forms application does some function. 我创建了一个Windows窗体应用程序,该程序具有某些功能。 The problem is when I deploy the application:
问题是当我部署应用程序时:
I want to deploy using Visual Studio Setup Project(MSI) , but don't want the software asking for elevated privileges. 我想使用Visual Studio安装项目(MSI)进行部署,但不希望该软件要求提升的特权。
The MSI installation does not ask for a password but the installed program does. MSI安装程序不要求输入密码,但已安装的程序要求输入密码。
You'll need to create and embed an application manifest (UAC) in your application, as described here . 你需要创建并嵌入在应用程序中的应用程序清单(UAC),如所描述这里 。 If you don't want to do that, ClickOnce might be a solution.
如果您不想这样做,可以使用ClickOnce。
MSDN has some useful information on this topic, specifically: MSDN具有有关此主题的一些有用信息 ,特别是:
Impact to the user's computer.
对用户计算机的影响。 With Windows Installer deployment, applications often rely on shared components, with the potential for versioning conflicts;
在Windows Installer部署中,应用程序通常依赖于共享组件,从而可能导致版本冲突。 with ClickOnce deployment, each application is self-contained and cannot interfere with other applications.
使用ClickOnce部署,每个应用程序都是独立的,不会干扰其他应用程序。
Security permissions.
安全权限。 Windows Installer deployment requires administrative permissions and allows only limited user installation;
Windows Installer部署需要管理权限,并且仅允许有限的用户安装。 ClickOnce deployment enables non-administrative users to install and grants only those Code Access Security permissions necessary for the application.
ClickOnce部署使非管理用户可以安装并仅授予应用程序必需的那些代码访问安全性权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.