.exe filename from Desktop Shortcut .lnk file

SergeD

Member
Joined
Oct 25, 2007
Messages
10
Programming Experience
10+
Hi,


I want to drag a desktop shortcut .lnk file into an image and get it exe name (the target property). Is it possible to retrieve that exe name without using Windows Script Host Object model (wshom.ocx) or MicroSoft Shell Controls And Automation (Shell32.Dll) references.



I tried to get it using Filedialogs without opening the dialog window (DereferenceLinks = true) and Process without loading the .lnk file but had no success.



Thanks,



SergeD
 
Thanks for your reply.

Are wshom.ocx and Shell32.Dll references may be used in a shareware distribution made with VB 2005 (having Framework 2) in any windows XP or Vista versions safely ?

SergeD
 
Shell32 is part of Windows so there's no issue there. I don't no why you'd need an ActiveX control to do this but if it's part of the Windows Scripting Host then there's also no issue. That said, you can use the WSH without the need for an ActiveX control.
 
Many thanks for your time involved.

I just need to get that exe file from .lnk so Shell32.Dll should be ok.

SergeD
 
Back
Top