locked
Questions about vista integrity level RRS feed

  • Question

  • hi,  how can i modify the integrity level of a executable file. i've been told that internet explorer use a directory called low with a low integrity level for its temperory files. i found the directory and from its properties, i can't find any hint that indicate  that it has a low integrity level. My question is how to programmeticlly change the integrity level of a file (especially a executable file)  or directory using api functions. can i embed the integrity level in manifest as i did to enable visual styles using linkage directives.

    Thanks!

    Saturday, August 16, 2008 11:26 PM

Answers

  • Hello

    If you want to force your application to always run at the low integrity level, you may consider

    1. In the app's init code, check the current integrity level.
    2. If the current IL is not low, programmatically launch the application itself at the low IL, and close the original instance of the application

    You can find the sample code of implementing the above logic in All-In-One Code Framework's CppCreateLowIntegrityProcess sample. Its GetProcessIntegrityLevel function demos the first point, and the CreateLowIntegrityProcess function implements the second.

    If you have any other questions, please feel free to tell me.


    Regards,
    Jialiang Ge
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, March 25, 2010 6:00 AM

All replies

  • Hello

    If you want to force your application to always run at the low integrity level, you may consider

    1. In the app's init code, check the current integrity level.
    2. If the current IL is not low, programmatically launch the application itself at the low IL, and close the original instance of the application

    You can find the sample code of implementing the above logic in All-In-One Code Framework's CppCreateLowIntegrityProcess sample. Its GetProcessIntegrityLevel function demos the first point, and the CreateLowIntegrityProcess function implements the second.

    If you have any other questions, please feel free to tell me.


    Regards,
    Jialiang Ge
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, March 25, 2010 6:00 AM
  • Hello

    How are you? May I know the result of the above suggestions?


    Regards,
    Jialiang Ge
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, March 30, 2010 2:09 PM