Running lnk files from C++ program

vsaravana
vsaravana used Ask the Experts™
on
Hello All,
I am trying to run a lnk file from a C++ program(using MFC). I have tried using Winexec and Createprocess and none of them work. However the API "system ()" works but it brings a DOS window. I don't want to use the Ishelllink interface as I have other issues with it. In short I just need to run the lnk file directly from my C++ program without any DOS window.

Thanks
saravana

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Sorry, you'll HAVE to use either IShellLink or ShellExecute().  The problem is that lnk files are a manifestation of the Windows shell NOT the Windows kernel.  As such, they are meaningless apart from the shell's interpretation of them.

Author

Commented:
ShellExecute was the API I was looking for. Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial