General discussion

Locked

run shortcut programatically

By firas_abo_areda ·
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 ?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

run shortcut programatically

by timfox In reply to run shortcut programatica ...

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?)

Collapse -

by alnikolov In reply to run shortcut programatica ...

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;

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums