Currently, #LinkTarget resolves environment variables.
Will you please add #LinkTargetPure or #UnresolvedLinkTarget to return the unresolved targets? Plus, #ShortcutTarget versions.
Reasoning: Many installers create shortcuts using %ProgramFiles% out of habit, laziness, or ignorance which is fine until WOW64 redirection applies and suddenly all of those shortcuts point to non-existing paths within 32-bit applications on a 64-bit OS.
It also seems tweak WOW64DisableRedirection doesn't come into play here.
Given the age and lack of noise, I'm fine with this being limited to only adding those new properties, but it might be better if XY had some smartness to handle this better. Such as if target contains %ProgramFiles% and the resolved (with redirection) path does not exist but the resolved (without redirection) path does - use the latter.
Interestingly this also proves problematic when viewing the System Properties of those shortcuts because Windows itself won't show you the unresolved target and falls victim of the redirection when opened from XY's 32-bit context menu.
New XY-Specific Property: Unresolved Link Target
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
-
admin
- Site Admin
- Posts: 66588
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: New XY-Specific Property: Unresolved Link Target
Really? Did not even know this was possible.Many installers create shortcuts using %ProgramFiles% ...
Uh, no, not that I know of. There is no such thing in my code.#LinkTarget resolves environment variables.
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: New XY-Specific Property: Unresolved Link Target
They are both definitely happening, unfortunately.admin wrote:Really? Did not even know this was possible.Many installers create shortcuts using %ProgramFiles% ...
Uh, no, not that I know of. There is no such thing in my code.#LinkTarget resolves environment variables.
If I look at the raw view of one of these shortcuts I can see it referencing %ProgramFiles%.
A column using #LinkTarget reports it as C:\Program Files (x86)\...
Opening the properties from XY's 32-bit context menu shows the x86 path; the 64-bit menu shows native path.
Opening the shortcut in XY gives a location not found error.
Opening it in WE works correctly.
Maybe your code doesn't resolve them but the method you call does - can you tell it to not perform the resolving or at least ignore WOW64 redirection?
I'll try to get you more details on Monday (though I'm not sure what else I can do to prove this is true).
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: New XY-Specific Property: Unresolved Link Target
See for yourself Don:
The columns in XY show what the normal "Link Target" shell property returns and XY's own #ShortcutTarget, and WE shows the shell property as it sees it.
The Raw View shows that the file itself definitely references the environment variable, and the extracted text below shows no mention of the x86 prog files.
The Properties dialog on the left is from XY's 64-bit context menu helper - the one on the right from its standard 32-bit context menu.
Extracted text of Bins.lnk:
The Raw View shows that the file itself definitely references the environment variable, and the extracted text below shows no mention of the x86 prog files.
The Properties dialog on the left is from XY's 64-bit context menu helper - the one on the right from its standard 32-bit context menu.
Extracted text of Bins.lnk:
Running the shortcut within XY:PàOÐ ê:i
PROGRA~1
1UPIND~1
WCz&
BINSLA~1.EXE
C:\Program Files\1UPIndustries\Bins\BinsLauncher.exe
%ProgramFiles%\1UPIndustries\Bins\BinsLauncher.exe
1SPSâ
1SPSU(L
ÐáÔ-áÕó=
[redacted: My Computer Name]
(Cò÷F
#ÙÞöK|
ãkcuî"ä
|éÓþ)
(Cò÷F
#ÙÞöK|
ãkcuî"ä
|éÓþ)
Not Found: Link Target
-----
Could not find:
C:\Program Files (x86)\1UPIndustries\Bins\BinsLauncher.exe
To see the attached files, you need to log into the forum.
-
admin
- Site Admin
- Posts: 66588
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: New XY-Specific Property: Unresolved Link Target
I don't think I should do anything here. This is Windows behavior and Windows responsibility. It would be too smart to start fixing something like this.
FAQ | XY News RSS | XY X
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: New XY-Specific Property: Unresolved Link Target
That's a bit problematic since that means these shortcuts will only work from XY if the program is in fact installed to both the x86 and native program files directories - but fine onto my next wish.
XYplorer Beta Club