Jump to content
kosamja

How to change file or folder integrity level?

Recommended Posts

Taking ownership of file or folder doesnt allow me to edit it, is there any api to modify integrity level?

SnapCrab_NoName_2019-5-14_23-53-32_No-00.png.49d63e1a2f773f781390f1ee4a5e8882.png

Share this post


Link to post
Share on other sites
Posted (edited)

If you have the appropriate permissions, it looks like you could use the command line tool icacls to set the integrity level.

icacls  /setintegritylevel [(CI)(OI)]Level explicitly adds an integrity
        ACE to all matching files.  The level is to be specified as one
        of:
            L[ow]
            M[edium]
            H[igh]
        Inheritance options for the integrity ACE may precede the level
        and are applied only to directories.

https://blogs.msdn.microsoft.com/jolson/2007/11/12/whats-mandatory-integrity-control/

https://web.archive.org/web/20080513154947/http://www.securityfocus.com/print/infocus/1887

 

I also found this MDSN page - https://docs.microsoft.com/en-us/windows/desktop/api/securitybaseapi/nf-securitybaseapi-addmandatoryace

Edited by spudw2k

Share this post


Link to post
Share on other sites

Changed integrity level and taken ownership but still cant edit file even if I use admin account. Any idea what else needs to be disabled?

SnapCrab_NoName_2019-5-15_18-16-54_No-00.png.13662bf1bbbe9af0499e65ec07737c24.png

SnapCrab_NoName_2019-5-15_18-16-35_No-00.png.74c987eb9eba228cde8dcb0af509de41.png

 

Share this post


Link to post
Share on other sites
Posted (edited)

I still get access denied error in that case. Found this link: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/access-denied-when-adding-folders-to-windowsapps/3e6bfbf7-9457-49b5-8fbd-94c430105993

It seems editing file I want is impossible unless there is anything else to change beside permissions and integrity level.

Edited by kosamja

Share this post


Link to post
Share on other sites

@kosamja,

Windows has several protection mechanisms against users making changes to system files. and there is a good reason for that.

how certain are you that your reason for making changes to system files is better than their reason to prevent that?

bare in mind that even if you succeed on your test target, when going to deploy on a larger scale, high percentage of failures is inevitable.

i advise you either describe or rethink your purpose in all this, so we may help you find a better - perhaps officially supported - method to achieve your goal.

Share this post


Link to post
Share on other sites

I just want to edit taskbar context menu which is in explorer.exe.mui (menu 205) to remove some context menu entries, i am not aware of any other way to remove them beside editing explorer.exe.mui. But cant edit explorer.exe.mui inside of installed language packs because they are in WindowsApps folder

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...