Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C++/CLI C MFC ATL WTL STL

Hi,

I want to write some code which will double-click a desktop shortcut. Or the alternate way is, how can I run a desktop shurtcut using Createprocess() API.

Which EXE is responsible to launch Start->Run window?

Thanks in advance.

Posted 15-Aug-09 9:15am
Edited 25-Aug-09 10:19am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

birajendu wrote:
I want to write some code which will double click a desktop shortcut. or the alternate way is how can i run a desktop shurtcut using Createprocess() api.


If you know the path to the desktop shortcut, then you should be able to use ShellExecute to open it. If you need a process handle (the only reason I can think that you might want to use CreateProcess for this), then ShellExecuteEx will let you do that.

birajendu wrote:
Which exe is responsible to lunch Start->Run window?


Windows Explorer.

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Don't start processes by simulating behaviors of the user, such as double clicking shortcuts. You never know what the shortcut points to!

Also, insanity lives down that road. Sooner or later you'll be opening the control panel applet by simulating mouse clicks on the start menu...

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

This question is not answered. Windows Explorer (explorer.exe) is indeed responsible, but how can one call it problematically as if the user double clicked an application's icon?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 398
1 Richard Deeming 210
2 Sergey Alexandrovich Kryukov 202
3 PhilLenoir 120
4 RyanDev 115
0 Sergey Alexandrovich Kryukov 6,405
1 OriginalGriff 5,798
2 CPallini 2,473
3 Richard MacCutchan 1,647
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web02 | 2.8.140821.2 | Last Updated 31 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100