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
348 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
  • 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 500 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now