locked
Launch a process with elevated or non-elevated mode RRS feed

Answers

  • Hi  Le Vo  ,
    In  c#   it's  work  differently  you  must  add  a  manifest file  to your project .your  file will  look  like this
    <?xml version="1.0" encoding="utf-8"?>
    <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <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">
            <!-- Opzioni manifesto UAC
                 Per modificare il livello di Controllo dell'account utente di Windows, sostituire il 
                 nodo requestedExecutionLevel con uno dei seguenti.
            <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
            <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
            <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
    
                Se a scopo di compatibilità con le versioni precedenti si desidera utilizzare la funzionalità Virtualizzazione file system e registro di sistema, 
                eliminare il nodo requestedExecutionLevel.
                    -->
            <requestedExecutionLevel level="asInvoker" uiAccess="false" />
          </requestedPrivileges>
        </security>
      </trustInfo>
    </asmv1:assembly>
    all what u  need  to  do it's to  uncomment this line 
    <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
    and comment the other one 
      <requestedExecutionLevel level="asInvoker" uiAccess="false" />
    Hope this Help


    A man's dreams are an index to his greatness
    Monday, February 1, 2010 8:13 AM
  • Monday, February 1, 2010 8:55 AM

All replies

  • Hi  Le Vo  ,
    In  c#   it's  work  differently  you  must  add  a  manifest file  to your project .your  file will  look  like this
    <?xml version="1.0" encoding="utf-8"?>
    <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <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">
            <!-- Opzioni manifesto UAC
                 Per modificare il livello di Controllo dell'account utente di Windows, sostituire il 
                 nodo requestedExecutionLevel con uno dei seguenti.
            <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
            <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
            <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
    
                Se a scopo di compatibilità con le versioni precedenti si desidera utilizzare la funzionalità Virtualizzazione file system e registro di sistema, 
                eliminare il nodo requestedExecutionLevel.
                    -->
            <requestedExecutionLevel level="asInvoker" uiAccess="false" />
          </requestedPrivileges>
        </security>
      </trustInfo>
    </asmv1:assembly>
    all what u  need  to  do it's to  uncomment this line 
    <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
    and comment the other one 
      <requestedExecutionLevel level="asInvoker" uiAccess="false" />
    Hope this Help


    A man's dreams are an index to his greatness
    Monday, February 1, 2010 8:13 AM
  • Monday, February 1, 2010 8:55 AM