UAC Elevator moving files after PC reinstall

I just reinstalled my PC and installed Opus v12 (I've used 11 before).

Now I have strange requests when I trying to move a file from one directory to another (same disk!)

The file was moved from left to right.

  • this is same disk
  • I can create a directory here
  • I can copy file WITHOUT any problem
  • when I try to MOVE the file this requester is displayed
  • ANYWAY, file is moved (no matter what I press - YES or NO)
  • same situation occurs on other disks/partitions - file is moved correctly but everytime UAC requester is displayed.
  • when I just create (like paste) new file this requester is not displayed. File what I've moved was just recorded by other program few minutes ago.

What is wrong?

Looks like this is the problem (my PC was reinstalled a few days ago) with ownership of all files on all disks.
On the left is the newly created file - on the right side - file that already exists (this partition wasn't formatted).

How to solve now this problem?

After installing Windows, I usually run this batch from an elevated shell for every "old" drive:

@echo off

takeown /f D:\*.* /r /d y
icacls D:\*.* /grant administrators:F /t

pause
3 Likes

Fixing the permissions (as per Lxp's post) is the best thing to do first, and always a good idea after reinstalling, as the permissions on the old drive won't usually match the account of the new install.

If the files are being moved (including removing them from the source) but you're still getting a UAC prompt afterwards, it's likely because the destination drive/folder isn't granting your (unelevated) account the right to copy/modify metadata or file permissions.

If that's the case, turning off these settings may mean the UAC prompts stop appearing:

  • Preferences / File Operations / Copy Attributes:
    • Copy security permissions
    • Update permissions/encryption to match the destination when moving files

I will try this tomorrow. Will reply if helped, thx.

(Yes, the file was properly moved and UAC was displayed after).

BTW files on Samba network share doesn't have this problem - so I will try Lxp solution.

1 Like

The first part was executed without problem, second reporting an error.
And DOpus still causes a UAC message when moving files between different directories.

Did you run that from an elevated shell?

You can't tell if takeown was successful or not because its output was redirected to null :slight_smile:

1 Like

@John - I redirected only standard output, errors (if any) will still be displayed. There are a lot of files on this drive (about 10m to complete) so I wanted to hide output to speedup entire operation. You will see one line for every file so it's impossible to catch an error during displaying 100k lines.... There is no summary at the end...

Anyway, the problem was that this wasn't run from an elevated shell.

I've tried also with "icacls /set-owner <domain/user> /T" - and this also works, but doesn't go inside folders, and solutions over the internet is to use a script, set environment and variables bla bla bla...
Linux "chown" is a bit easier to use....

I tried now on another disc and I can confirm that if I only use takeown - everything works now fine. This is enough so icacls have not been used.