Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#Windows 7请求管理员权限(特殊情况)_C#_Visual Studio 2013_Administrator - Fatal编程技术网

C#Windows 7请求管理员权限(特殊情况)

C#Windows 7请求管理员权限(特殊情况),c#,visual-studio-2013,administrator,C#,Visual Studio 2013,Administrator,我创建了一个C#应用程序,这是我在Visual Studio 2013上创建的清单文件 <?xml version="1.0" encoding="utf-8"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> <trust

我创建了一个C#应用程序,这是我在Visual Studio 2013上创建的清单文件

 <?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
 <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
    <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">



    <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />



  </requestedPrivileges>
  </security>
  </trustInfo>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
  <application>
    <!-- Windows Vista -->
   <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />

  <!-- Windows 7 -->
  <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />

  <!-- Windows 8 -->
  <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />

  <!-- Windows 8.1 -->
  <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />

  <!-- Windows 10 -->
  <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-

</application>
</compatibility>
<dependency>
  <dependentAssembly>
    <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0"
      processorArchitecture="*"
      publicKeyToken="6595b64144ccf1df"
      language="*"
    />
  </dependentAssembly>
   </dependency>
</assembly>

-

因为我有一个清单文件,所以我的程序不能在某些Windows7操作系统上运行。它给出了拒绝访问错误。它如何在一些Windows7操作系统PC上运行(实际上它在所有win10 PC上运行)我读了stackoverflow上可能重复的文章,并尝试了所有可能的方法。你有别的建议吗?请帮帮我。谢谢。

“It give access denied error”您的意思是,当您启动程序时,您不能这样做,因为您的访问被拒绝,或者您正在代码中执行某些操作,即使您在清单中设置了RequiredAdministrator,您的访问也被拒绝?请注意,
-