Page 1 of 2

Can't Rename file if administrator permission is required

Posted: 30 Jul 2013 12:53
by Adequat
It is not possible to rename a file if administrator permission is required.
For instance, when trying to rename this file:

C:\Program Files (x86)\Test\MyFile.txt

I get this error:
2013-07-30_12-48-44.png
There is not this problem when using Windows Explorer.
Funnily enough, renaming a folder is possible with XYPlorer (eg. C:\Program Files (x86)\Test\)

This is not something new to 12.70. But I think to remember it was possible with some old XYPlorer version.

Re: Can't Rename file if administrator permission is require

Posted: 30 Jul 2013 13:20
by armsys
Adequat,
I have no issue narrated by you with XY 12.70.0006.
XY can rename any files in C:\Program Files (x86) and undo it without a glitch.
Have you set XY with ADMIN privilege?

Re: Can't Rename file if administrator permission is require

Posted: 30 Jul 2013 14:09
by Adequat
Of course, if I run XY with administrator privileges, there is no problem.
But Windows Explorer does not run with administrator privileges, yet is able to rename files after the common Windows security confirmation (Message Box). I expect the same from XY.
It is not good (at least for me), to run XY with administrator privileges, as this prevents dragging files from XY to drop them on applications that don't run with administrator privileges (most apps)

Re: Can't Rename file if administrator permission is require

Posted: 30 Jul 2013 18:27
by admin
This is a bug. Fix comes.

Re: Can't Rename file if administrator permission is require

Posted: 30 Jul 2013 20:31
by grindax
.

Re: Can't Rename file if administrator permission is require

Posted: 30 Jul 2013 20:35
by admin
That fails to work mysteriously.

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 07:11
by Enternal
Just out of curiosity, how did you fixed the renaming UAC issue?

I probably won't be much of a help but when I was fixing issues with this AutoIt program FolderMenu (posted here in the Software sub-forum), one issue with the program is all UAC related. It seems that if I attempt to do anything in a restricted area of the system directly (like the Program Files directory), I will silently get rejected. However if I instead tell the shell to do whatever I want in my place, the UAC dialog pops up.

Of course I'm not much of a programmer but hopefully there's something there that can help.

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 07:24
by armsys
Enternal wrote:Just out of curiosity, how did you fixed the renaming UAC issue?
Hi Enternal,
Have you tried claiming ownership of the whole c:\Program Files (x86)?

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 09:19
by admin
Enternal wrote:Just out of curiosity, how did you fixed the renaming UAC issue?

I probably won't be much of a help but when I was fixing issues with this AutoIt program FolderMenu (posted here in the Software sub-forum), one issue with the program is all UAC related. It seems that if I attempt to do anything in a restricted area of the system directly (like the Program Files directory), I will silently get rejected. However if I instead tell the shell to do whatever I want in my place, the UAC dialog pops up.

Of course I'm not much of a programmer but hopefully there's something there that can help.
Yes, generally passing the job to the shell is the way. But for unknown reasons SHCreateDirectoryEx (which is shell) does not pop the UAC prompt.

(This thread's particular problem had a more complex reason too long to explain.)

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 09:36
by armsys
admin wrote:Yes, generally passing the job to the shell is the way. But for unknown reasons SHCreateDirectoryEx (which is shell) does not pop the UAC prompt.
Perhaps the C:\Program Files (x86) is already owned by "DON"; therefore, SHCreateDirectoryEx remains silent.

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 09:43
by admin
It's owned by "TrustedInstaller".

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 10:06
by armsys
Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\\ConsentPromptBehaviorAdmin to 0

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 10:11
by admin
Thanks, but it is no solution for me to ask my users to edit a registry key. :|

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 10:41
by Filehero
admin wrote:That fails to work mysteriously.
That mystery was already discussed in here, right?


Cheers,
Filehero

Re: Can't Rename file if administrator permission is require

Posted: 31 Jul 2013 10:45
by admin
Yes, but without success, right?