Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run shortcuts from code

Status
Not open for further replies.

Zero3k

Programmer
Joined
Oct 28, 2006
Messages
1
Location
MU
I am trying to run a shortcut using the following line of code:

lRet = ShellExecute(0&, "Open", [File Path], VBNullString, [File Parent Folder], 1&)

Its works fine with all files except with shortcuts(*.lnk). My VB6 IDE always crashes when I run the code. Where did I go wrong? Is there another way to do this?
 
Sure, you can run the exe that the shortcut runs. Why is that a bad idea?

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top