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
Failing file copy procedure
Moderators: Hacker, petermad, Stefan2, white
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
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Are you sure that the elevated account would have read rights to the UNC path?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
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
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror