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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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