Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the target path when the selected file system object is a shortcut? #514

Open
stamminator opened this issue Sep 14, 2024 · 1 comment

Comments

@stamminator
Copy link
Contributor

stamminator commented Sep 14, 2024

I have some network folders I've created shortcuts to using the standard "This PC > Add a network location" context menu action. I haven't been able to find a way to get the path of the shortcut's target in NSS. All of the options I explored using the sel functions return the path of the shortcut file itself, located at %APPDATA%\Microsoft\Windows\Network Shortcuts. These shortcuts are different from standard .lnk files targeting a folder, as evidenced by the shortcut's different Properties UI (see screenshot below).

As you can see here, none of the sel functions or win32 properties via sel.meta I tried refer to the underlying network path (e.g. \\my-network-path\c$). Any ideas on how that could be retrieved?

5u9P9FdbJV

@RubicBG
Copy link
Collaborator

RubicBG commented Sep 14, 2024

path.lnk(sel)
path.lnktarget(sel)
path.lnk.dir(sel)
path.lnktarget.dir(sel)
path.lnk.location(sel)
path.lnktarget.location(sel)
path.lnk.icon(sel)
path.lnktarget.icon(sel)
path.lnk.type(sel)
path.lnktarget.type(sel)
path.lnk.create
path.lnktarget.create
// path.lnk.create(path, target) path.lnk.create(path, target, args, icon, dir, run, admin, comment)

sel.lnk
sel.lnk.dir
sel.lnk.location
sel.lnk.target
sel.lnk.icon
sel.lnk.type
sel.lnktarget
sel.lnktarget.dir
sel.lnktarget.location
sel.lnktarget.target
sel.lnktarget.icon
sel.lnktarget.type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants