Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to double click desktop icon programatically?

How to double click desktop icon programatically?

Scheduled Pinned Locked Moved C / C++ / MFC
questionjsontutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    birajendu
    wrote on last edited by
    #1

    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 lunch Start->Run window? Thanks in advance..

    Birajendu SonicWALL Bangalore India

    D S 2 Replies Last reply
    0
    • B birajendu

      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 lunch Start->Run window? Thanks in advance..

      Birajendu SonicWALL Bangalore India

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      I see three separate (and unrelated) questions here? Which one are you interested in?

      "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      1 Reply Last reply
      0
      • B birajendu

        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 lunch Start->Run window? Thanks in advance..

        Birajendu SonicWALL Bangalore India

        S Offline
        S Offline
        Stuart Dootson
        wrote on last edited by
        #3

        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.

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        B 1 Reply Last reply
        0
        • S Stuart Dootson

          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.

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          B Offline
          B Offline
          birajendu
          wrote on last edited by
          #4

          I tried with ShellExecute to open this, But for network connection shortcuts it seems not working. i found another thing about network shortcuts is, the target type is a GUID rather than the actual application. The reason why i asked about the start->run is, if you drag the network shortcut in to start->run it functions perfactly. So can i implement some code to simulate that action?

          Birajendu SonicWALL Bangalore India

          G 1 Reply Last reply
          0
          • B birajendu

            I tried with ShellExecute to open this, But for network connection shortcuts it seems not working. i found another thing about network shortcuts is, the target type is a GUID rather than the actual application. The reason why i asked about the start->run is, if you drag the network shortcut in to start->run it functions perfactly. So can i implement some code to simulate that action?

            Birajendu SonicWALL Bangalore India

            G Offline
            G Offline
            Graham Shanks
            wrote on last edited by
            #5

            Try the code in this article[^]

            Graham Librarians rule, Ook!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups