سلام یه فایل جدید از نوع کانفیگ ایجاد کن
برابر تصویر
و این کد رو داخلش بزار
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<RequestedExecutionLevel level = "requireAdministrator" uiAccess = "false" />
</configuration>
اینم باعث میشه بدون داشتن دسترسی ادمین برنامه اجرا بشه
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker]
@="Run without privilege elevation"
[HKEY_CLASSES_ROOT\*\shell\forcerunasinvoker\command]
@="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""
همچنین اینم دسترسی ر و میده یا حذف میکنه
<?xml version="1.0"?>
<configuration>
<system.web>
<authorization>
<allow roles="Power Users"/>
<deny users="*"/>
</authorization>
</system.web>
</configuration>
<?xml version="1.0"?>
<configuration>
<system.web>
<authorization>
<allow roles="Users"/>
</authorization>
</system.web>
</configuration>
و یا
<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="asInvoker" uiAccess="false" />
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
این مستندات خود مایکروسافته مقایسه کن
xecutable: IsUserAdmin.exe
Manifest:IsUserAdmin.exe.manifest
Sample application manifest file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="IsUserAdmin"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>