run shortcut programatically
Hi, I need help ?
how can I run Shortcut file in my programming I need which .dll file running and the name of prosseger to I can do THAT ?
Web Development
Hi, I need help ?
how can I run Shortcut file in my programming I need which .dll file running and the name of prosseger to I can do THAT ?
by timfox
more info...
What computer language are you programming in?
Is the program (that would launch via the shortcut) installed on the PC?
Is there a specific program that you want to launch?
(what are you really trying to achieve here?)
by alnikolov
For Windows (95, NT, 2000, XP) you can use the WIN32API function
HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);
or if you are using VB:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Where lpOperation will be "open";
lpFile will be the full path to the shortcut;
lpParameters will contain any additional parameters. can be NULL;
lpDirectory will be your working directory. can be NULL;
This discussion is closed to new replies.
Sort by Trending