Question: Take Ownership File Denied?

Discussion in 'Windows 8' started by DioNZB, Dec 9, 2014.

  1. DioNZB

    DioNZB MDL Member

    Jun 23, 2013
    190
    177
    10
    I have a batch file to automate some things for slipstreaming windows

    in that batch file i want to change the wallpaper

    so in that script he takes C:\mount\Windows\Web\Wallpaper\Windows over by command: (take ownership)

    icacls C:\mount\Windows\Web\Wallpaper\Windows /grant administrators:F /T

    Then i get: access denied?
    what do i wrong?

    gr. Dio
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    7,547
    23,976
    240
    #2 abbodi1406, Dec 9, 2014
    Last edited: Dec 10, 2014
    Take ownership before giving permissions:
    takeown /f Directory /r /d y
    icacls Directory /grant *S-1-5-32-544:F /T
     
  3. DioNZB

    DioNZB MDL Member

    Jun 23, 2013
    190
    177
    10
    thx :clap::clap::clap::clap:
     
  4. MonarchX

    MonarchX MDL Expert

    May 5, 2007
    1,272
    199
    60
    I would be very careful or not use "Take Ownership" at all... It always screws up my Windows permissions. They eventually stop working and I have to run everything as administrator any .exe to work. Windows 8.1 is extremely sensitive to permissions. Last time using "Take Ownership" prevented me from the option "run as administrator" in shortcut or .exe file properties from sticking. The only it would stick is if I'd go into "Change Settings for All Users" menu and select "run as administrator" from there. The funny thing is that I only took ownership of games folders, not Windows or Program Files or any of that.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...