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. Run an exe from ShellExecute with administrator permission in Vista.

Run an exe from ShellExecute with administrator permission in Vista.

Scheduled Pinned Locked Moved C / C++ / MFC
6 Posts 5 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.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    Hi all, I have a dialog based application ,here on InitInstance() function of application i want to run an another exe from ShellExecute command like this;

    CString shell_str;//path of exe
    ShellExecute(NULL,_T("open"),shell_str,NULL,NULL,SW_HIDE);

    with the use of this exe i want to copy or move some files in Program files folder,so in Case of VISTA and UAC is Enabled its wants to permission of admin rights to copy or move files . so please tell me how can i do this. thanks in advance.

    To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

    _ K P 3 Replies Last reply
    0
    • L Le rner

      Hi all, I have a dialog based application ,here on InitInstance() function of application i want to run an another exe from ShellExecute command like this;

      CString shell_str;//path of exe
      ShellExecute(NULL,_T("open"),shell_str,NULL,NULL,SW_HIDE);

      with the use of this exe i want to copy or move some files in Program files folder,so in Case of VISTA and UAC is Enabled its wants to permission of admin rights to copy or move files . so please tell me how can i do this. thanks in advance.

      To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You can give it permission for admin rights. :laugh:

      «_Superman_» I love work. It gives me something to do between weekends.

      1 Reply Last reply
      0
      • L Le rner

        Hi all, I have a dialog based application ,here on InitInstance() function of application i want to run an another exe from ShellExecute command like this;

        CString shell_str;//path of exe
        ShellExecute(NULL,_T("open"),shell_str,NULL,NULL,SW_HIDE);

        with the use of this exe i want to copy or move some files in Program files folder,so in Case of VISTA and UAC is Enabled its wants to permission of admin rights to copy or move files . so please tell me how can i do this. thanks in advance.

        To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        I am shure that you havent use the search box. :|

        Press F1 for help or google it. Greetings from Germany

        L 1 Reply Last reply
        0
        • L Le rner

          Hi all, I have a dialog based application ,here on InitInstance() function of application i want to run an another exe from ShellExecute command like this;

          CString shell_str;//path of exe
          ShellExecute(NULL,_T("open"),shell_str,NULL,NULL,SW_HIDE);

          with the use of this exe i want to copy or move some files in Program files folder,so in Case of VISTA and UAC is Enabled its wants to permission of admin rights to copy or move files . so please tell me how can i do this. thanks in advance.

          To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

          P Offline
          P Offline
          Paresh Chitte
          wrote on last edited by
          #4

          Is this[^] helpful ? Regards, Paresh.

          1 Reply Last reply
          0
          • K KarstenK

            I am shure that you havent use the search box. :|

            Press F1 for help or google it. Greetings from Germany

            L Offline
            L Offline
            Le rner
            wrote on last edited by
            #5

            means

            To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

            D 1 Reply Last reply
            0
            • L Le rner

              means

              To accomplish great things, we must not only act, but also dream; not only plan, but also believe.

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

              Read here.

              "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
              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