[TC 8.0 B22 x32] Win8 Hardlink bug

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

dsscicin
Junior Member
Junior Member
Posts: 19
Joined: 2009-11-03, 13:15 UTC

[TC 8.0 B22 x32] Win8 Hardlink bug

Post by *dsscicin »

Win 8 + TC b22, exe in hardlink directory can't run from TC, however, no problem when running from win8 explorer.
JOUBE
Power Member
Power Member
Posts: 1447
Joined: 2004-07-08, 08:58 UTC

Re: [TC 8.0 B22 x32] Win8 Hardlink bug

Post by *JOUBE »

dsscicin wrote:Win 8
Version ? (x32/x64, DP/CP)
dsscicin wrote: + TC b22
x32/x64?
dsscicin wrote:hardlink
To local Folder, Network folder?
dsscicin wrote:from TC
Version ? (x32/x64, Release/Beta)

No problem her with Win8x64DP (DP: Developer Preview), hardlink to local folder and a call of Tc8b22x64 within Tc8b22x64 and also within Tc757

No problem her with Win8x64DP (DP: Developer Preview), hardlink to local folder [1] and a call of Tc757 within Tc8b22x64 and also within Tc757.

JOUBE

[1] it is a hardlink to a folder on another local drive with all user rights given, wincmd.ini in tc folder.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [TC 8.0 B22 x32] Win8 Hardlink bug

Post by *MVV »

JOUBE wrote:
dsscicin wrote:from TC
Version ? (x32/x64, Release/Beta)
Look to topic title. TC8b22x32.
dsscicin wrote:hardlink directory
JOUBE wrote:hardlink to local folder
Actually hardlinks are just hard file copies, it is impossible to create hardlink for a folder, and all file's hardlinks are within same volume. Junctions are folder links that were available in Windows XP. Symbolic links are reparse points that may be created for file or folder, with absolute or relative path, for local or network path. All theese details should be mentioned: reparse point type (junction or symbolic link, may be known using my NTLinks plugin; absolute or relative path - or just exact path; and target location).
JOUBE
Power Member
Power Member
Posts: 1447
Joined: 2004-07-08, 08:58 UTC

Re: [TC 8.0 B22 x32] Win8 Hardlink bug

Post by *JOUBE »

MVV wrote:Look to topic title. TC8b22x32
You are right...
MVV wrote:
dsscicin wrote:hardlink directory
JOUBE wrote:hardlink to local folder
Actually hardlinks are just hard file copies, it is impossible to create hardlink for a folder
You are right...

JOUBE
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

So what exactly is the problem? How can I reproduce it? I have installed both the developer preview and the consumer preview, both under VirtualBox.
Author of Total Commander
https://www.ghisler.com
dsscicin
Junior Member
Junior Member
Posts: 19
Joined: 2009-11-03, 13:15 UTC

Post by *dsscicin »

I'm sry that I did not describle the problem exactly.
For example:
there is a derectory
D:\Program Files\cpu-z
then cmd to mklink
mklink /J D:\cpu-z "D:\Program Files\cpu-z"
So now
D:\cpu-z <<===>> "D:\Program Files\cpu-z"
However, it fails to run "D:\cpu-z\cpuz.exe" from TC,
OK to run "D:\Program Files\cpu-z\cpuz.exe" from TC,
Both OK to run "D:\cpu-z\cpuz.exe" and "D:\Program Files\cpu-z\cpuz.exe" from system explorer.
(I mean, in the very directory, press ENTER to run cpuz.exe)
ghisler(Author) wrote:So what exactly is the problem? How can I reproduce it? I have installed both the developer preview and the consumer preview, both under VirtualBox.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC just calls ShellExecuteEx with the program name, so maybe ShellExecuteEx is faulty on Windows 8? Or maybe cpu-z fails to find its files when started this way? Sorry, I can only speculate here...
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have just tested it now:
You found a real bug in Windows 8! Due to the hard link, it seems to assume that the file is located on the Internet - not only that, it seems to think that it's on a restricted site! If you right click on the program and choose "Open", you will get such a security warning!

To fix it, run Internet Explorer, open settings, security, custom level. Then choose "Launching applications and unsafe files (not secure) - Enable. Unfortunately IE8 then freaks out every time you start it, so only do it if you use some other browser like Firefox or Chrome.

This bug seems to exist in function ShellExecuteEx and right click menu only, the Explorer doesn't seem to have this bug.

Now the question is how to inform Microsoft about this bug - and will they listen at all? I really doubt it. :(
Author of Total Commander
https://www.ghisler.com
User avatar
JoSch
Junior Member
Junior Member
Posts: 6
Joined: 2008-01-05, 01:13 UTC

Post by *JoSch »

The official way to report Bugs is http://connect.microsoft.com/
Will they listen? Who knows...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Probably not, or maybe if I can write a sample program with .Net.

Anyway, I will try to write a workaround myself: If Windows 8 is detected, I will check all parts of the current path whether they contain any hard links, and if yes, I will resolve them.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

I can confirm that now TC can launch programs from junctions by substituting the real path (tested in beta 23 for reproducing the problem and beta 25 for testing the fix).

However, on the Russian forum a user discovered that volume mount points are processed incorrectly and TC tries to start an EXE with substituted path that includes the volume id (like "Volume{f9ce2d52-870a-11e1-a110-5406a67e74fc}"), and of course there is no such path, so program fails to run. I tested it and can see that volume mount points are not affected by the Windows bug with security restrictions, so I think TC should not substitute mount points, only junctions and symlinks.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Flint
Can you give me an example of a path returned by volume mount points? This would make it easier for me to exclude them.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Christian, you can make a mount point via command-line tool mountvol. Mount point uses reparse point type IO_REPARSE_TAG_MOUNT_POINT like junction but differs in path form (contains just volume GUID instead of full folder path):

Code: Select all

\??\Volume{48eac8a4-7d1a-11df-aa89-806e6f6e6963}\
You can try to pass path in form \\?\Volume{48eac8a4-7d1a-11df-aa89-806e6f6e6963}\Data\Readme.txt and it should work since OS supports such paths, or convert volume guid to normal drive letter: D:\Data\Readme.txt.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

Though history claims to have fixed this bug, it's not really fixed. For example, double-click on a ZIP file displays the message:
Error in packed file Volume{868f755a-8011-11e1-a109-806e6f6e6963}\Microsoft\dotnetfx_cleanup_tool.zip!
Trying to launch an application or open associated file only shows "File not found!"
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Post Reply