0

i can easly get the target path of any shortcut file without unicode characters.But when theres a unicode character in shortcut filename, i get the target path as blank.

here is my code

WshShell shell = new WshShell();
IWshShortcut link = (IWshShortcut)shell.CreateShortcut(path_lnk);
targetpath= link.TargetPath;
fuujinnn
  • 1
  • 1
  • 1
  • 4
  • Seems to be a duplicate of https://stackoverflow.com/questions/13542005/create-shortcut-with-unicode-character – ckuri Oct 17 '18 at 12:58
  • its creating shortcut not getting target path of shortcut – fuujinnn Oct 17 '18 at 13:12
  • I doubt it matters if you set or get the TargetPath property. The answer there states that WshShell is an outdated technology that just doesn't support Unicode. – ckuri Oct 17 '18 at 13:23
  • then whats the best way of getting shortcut even with unicode? – fuujinnn Oct 17 '18 at 13:29
  • Have you tried using the linked answer up until the `Shell32.ShellLinkObject lnk = (Shell32.ShellLinkObject)itm.GetLink;` line and look what `lnk.Path` says? – ckuri Oct 17 '18 at 13:36
  • Yes it worked thanks. – fuujinnn Oct 17 '18 at 14:26

0 Answers0