Jump to content











Photo
- - - - -

Win7PE-SE issue - Taking Ownership of Files


  • Please log in to reply
53 replies to this topic

#1 Dramastic

Dramastic

    Member

  • .script developer
  • 55 posts
  •  
    United States

Posted 17 October 2011 - 09:17 PM

I ran into a problem using Win7PE-SE trying to take ownership of files (In Windows Explorer, Right-Click->Properties->Security Tab->Advanced Button->Ownership Tab->Edit Button)..

This displays a dialog box with the following error:

Windows Security
-----------------------
Can't open access control editor. Invalid value for registry

As a result, I am unable to take the ownership of the files I need in order to set their permissions to make them accessible so that I can move them to another hard drive..

Any suggestions? Fixes?

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 17 October 2011 - 10:00 PM

You can't change permissions in Win7PESE.
Don't know, if it works in any other Win7 based PE, but i doubt it.

:cheers:

#3 homes32

homes32

    Gold Member

  • .script developer
  • 1029 posts
  • Location:Minnesota
  •  
    United States

Posted 17 October 2011 - 10:45 PM

I know what your talking about and am working on a solution. stay tuned.

#4 RoyM

RoyM

    Frequent Member

  • .script developer
  • 415 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 17 October 2011 - 10:45 PM

Haven't tried these reg entries in Win7PE-SE, Might be worth a try.

Attached Files



#5 Dramastic

Dramastic

    Member

  • .script developer
  • 55 posts
  •  
    United States

Posted 18 October 2011 - 01:15 AM

I've been setting permissions lots of times from Win7PE-SE - however this is the first time I seem to need to take ownership to complete the permissions changes. I have had no problems setting permissions except for the ownership issue..


I tried the takeown and icacls commands from the .reg files on the folder I am having trouble with..

..takeown says:
"Error: No mapping between account names and security IDs was done"

..and icacls makes it through some of the files, then says:
"Access denied"
on one of the files and
"..Failed processing 1 files"

so unfortunately that didn't seem to get me any further..

#6 RoyM

RoyM

    Frequent Member

  • .script developer
  • 415 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 18 October 2011 - 05:11 AM

Hi Dramastic

I assume these are "not" files within the PE?.

Please specify which ownerspermissions are currently set for these files?
Also are target systemfiles joined to a domain or workgroup
Have you changed any usernames on target systemfiles

More info needed Please.

#7 Dramastic

Dramastic

    Member

  • .script developer
  • 55 posts
  •  
    United States

Posted 18 October 2011 - 05:31 AM

Thanks for providing me with help on this guys...

I've figured out enough now that I can say the issues I'm having with takeown and icacls is not limited to Win7PE-SE..

The files I'm working with are on an old hard drive apparently containing Windows 2000. The current owner on the files is indeed a domain administrator, granting only that user access..

What I have just figured out is the following:

booting into the command prompt from a Windows 2008 R2 DVD and using takeown and icacls gives the same errors!

I finally began to suspect and decided to try to shorten the folder names containing the files, and now by alternately using takeown and icacls commands from those .reg files, I am slowly making some progress. Its slow going as I'm only gaining access to one or a handful of files at a time per run of the commands, but it does not appear to be an issue related to Win7PE-SE..

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14296 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 18 October 2011 - 10:22 AM

Mind you, possibly VERY UNrelated :ph34r: but not much ;).
If you want to get access (copy the actual file contents of the files) you may want to try "direct access".
http://reboot.pro/15086/page__st__25

:cheers:
Wonko

#9 RoyM

RoyM

    Frequent Member

  • .script developer
  • 415 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 18 October 2011 - 02:44 PM

See if this will do the trick
http://www.hobeanu.c...ccessgain-tool/


#10 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12701 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 18 October 2011 - 04:22 PM

I also have had a lot of troubles with orphaned mounted wims left as undeletable directories.

I solved my issue completelly with Macrium Reflect PE (unfortunatelly commercial)

Peter

#11 homes32

homes32

    Gold Member

  • .script developer
  • 1029 posts
  • Location:Minnesota
  •  
    United States

Posted 18 October 2011 - 04:42 PM

See if this will do the trick
http://www.hobeanu.c...ccessgain-tool/


probably not. it won't run in vista/win7 because its an unsigned kernel mode driver.
I made a plugin for it (win7x86/x64) awhile ago but disabling checking PITA for a PE build.

#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14296 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 18 October 2011 - 04:45 PM

I also have had a lot of troubles with orphaned mounted wims left as undeletable directories.

I don't think that orphaned directories is connected with ownership/permissions :dubbio:
What actually did you do with the tool you mentioned?
I think that it is similar to the manual steps you can read in this .pdf :unsure::
http://accessdata.co...Files.en_us.pdf

:cheers:
Wonko

#13 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12701 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 18 October 2011 - 04:51 PM

I don't think that orphaned directories is connected with ownership/permissions :dubbio:
What actually did you do with the tool you mentioned?

Maybe that my issue was a different one. I could not delete the directories even after declaring "ME" as owner and gave full access to every user.

In Macrium Reflect I used the explorer, and clicked "Delete" in the directories' context menu.

Peter

#14 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 18 October 2011 - 06:45 PM

For those, who have said, that they changed permissions before in Win7PESE, please check after you think that you have done so successfully and you will see, that it didn't actually take.
Have fallen into that trap too.

:cheers:
  • pscEx likes this

#15 ChrisR

ChrisR

    Silver Member

  • .script developer
  • 784 posts
  •  
    France

Posted 18 October 2011 - 09:01 PM

See if this will do the trick
http://www.hobeanu.c...ccessgain-tool/


probably not. it won't run in vista/win7 because its an unsigned kernel mode driver.
I made a plugin for it (win7x86/x64) awhile ago but disabling checking PITA for a PE build.

I do not know if it can do the job, there is "Access Gain" script in http://gena.cwcodes.net/ (Gena\Drivers\6 Other"), see http://gena.cwcodes.net/projectindex.php. the script is compatible to pe2/3, not personally used and tested.
May be good to have a try :)

#16 homes32

homes32

    Gold Member

  • .script developer
  • 1029 posts
  • Location:Minnesota
  •  
    United States

Posted 18 October 2011 - 09:46 PM

it won't run in vista/win7 because its an unsigned kernel mode driver.
I made a plugin for it (win7x86/x64) awhile ago but disabling checking PITA for a PE build.



#17 u2o

u2o

    Frequent Member

  • .script developer
  • 257 posts
  • Location:Argentina
  •  
    Argentina

Posted 20 February 2012 - 06:53 AM

I have the same problem, I can't change the file/folder owner. :frusty:

It's necessary, for example to delete/clear system restore points before creating a backup (on a windows drive)... This can save about 10 GB (or more)... in the size.

Nobody could make it work?

#18 wimb

wimb

    Gold Member

  • Developer
  • 2293 posts
  •  
    Netherlands

Posted 20 February 2012 - 08:10 AM

Not a solution to change the permission, but ....
If you use ExplorerXP.exe portable App then you are probably allowed to do anything you want.

Delete or Copy files without having permission. http://www.explorerxp.com/


If you want to take ownership you can try to use SetACL.exe as described here
http://helgeklein.com/

:cheers:
  • u2o likes this

#19 u2o

u2o

    Frequent Member

  • .script developer
  • 257 posts
  • Location:Argentina
  •  
    Argentina

Posted 22 February 2012 - 05:03 AM

Not a solution to change the permission, but ....
If you use ExplorerXP.exe portable App then you are probably allowed to do anything you want.

Delete or Copy files without having permission. http://www.explorerxp.com/


If you want to take ownership you can try to use SetACL.exe as described here
http://helgeklein.com/

Thanks wimb!

But ExplorerXP don't allow delete files in System Volume Information, don't shows an error message, but not delete them... as with MS-Explorer.

Anyway that isn't the solution, since the permissions are managed by the system.
In Win7PE, we only have a user "Default". I remember BartPE ... the user was "SYSTEM", it had more permissions (all permissions) that "Admin user", so... allowed everything (and too allowed change permissions and the file owner).
But I don't think the problem is the user name or permissions of the Win7PE User (Default) . The problem is the owner of the file. With another files it works...

I was trying to load the default users of Windows 7, importing multiple registry keys for HKLM\SAM and HKLM\SYSTEM, but I haven't success...
Neither do I have managed to integrate "GPEDIT" as to enable "Group Policy Editor", or at least display the users and their policies (or portion thereof).

I'm recording every RegKey call to run the editing permissions in Windows 7 and trying to see if it works ... but it will take some time ...

But anyway ... I wish edit the file permissions, with Windows File Properties, only for some files... And so avoid terrible disasters...

#20 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 February 2012 - 10:51 AM

No matter what Win7PE claims, who the user is, unless you use a special build, it is still System like in BartPE.

:cheers:

#21 u2o

u2o

    Frequent Member

  • .script developer
  • 257 posts
  • Location:Argentina
  •  
    Argentina

Posted 22 February 2012 - 11:21 PM

Thanks MedEvil!

I had that doubt. I am working to recognize all keys...

#22 Agent47

Agent47

    Frequent Member

  • Advanced user
  • 164 posts
  •  
    India

Posted 28 April 2012 - 10:10 AM

I can confirm that accessgain works like a charm in Win7pe x86.What i did is to mount the WIM and add accessgain service entry to the SYSTEM hive manually(via regedit-you also need to copy the accessgain.sys file to the drivers folder).After unmounting and booting it works without any problem.

#23 u2o

u2o

    Frequent Member

  • .script developer
  • 257 posts
  • Location:Argentina
  •  
    Argentina

Posted 01 May 2012 - 04:55 AM

I can confirm that accessgain works like a charm in Win7pe x86.What i did is to mount the WIM and add accessgain service entry to the SYSTEM hive manually(via regedit-you also need to copy the accessgain.sys file to the drivers folder).After unmounting and booting it works without any problem.


Hi Agent47, accessgain.sys needs a script to work in Win7PE. I couldn't make it work. Can you copy your working registry keys?

#24 paraglider

paraglider

    Gold Member

  • .script developer
  • 1720 posts
  • Location:NC,USA
  •  
    United States

Posted 01 May 2012 - 12:19 PM

Script is referenced above in post #15 ( http://gena.cwcodes.net/Projects/Gena/Drivers/6%20Other/AccessGainDrivers.script ). Works fine for me in win7pe_se. However I never need to use it - have not found any folders that cannot be accessed using the default system user of pe.

#25 Agent47

Agent47

    Frequent Member

  • Advanced user
  • 164 posts
  •  
    India

Posted 02 May 2012 - 04:05 AM

For anyone interested here is the registry entries which worked for me.First you should mount the WIM file and load SYSTEM hive in the name 'WINPE'.Copy 'accgain.sys' to the system 32drivers folder(if the sys file name is different,must rename it to accgain.sys).Then apply the reg entries.For some reason accessgain works better on full explorer.Micro explorer or BSexplorer is not 100% compatible with it.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINEWINPE]

[HKEY_LOCAL_MACHINEWINPEControlSet001]

[HKEY_LOCAL_MACHINEWINPEControlSet001Control]

[HKEY_LOCAL_MACHINEWINPEControlSet001ControlGroupOrderList]

"FSFilter Activity Monitor"=hex:02,00,00,00,01,00,00,00,02,00,00,00

[HKEY_LOCAL_MACHINEWINPEControlSet001services]

[HKEY_LOCAL_MACHINEWINPEControlSet001servicesAccessGainDriver]

"Type"=dword:00000002

"Start"=dword:00000001

"ErrorControl"=dword:00000001

"Tag"=dword:00000002

"ImagePath"=hex(2):5c,00,3f,00,3f,00,5c,00,58,00,3a,00,5c,00,57,00,69,00,6e,00,

  64,00,6f,00,77,00,73,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,

  00,5c,00,64,00,72,00,69,00,76,00,65,00,72,00,73,00,5c,00,61,00,63,00,63,00,

  67,00,61,00,69,00,6e,00,2e,00,73,00,79,00,73,00,00,00

"DisplayName"="AccessGainDriver"

"Group"="FSFilter Activity Monitor"

"DependOnService"=hex(7):46,00,6c,00,74,00,4d,00,67,00,72,00,00,00,00,00

"Description"="File system access gain mini-filter driver"

[HKEY_LOCAL_MACHINEWINPEControlSet001servicesAccessGainDriverInstances]

"DefaultInstance"="AccessGain Instance"

[HKEY_LOCAL_MACHINEWINPEControlSet001servicesAccessGainDriverInstancesAccessGain Instance]

"Altitude"="370020"

"Flags"=dword:00000000


After booting in to win7pe open CMD window and type 'fltmc'.If everything is ok,you can see accessgain driver in the list.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users