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. MFC,Run as administrator

MFC,Run as administrator

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
6 Posts 3 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.
  • J Offline
    J Offline
    Janani93
    wrote on last edited by
    #1

    How to give administrator rights to my mfc application without manifest file

    Richard Andrew x64R 1 Reply Last reply
    0
    • J Janani93

      How to give administrator rights to my mfc application without manifest file

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      You can specify to "run as administrator" in the shortcut that points to the program.

      The difficult we do right away... ...the impossible takes slightly longer.

      J 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        You can specify to "run as administrator" in the shortcut that points to the program.

        The difficult we do right away... ...the impossible takes slightly longer.

        J Offline
        J Offline
        Janani93
        wrote on last edited by
        #3

        Thanks for your valuable information but i would like to ask admin rights to my application programatically while run by the user.

        L 1 Reply Last reply
        0
        • J Janani93

          Thanks for your valuable information but i would like to ask admin rights to my application programatically while run by the user.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You cannot set administration rights within a program, it must be set externally by the manifest, or by the user at startup. There would be no point in having a security framework if it was possible.

          J 1 Reply Last reply
          0
          • L Lost User

            You cannot set administration rights within a program, it must be set externally by the manifest, or by the user at startup. There would be no point in having a security framework if it was possible.

            J Offline
            J Offline
            Janani93
            wrote on last edited by
            #5

            Inorder to prevent the theme from modifying my application i have disabled the manifest file the admin rights is found in the manifest file.what should i do to prevent my application being modified by theme without disabling manifest.Your suggestion would help me a lot.

            L 1 Reply Last reply
            0
            • J Janani93

              Inorder to prevent the theme from modifying my application i have disabled the manifest file the admin rights is found in the manifest file.what should i do to prevent my application being modified by theme without disabling manifest.Your suggestion would help me a lot.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Bot sure, but I think if you use the name="Microsoft.Windows.Common-Controls" version="6.0.0.0" setting then it will use themes. Try removing that from the manifest and see what happens. see https://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx[^] for further information.

              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