?
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
?
356 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 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