문제

I'm facing a problem with running my C# application on Windows Server 2003. I have internal manifest file with following lines

  <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>

And it works fine for Windows 7 or 8, UAC is prompted when user is trying to run application without admin rights. But on windows server 2003 user can launch it without admin rights and UAC is not prompted and as a result application is not working properly.

도움이 되었습니까?

해결책

UAC simply does not exist in Windows Server 2003, it was only introduced in Windows Vista and Windows Server 2008.

Your application will have to accept that it may be started without administrative privileges. It must therefore perform its own check for administrative privileges, and if it finds it is being run by someone other than an administrator, it should tell the user so and then exit.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top