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. Explorer.exe

Explorer.exe

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++windows-admin
4 Posts 2 Posters 18 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.
  • C Offline
    C Offline
    compwiz
    wrote on last edited by
    #1

    How can I reload explorer.exe through C++? I need to do this so it rereads the registry. Thanx.

    M 1 Reply Last reply
    0
    • C compwiz

      How can I reload explorer.exe through C++? I need to do this so it rereads the registry. Thanx.

      M Offline
      M Offline
      Mike Dunn
      wrote on last edited by
      #2

      I remember seeing how to do this in "Visual C++ Windows Shell Programming" (a cool book BTW). The topic isn't in the index (and I'm not really up for searching through 660+ pages for it) so this is from memory... I believe you get the HWND of the window with class "Program Manager" and send it a WM_CLOSE. Then re-run Explorer to restart the shell. The only trouble with this is that some of your tray icons will be blown away. --Mike-- ================== The original message was: How can I reload explorer.exe through C++?
      I need to do this so it rereads the registry.

      Thanx.

      M 2 Replies Last reply
      0
      • M Mike Dunn

        I remember seeing how to do this in "Visual C++ Windows Shell Programming" (a cool book BTW). The topic isn't in the index (and I'm not really up for searching through 660+ pages for it) so this is from memory... I believe you get the HWND of the window with class "Program Manager" and send it a WM_CLOSE. Then re-run Explorer to restart the shell. The only trouble with this is that some of your tray icons will be blown away. --Mike-- ================== The original message was: How can I reload explorer.exe through C++?
        I need to do this so it rereads the registry.

        Thanx.

        M Offline
        M Offline
        Mike Dunn
        wrote on last edited by
        #3

        ================== The original message was: I remember seeing how to do this in "Visual C++ Windows Shell Programming" (a cool book BTW). The topic isn't in the index (and I'm not really up for searching through 660+ pages for it) so this is from memory...

        I believe you get the HWND of the window with class "Program Manager" and send it a WM_CLOSE. Then re-run Explorer to restart the shell. The only trouble with this is that some of your tray icons will be blown away.

        --Mike--
        ==================
        The original message was:

        How can I reload explorer.exe through C++?
        I need to do this so it rereads the registry.

        Thanx.

        1 Reply Last reply
        0
        • M Mike Dunn

          I remember seeing how to do this in "Visual C++ Windows Shell Programming" (a cool book BTW). The topic isn't in the index (and I'm not really up for searching through 660+ pages for it) so this is from memory... I believe you get the HWND of the window with class "Program Manager" and send it a WM_CLOSE. Then re-run Explorer to restart the shell. The only trouble with this is that some of your tray icons will be blown away. --Mike-- ================== The original message was: How can I reload explorer.exe through C++?
          I need to do this so it rereads the registry.

          Thanx.

          M Offline
          M Offline
          Mike Dunn
          wrote on last edited by
          #4

          Ah, I found it after all! HWND hwnd = FindWindow( _T("Progman"), NULL ); PostMessage( hwnd, WM_QUIT, 0, 0 ); ShellExecute( NULL, NULL, _T("explorer.exe"), NULL, NULL, SW_SHOW );

          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