Working with the Application Manifest

Microsoft highly recommends that the requested execution level of an application be asInvoker. Therefore, asInvoker is the default requested execution level for all LabVIEW-built applications. However, there might be occasions where you cannot adhere to this recommendation. Complete the following steps to edit the manifest for a stand-alone application, .NET interop assembly, or shared library.

Editing the Application Manifest

  1. You must verify that you have installed mt.exe on the computer before you can edit the manifest. Use mt.exe to interact with the manifest using command-line arguments. If mt.exe is not on the computer, download the Software Development Kit from the Microsoft website.
  2. To edit the manifest, you must first retrieve it. Complete the following steps to retrieve the manifest.
    1. Open the command line window.
      Note Note  On most Windows operating systems, you can access the command line window by selecting Start»Run, entering cmd in the Open text box and clicking the OK button.
    2. Enter the following command to retrieve the manifest: mt.exe -inputresource:directory path\Application Name.exe -out:Application Name.manifest in the command line window where directory path is the path to the built application and Application Name is the name of the application.
      Note Note  If mt.exe is not in the same directory as the application whose manifest you want to retrieve, you must specify the path to mt.exe in the previous command.
    3. Press the <Enter> key to run the command. The application manifest with the file extension .manifest appears in the same directory as the application.
  3. Complete the following steps to edit the manifest.
    1. Right-click the manifest in the destination folder and open the file in a text editor or an XML editor.
    2. Locate the code <requestedExecutionLevel level="asInvoker" uiAccess="false"/>. Change the value asInvoker to requireAdministrator or highestAvailable depending on the execution level you want the built application to have.
    3. Save the manifest file.

Validating the Application Manifest

The tags within the application manifest are case sensitive. It is good practice to validate the changes you make to the manifest after you edit it. However, validating the manifest does not find spelling errors. Complete the following steps to validate the manifest.

  1. In the command line window, enter the following command to validate the manifest: mt.exe -manifest Application Name.manifest -validate_manifest in the command line window where Application Name is the name of the application.
  2. Press the <Enter> key to run the command.

Embedding the Application Manifest

After you edit and validate the application manifest, you can embed the changes when you configure the settings for a stand-alone application, .NET interop assembly, or shared library.

  1. On the Windows Security page of the Properties dialog box, place a checkmark in the Embed Manifest File checkbox.
  2. Specify the manifest file using the Select Project File dialog box.

You also can embed the manifest without using the Windows Security page. Complete the following steps to embed the manifest using the command line window.

  1. In the command line window, enter the command mt.exe -manifest Application Name.manifest -outputresource:directory path\Application Name.exe;#1, where directory path is the path to the built application and Application Name is the name of the application.
  2. Press the <Enter> key to run the command.