How to bypass UAC restriction of Windows 7 from vb.net code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mskctg
    New Member
    • Aug 2012
    • 9

    How to bypass UAC restriction of Windows 7 from vb.net code?

    Hi, I have create a vb.net application which have some function for read and write Registry Key and as back end it has MS Access database. I create the installer for this application using vb.net deployment. I also change the .manifest file for UAC setting. After deployment its all works (Installation, Application Run) fine on windows XP. But in windows 7 its installed fine but every time I run the application it shows UAC message like "Do you want to allow the program from an unknown publisher to make changes to this computer?".

    My question is how to avoid this message using code and why its showing?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It's showing because you are accessing a part of the operating system that can be used for malicious purposes.

    And because of that, we would not answer any questions that can be used for viruses and the like.

    Comment

    • PsychoCoder
      Recognized Expert Contributor
      • Jul 2010
      • 465

      #3
      Simply put you cannot, the individual user would have to turn the UAC off, you cannot bypass it from within your code.

      Comment

      • mskctg
        New Member
        • Aug 2012
        • 9

        #4
        Hi Rabbit,
        I am not creating a virus program and I don't like to do that type of work. Its for my application which I have been developing for last 4 months. This is a Cash Sales Management System for small business of our country. I used to read and write registry module to create a trial version of my application. Its all working fine on windows XP. just facing problem with windows 7.

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          It doesn't matter if you're not using it for a virus. The fact that it can be used for a virus is reason enough not to allow such methods to be posted on the forums.

          If someone were to post such code, we would remove it.

          Comment

          • zmbd
            Recognized Expert Moderator Expert
            • Mar 2012
            • 5501

            #6
            You need to submit the program thru Microsoft Software Development to have them certify that the application is safe to install. They might then send you a sealed version of the software. However, keep in mind that this WILL cost you a lot of money as MS doesn't just give away their licenses to just anyone. You will have to contact MS directly and start out by purchasing one of the developer licenses so that they can start a background check and the like.... have fun... I hear that this is a real pain...

            Comment

            • bb80
              New Member
              • Dec 2012
              • 3

              #7
              In my experience, you can't, it would be plainly breaking the UAC security model.
              You can either invoke UAC API to require elevation, require elevation in the manifest, buy a certificate so the warning is less scary for the end user, or otherwise warn the user to accept the elevation (or to turn off UAC while running the program), but I think no ways were purposedly left to hide system's privilege elevation requests.

              Comment

              Working...