Link to home
Start Free TrialLog in
Avatar of craigdawson
craigdawson

asked on

Launch an app via a shortcut from VB?

How do I call a shortcut from within VB?  This would be the equivalent of typing "c:\app.lnk" at the DOS prompt.  The reason I want to do this is to force a 16-bit app to run in a separate memory space, as can be specified in the shortcut properties.  Is there another way to tell an app to run in a separate memory space?  I'm working on NT4.
Avatar of ninoo
ninoo

shell function will help you

example
  shell("notepad.EXE", 1)
You can run a .lnk file using ShellExecute.  See the microsoft KB article:

HOWTO: Use ShellExecute to Launch Associated File (32-bit)
http://support.microsoft.com/support/kb/articles/Q170/9/18.asp 
 
Cheers!

ninoo,

shell will not launch .lnk file...

Cheers!
Avatar of craigdawson

ASKER

Shell doesn't do it.  ShellExecute API looks promising, though.  Thanks.
i am sorry about it mcrider
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial