如果使用visual studio 2008 c#创建安装程序,Windows 7中的权限问题# [英] Permission problem in windows 7 if setup created using visual studio 2008 c#
本文介绍了如果使用visual studio 2008 c#创建安装程序,Windows 7中的权限问题#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在c#visual studio 2008中创建了一个安装项目。
在这个项目中我正在读取和编写应用程序所在的文件。
如果我在Windows 7中安装安装程序它有权限问题。如何在创建项目时给予管理权限。
解决方案
尝试使用以管理员身份运行选项运行应用程序
>
u只需在项目中添加一个应用程序清单文件即可。并将凭据更改为管理员。喜欢这个
< 安全性 >
< requestedprivileges xmlns = urn:schemas-microsoft-com:asm.v3 >
< span class =code-comment><! - UAC Manifest Options
如果你想改变Windows用户帐户控制级别使用以下之一替换
requestedExecutionLevel节点。
< requestedExecutionLevel level =asInvokeruiAccess =false/>
< requestedExecutionLevel level =requireAdministratoruiAccess =false/>
< requestedExecutionLevel level =highestAvailableuiAccess =false/>
指定requestedExecutionLevel节点将禁用文件和注册表虚拟化。
如果要将文件和注册表虚拟化用于向后
兼容性,则删除requestedExecutionLevel节点。
- >
< requestedExecutionLevel level = requireAdministrator uiAccess = false / >
< / requestedprivileges >
< / security >
谢谢
Animesh
I created a setup project in c# visual studio 2008 .
In this project am doing reading and writing files where application exists.
If i install setup in windows 7 it is having permission problem.How to give administrative permission while creating project.解决方案Try Running the Application using "Run As Administrator" option
Hi ,
u just add one application manifest file in your project . and change the credential to the administrator . like this
<security> <requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <!-- UAC Manifest Options If you want to change the Windows User Account Control level replace the requestedExecutionLevel node with one of the following. <requestedExecutionLevel level="asInvoker" uiAccess="false" /> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> Specifying requestedExecutionLevel node will disable file and registry virtualization. If you want to utilize File and Registry Virtualization for backward compatibility then delete the requestedExecutionLevel node. --> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedprivileges> </security>
thanks
Animesh
这篇关于如果使用visual studio 2008 c#创建安装程序,Windows 7中的权限问题#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文