Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Assistance altering my visual basic.net project so that the compiled .exe does not cause a UAC box to appear

Posted on 2011-09-21
3
Medium Priority
?
359 Views
Last Modified: 2012-05-12
I have an application that was written in VB.Net.

I also have access to the original visual studio project & source code.

If I run/launch the application on my Windows 2008 server, I am prompted to click “Allow” as shown via the image below.

   UAC Window
I need to make some kind of programmatic change within the visual studio project so that this kind of prompt does not appear at all.

What must I do, so that this kind of box does not appear? Is there some specific change I need to make to the app.manifest file?

Or do I need to do something else entirely?

If something must be changed in the app.manifest file, please edit the code below, and include the edited code in your response.

If I need to do something else entirely, please let me know what it is. The objective is to make some kind of change to the code so that nothing pops up that needs to be reacted to by a user. My program will run via task scheduler and must launch then close 100's of times per day without end user intervention.

 
<!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the 
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

            Specifying requestedExecutionLevel node will disable file and registry virtualization.
            If you want to utilize File and Registry Virtualization for backward 
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
      <applicationRequestMinimum>
        <defaultAssemblyRequest permissionSetReference="Custom" />
        <PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
      </applicationRequestMinimum>
    </security>
  </trustInfo>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- A list of all Windows versions that this application is designed to work with. Windows will automatically select the most compatible environment.-->
      <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
      <!-- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
    </application>
  </compatibility>
  <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
  <!-- <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="*"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
    </dependentAssembly>
  </dependency>-->
</asmv1:assembly>

Open in new window

0
Comment
Question by:ACECORP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Expert Comment

by:nepaluz
ID: 36577155
since you are running the program on a server, try changing the execution level to highestAvailable (as opposed to requireAdministrator whichis normally done).
0
 
LVL 17

Expert Comment

by:nepaluz
ID: 36577158
On the other hand, in the project's properties under the security tab, ensure that the Enable ClickOnce Security settings checkbox in NOT turned on.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36577177
If you could do this easily, security messages such as that one would be useless.

The UAC settings in the project have nothing to do with it. It is used to request permissions and/or force the application ro run under an administrator account. Your problem is not a permission problem, otherwise the application would not run. "Unidentified Publisher" simply means that the creator of the application is not recognized on the server.

Your application needs to be signed with a digital signature that has been marked as safe on your server. It is possible to generate a signature on the server (this comes as a file), that you then use in your project's Properties window Signing tab so that the compiler uses it to digitally sign your application.

Do not ask me how to generate that signature, I do not know the exact pattern. In the companies where I had to do that, the people at the IT department were always able to provide me with the signature file. I understand that they use some tool on the server to generate a signature that is recognized on the server or organization wide.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question