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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 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