Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Adding a new owner for the file, explorer doesn't update

12 Mar 2014   #11
Layback Bear

Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64

Quote   Quote: Originally Posted by Ridvan View Post
Guys, I can think everything you suggested. But I need a solution for my problem, I dont want suggestions.
This kind of post will get you very few solutions if any at all.

My System SpecsSystem Spec
12 Mar 2014   #12

Windows 7 Ultimate x64

Quote   Quote: Originally Posted by Ridvan View Post
Guys, I can think everything you suggested. But I need a solution for my problem, I dont want suggestions.
What kind of proposition would you consider as a "solution"? Given that your concrete problem is not clear, I can't think of a concrete solution.

"Marking" files as viewed or not is not the task of a filesystem or Windows Explorer, to begin with, and I suppose that what's you're trying to do right?

One last from my part, use the archive attribute, enable the attributes column, and if it shows an "A", it's viewed. Remember to change it after you viewed it, under properties => Advanced => File for archiving (the first checkbox).
My System SpecsSystem Spec
12 Mar 2014   #13

W7 Pro SP1 64bit

Quote   Quote: Originally Posted by Ridvan View Post
I am thinking of something to mark my video files as watched or not watched on Windows Explorer.

And I have an idea. Showing the owner tab on windows explorer and changing it from rightclick as watched. So I created a new user profile named WATCHED. And I tried this code from cmd.

icacls D:\Folder\TvSeries\video.720p.mkv /grant WATCHED:F /q
It grants WATCHED user as a owner but on windows explorer it shows the main one. So It doesn't making any difference. How can I fix that?
You granted the user named WATCHED full NTFS file access rights. The command that you issued has nothing to do with file ownership. Take a look at the help info for icacls:

C:\>icacls /?

ICACLS name /save aclfile [/T] [/C] [/L] [/Q]
    stores the DACLs for the files and folders that match the name
    into aclfile for later use with /restore. Note that SACLs,
    owner, or integrity labels are not saved.

ICACLS directory [/substitute SidOld SidNew [...]] /restore aclfile
                 [/C] [/L] [/Q]
    applies the stored DACLs to files in directory.

ICACLS name /setowner user [/T] [/C] [/L] [/Q]
    changes the owner of all matching names. This option does not
    force a change of ownership; use the takeown.exe utility for
    that purpose.

ICACLS name /findsid Sid [/T] [/C] [/L] [/Q]
    finds all matching names that contain an ACL
    explicitly mentioning Sid.

ICACLS name /verify [/T] [/C] [/L] [/Q]
    finds all files whose ACL is not in canonical form or whose
    lengths are inconsistent with ACE counts.

ICACLS name /reset [/T] [/C] [/L] [/Q]
    replaces ACLs with default inherited ACLs for all matching files.

ICACLS name [/grant[:r] Sid:perm[...]]
       [/deny Sid:perm [...]]
       [/remove[:g|:d]] Sid[...]] [/T] [/C] [/L] [/Q]
       [/setintegritylevel Level:policy[...]]

    /grant[:r] Sid:perm grants the specified user access rights. With :r,
        the permissions replace any previouly granted explicit permissions.
        Without :r, the permissions are added to any previously granted
        explicit permissions.

    /deny Sid:perm explicitly denies the specified user access rights.
        An explicit deny ACE is added for the stated permissions and
        the same permissions in any explicit grant are removed.

    /remove[:[g|d]] Sid removes all occurrences of Sid in the ACL. With
        :g, it removes all occurrences of granted rights to that Sid. With
        :d, it removes all occurrences of denied rights to that Sid.

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

        e - enables inheritance
        d - disables inheritance and copy the ACEs
        r - remove all inherited ACEs

    Sids may be in either numerical or friendly name form. If a numerical
    form is given, affix a * to the start of the SID.

    /T indicates that this operation is performed on all matching
        files/directories below the directories specified in the name.

    /C indicates that this operation will continue on all file errors.
        Error messages will still be displayed.

    /L indicates that this operation is performed on a symbolic link
       itself versus its target.

    /Q indicates that icacls should supress success messages.

    ICACLS preserves the canonical ordering of ACE entries:
            Explicit denials
            Explicit grants
            Inherited denials
            Inherited grants

    perm is a permission mask and can be specified in one of two forms:
        a sequence of simple rights:
                N - no access
                F - full access
                M - modify access
                RX - read and execute access
                R - read-only access
                W - write-only access
                D - delete access
        a comma-separated list in parentheses of specific rights:
                DE - delete
                RC - read control
                WDAC - write DAC
                WO - write owner
                S - synchronize
                AS - access system security
                MA - maximum allowed
                GR - generic read
                GW - generic write
                GE - generic execute
                GA - generic all
                RD - read data/list directory
                WD - write data/add file
                AD - append data/add subdirectory
                REA - read extended attributes
                WEA - write extended attributes
                X - execute/traverse
                DC - delete child
                RA - read attributes
                WA - write attributes
        inheritance rights may precede either form and are applied
        only to directories:
                (OI) - object inherit
                (CI) - container inherit
                (IO) - inherit only
                (NP) - don't propagate inherit
                (I) - permission inherited from parent container


        icacls c:\windows\* /save AclFile /T
        - Will save the ACLs for all files under c:\windows
          and its subdirectories to AclFile.

        icacls c:\windows\ /restore AclFile
        - Will restore the Acls for every file within
          AclFile that exists in c:\windows and its subdirectories.

        icacls file /grant Administrator:(D,WDAC)
        - Will grant the user Administrator Delete and Write DAC
          permissions to file.

        icacls file /grant *S-1-1-0:(D,WDAC)
        - Will grant the user defined by sid S-1-1-0 Delete and
          Write DAC permissions to file.
My System SpecsSystem Spec

12 Mar 2014   #14

64-bit Windows 10 Pro

Hello Ridvan,

As UserNameIssues posted above, the command you used would only set permissions for the file. If you are not the owner or do not already have access rights, then the command would not be able to set permissions and is why you do not see the change in the file's properties.

You will need to take ownership of the file first, then grant permission. OPTION TWO in the tutorial below can help show you more on this.

Take Ownership of file

Hope this helps, :)
My System SpecsSystem Spec
13 Mar 2014   #15

W7 Pro SP1 64bit

I'm pretty sure that the OP is already the owner of these files.

The OP wants to give away file ownership to mark videos as having been watched.

icacls D:\Folder\TvSeries\video.720p.mkv /setowner WATCHED

Windows Registry Editor Version 5.00


@="Mark as WATCHED"

@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /setowner WATCHED"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /setowner WATCHED"
"Mark as WATCHED" can be changed to almost any desired text.

Windows Registry Editor Version 5.00

If the OP wants more that one RunAs...
(e.g. wants take ownership and mark as watched)
...then something like this might work:
Multiple runas reg entries still possible? - Windows 7 - MSFN Forum

The reg file is just for the context menu for files.

I left the takeown commands just in case.
One is essentially taking ownership and then giving it away.

I have no idea what IsolatedCommand does. It does not seem to be needed, but I left it in since it is sprinkled all over the web when making these RunAs things.

The two reg files are in the attached zip.

Attached Files
File Type: zip (574 Bytes, 1 views)
My System SpecsSystem Spec
13 Mar 2014   #16

Windows 7 Ultimate 32bit


Thanks for the awesome solution. Works like charm!

edit: I tried to add this command in HKEY_CLASSES_ROOT\SystemFileAssociations\.mkv\Shell\Watched\command
it didn't work. Is it possible to add this command only for .mkv .avi .mp4 files? Either way I am happy.
My System SpecsSystem Spec
13 Mar 2014   #17

W7 Pro SP1 64bit

Glad that it worked for you.

I don't see an easy way to make the context menu extension specific.

Maybe other forum members know of a way to do that.
My System SpecsSystem Spec
13 Mar 2014   #18

Windows 7 Ultimate 32bit

I handled it now it's working exactly like I want.
My System SpecsSystem Spec

 Adding a new owner for the file, explorer doesn't update

Thread Tools

Similar help and support threads
Thread Forum
changing file owner
I'm getting a few problems that seem related to the fact some of my files and folders are owned by the administrator or require administrator permissions. I use GFI Backup. It reports problems with lacking permissions to access certain files -- unless I turn off UAC. Also there are many...
General Discussion
I don't have access to a file even though I'm the owner
I have a huge problem. I've been trying to download a resource pack for a program and it says 'you don't have write privileges to directory C\Users\......Resources\Clipart\Rules' But when I check in the Properties it says I'm the Owner. I REALLY need to get this downloaded and have no idea...
General Discussion
File explorer doesn't remember my position
Hi guys. I've noticed that, when I put my computer to sleep and wake it back up, if I have a file explorer window open with a large list of files (several pages of family pictures in a detailed list view), the window defaults to the first (top) file in the list -- if I am clicking through pictures...
General Discussion
ID3 info changed in WMP12 doesn't change in file explorer
I'm trying to change my data in WMP12. That works fine, but the data doesn't change i File Explorer. I've tried using "use updated mediainfo". I'm lost to what will make it work. Regards Frank DK
Music, Pictures & Video
Windows Explorer doesn't update view when moving or deleting files
This behavior just started within the past week or so. When I delete or move files in Windows Explorer, the files just stay in the right-hand pane. They DO get deleted or moved, but I have to hit F5 to refresh the view. This never happened before, until about a week ago. Any help? ...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:15.
Twitter Facebook Google+