Get lnk shortcut target from public (all users) folder without elevating admin privileges

1

I am looking for a way to read lnk shortcut target, when this one locates in public folder such as:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

I tried to use following:

  1. Interop.Shell32.FolderItem.GetLink - it throws an exception ( Why do i get E_ACCESSDENIED when reading public shortcuts through Shell32? )
  2. IWshShortcut https://stackoverflow.com/a/13079688/1722921 - it throws an exception too (from HRESULT: 0x80020009 (DISP_E_EXCEPTION))

And I didn't find others ways to do this. I know that I can fix it with elevating admin rights for my program, but I don't want to do it, since I can easily read the values through the Windows UI without getting an elevation prompt. So I am looking for a way programmatically read shortcut target without admin privileges.

c#
.net
windows
shortcut
asked on Stack Overflow Apr 21, 2014 by Anatolii Humennyi • edited May 23, 2017 by Community

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0