Jump to content

Accessing files after mount


Recommended Posts


i mounted my wim, and now i'd like to edit / delete some files using a .bat but they all seem to be protected. what can i do to get acces ?
Easy, you either need to take ownership via elevated command prompt, or use the TakeOwnership.reg and right click to take ownership, which makes things easier.

Take Ownership Reg Info

After ownership is sorted, run your BAT and it should work.

EDIT: If you still cannot take ownership of a particular file, try taking ownership of it's folder.

Edited by MrJinje
Link to comment
Share on other sites

thanks a lot for your answer but it doesn't work

i installed the reg and i have the "take ownership" in my menu

when i use it on a file or directory a cmd windows opens and closes really fast but i still can't modify the files mounted. It says i need to get autorisation from trustedinstaller

i also would like to know if it is possible to use it automatically in my batch so everything is automated

Edited by s7even
Link to comment
Share on other sites

thanks again for you quick answer

i tried to use the takeown command in my batch for a directory and i think it worked but now it says i need autorisation of "my user account"

do i have to use the icacls command too ? what does it do ? i tiried it but i get an error message, dunno how to translate it exactly : mapping between account and security ID is not done

sorry if i look stupid but i'm just learning

Link to comment
Share on other sites

i tried to use the takeown command in my batch for a directory and i think it worked but now it says i need autorisation of "my user account"
That is because you have not given yourself full permission yet (even though you now own the files) Halfway done.
do i have to use the icacls command too ? what does it do ? i tiried it but i get an error message, dunno how to translate it exactly : mapping between account and security ID is not done
Icacls gives your account permissions to access an object (file or folder). So in short, yes you both have to take ownership and use icacls to grant your self permissions after taking ownership.
sorry if i look stupid but i'm just learning
We all gotta learn sometime
takeown /F "%WINDIR%\System32\sppcc.dll"

icacls %WINDIR%\System32\sppcc.dll /grant administrators:F

icacls %WINDIR%\System32\sppcc.dll /grant %USERNAME%:RX

This example, takes ownership of the sppcc.dll file, and the second command grants all local administrators Full (F) permissions.

Third command shows how to use a batch variable / and how to set Read/Write (RX). Here are more examples + icacls syntax

Link to comment
Share on other sites

thanks again for help

i was able to delete some registry key with just takeown of the system32\config directory

i think my mistake was to try to takeown of everything, brutal force FTL :D

do you think it's better to take right on just the files i will modify or the directory ?

Link to comment
Share on other sites

thanks again for help

i was able to delete some registry key with just takeown of the system32\config directory

i think my mistake was to try to takeown of everything, brutal force FTL :D

do you think it's better to take right on just the files i will modify or the directory ?

Smaller directories yes, larger directories no. Config directory is relatively small (number of files-wise), but it would take nearly half an hour to take ownership of the entire Windows directory. (depending on you HDD speed) The number of files in the directory is your acid-test. See what I'm saying.

Edited by MrJinje
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...