Failing file copy procedure

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Reinhard125
Junior Member
Junior Member
Posts: 6
Joined: 2007-10-27, 19:39 UTC

Failing file copy procedure

Post by *Reinhard125 »

This post is not about a TC bug, but about a failing file copy attempt caused by Windows, where TC could be of help to handle it.

I often copy file from a mapped network drive (with an own drive letter) to a windows program directory, e.g. c:\Program Files (x86)\myProgram\.

When doing so, I am asked to grand administrator privileges to write to the program directory, which I do. However, the file copy fails, because after granting administrator privileges I no longer can access my network drive.

The reason is, that elevating the privileges does not change the privileges of my normal user account, but actually Windows has a second account in the background, which has the administrator privileges. Windows switches to this second account, when needed. You can easily verify this, by starting TC with administrator priviliges and then look for your mapped network drives. They are gone!

Proposed solution using an intermediate local directory:
If such a situation is identified, first the files should be copied from the network drive to a local drive, then administrator privileges should be granted and then the files should be copied to the destination directory.

Ceers,
Reinhard
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

First its not a bug so it belongs to suggestions forum.
You are kidding with your proposed solution.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

No, it would be much better if TC would resolve the network mapping to UNC (there's an API function for that) and TC's admin tool would try to copy the file from the UNC path instead.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Are you sure that the elevated account would have read rights to the UNC path?
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2ghisler(Author)
No, I'm not sure that it works in all cases. However, directories/drives are shared for users/groups, not users/groups with specific privileges/rights. The only case I can think of where my suggestion wouldn't work is when a network share can be accessed by users only, but not by administrators. (I don't know if elevated processes access network shares as administrators.)

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply