Click here to Skip to main content
12,403,948 members (67,203 online)
Rate this:
 
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
Updated 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 31 Aug 2012
Copyright © CodeProject, 1999-2016
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