kosamja Posted May 14, 2019 Share Posted May 14, 2019 Taking ownership of file or folder doesnt allow me to edit it, is there any api to modify integrity level? Link to comment Share on other sites More sharing options...
spudw2k Posted May 15, 2019 Share Posted May 15, 2019 (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 May 15, 2019 by spudw2k kosamja and FrancescoDiMuro 1 1 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
kosamja Posted May 15, 2019 Author Share Posted May 15, 2019 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? Link to comment Share on other sites More sharing options...
argumentum Posted May 15, 2019 Share Posted May 15, 2019 I would copy the file to a FAT32 drive to loose what NTFS has. Edit it there. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
kosamja Posted May 15, 2019 Author Share Posted May 15, 2019 (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 May 24, 2019 by kosamja Link to comment Share on other sites More sharing options...
kosamja Posted May 24, 2019 Author Share Posted May 24, 2019 (edited) Found here (https://wimlib.net/forums/viewtopic.php?f=1&t=261&start=13) something about PROCESS_TRUST_LABEL_ACE blocking changes to WindowsApps folder. Is it possible to modify PROCESS_TRUST_LABEL_ACE so that it allows changes? What shoud content of _SYSTEM_PROCESS_TRUST_LABEL_ACE be? https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/ns-ntifs-_system_process_trust_label_ace https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_ace_header https://docs.microsoft.com/en-us/windows/desktop/secauthz/access-mask https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/23e75ca3-98fd-4396-84e5-86cd9d40d343 http://hakril.github.io/PythonForWindows/build/html/security.html#windows.security.SystemProcessTrustLabelACE Edited May 24, 2019 by kosamja Link to comment Share on other sites More sharing options...
orbs Posted May 25, 2019 Share Posted May 25, 2019 @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. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
kosamja Posted May 26, 2019 Author Share Posted May 26, 2019 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 Link to comment Share on other sites More sharing options...
JamoRulz Posted August 28, 2022 Share Posted August 28, 2022 To do that you have to take ownership of the file first, click apply and reopen the props menu. Then you make sure that the Administrators (or if you don't want to provide admin info every time. Then make the user account you want to be the only one with full access.) Then you can use the file like any other file with these perms. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now